Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/openai/src/openai.ts>OpenAI#uploadFile

unofficial Deno wrapper for the Open Ai api
Extremely Popular
Go to Latest
method OpenAI.prototype.uploadFile
import { OpenAI } from "https://deno.land/x/openai@1.3.0/src/openai.ts";

Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.

https://platform.openai.com/docs/api-reference/files/upload

Parameters

file: string
purpose: string

Returns

Promise<File>