Upload a file that can be used across various endpoints.
POST/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.
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