Files
Upload a file
Files are used to upload documents that can be used with features like Deployments.
POST
Core - Upload retrieval file
Related guide: Files guide. See the Files guide for a walkthrough with examples.
Authorizations
Body
application/json
Intended usage category for the uploaded file. Defaults to retrieval when omitted. Accepts either the alias (retrieval, knowledge_datasource, batch, code_interpreter) or the prefixed value. A JSON upload returns the prefixed form in the response, and a multipart upload returns the lowercase alias.
Available options:
FILE_PURPOSE_RETRIEVAL, FILE_PURPOSE_KNOWLEDGE_DATASOURCE, FILE_PURPOSE_BATCH, FILE_PURPOSE_CODE_INTERPRETER