Assistant APIs
Upload Attachment API
Upload files to be used with Assistants
POST
/
attachment
/
v1
/
upload
Upload files that can be referenced in Assistant conversations using their attachment IDs.
To use the API you need an API key. You can create API Keys in your Workspace settings.
Request Format
This endpoint accepts multipart/form-data
requests with a single file upload.
Parameter | Type | Required | Description |
---|---|---|---|
file | File | Yes | The file you want to upload |
Response Format
The API returns the uploaded file information:
Example
Error Handling
The uploaded attachment ID can be used in the Assistant API by including it in the attachmentIds
array either at the assistant level or message level.
Body
multipart/form-data
The file to upload
Was this page helpful?