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​
- 200
- 400
- 429
- 500
- default
An OpenAIFileObject representing the uploaded file.
The request was invalid or malformed
The client has sent too many requests in a given amount of time
The server encountered an unexpected error
An unexpected error occurred