Skip to main content
Version: v0.2.23

Upload a file that can be used across various endpoints.

POST 

/v1/openai/v1/files

Upload a file that can be used across various endpoints. The file upload should be a multipart form request with:

  • file: The File object (not file name) to be uploaded.
  • purpose: The intended purpose of the uploaded file.
  • expires_after: Optional form values describing expiration for the file. Expected expires_after[anchor] = "created_at", expires_after[seconds] = {integer}. Seconds must be between 3600 and 2592000 (1 hour to 30 days).

Request​

Responses​

An OpenAIFileObject representing the uploaded file.