Files
Files
Upload and manage files for use with assistants, fine-tuning, and vision.
File Purposes
| Purpose | Description | Max Size |
|---|---|---|
assistants | For use with assistants | 512 MB |
fine-tune | For fine-tuning models | 1 GB |
batch | For batch processing | 512 MB |
vision | For image analysis | 20 MB |
GET
/api/v1/files List Files
Returns a list of files belonging to the organization.
POST
/api/v1/files Upload File
Upload a file that can be used across various endpoints.
Parameters
| Name | Type | Req | Description | Default |
|---|---|---|---|---|
file | file | Yes | File to upload | — |
purpose | string | No | Purpose (assistants, fine-tune) | assistants |
DELETE
/api/v1/files/{file_id} Delete File
Delete a file.
GET
/api/v1/files/{id} Retrieve File Metadata
Retrieve metadata for a specific file by its ID.
GET
/api/v1/files/{id}/content Download File Content
Download the binary content of a specific file.
Response Examples
{
"id": "f82306ff-99aa-4fae-a43a-d8c9e3004e6f",
"user_id": "e6df701d-a5b5-426d-a8e6-80d95047a91c",
"filename": "document.pdf",
"path": "/app/backend/data/uploads/f82306ff_document.pdf",
"data": {
"status": "pending"
},
"meta": {
"name": "document.pdf",
"content_type": "application/pdf",
"size": 470,
"data": {}
},
"vector_status": "pending",
"storage_location": null,
"created_at": 1791814025,
"updated_at": 1791814025
}Code Examples
Upload File
curl -X POST https://api.meedoo.co/api/v1/files \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "purpose=assistants"List Files
curl https://api.meedoo.co/api/v1/files \
-H "Authorization: Bearer YOUR_API_KEY"Delete File
curl -X DELETE https://api.meedoo.co/api/v1/files/file_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"curl https://api.meedoo.co/api/v1/files/file_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"curl https://api.meedoo.co/api/v1/files/file_abc123/content \
-H "Authorization: Bearer YOUR_API_KEY" \
-o downloaded_file.pdfGet File Content
curl https://api.meedoo.co/api/v1/files/file_abc123/content \
-H "Authorization: Bearer YOUR_API_KEY" \
-o downloaded_file.txt