Files
⚠️
Preview — this feature is being built; the design below is the spec.
The Files endpoints store a file once so its id can be used in many requests: documents and images in chat, input lists for batches, inputs and outputs for code execution, and skill packages. Files belong to one workspace and always expire.
| Operation | Method and path |
|---|---|
| Upload a file | POST /v1/files |
| List files | GET /v1/files |
| Get a file | GET /v1/files/{file_id} |
| Download file content | GET /v1/files/{file_id}/content |
| Delete a file | DELETE /v1/files/{file_id} |
The file object
{
"id": "file_01JBW9Q6RZ",
"object": "file",
"filename": "lease.pdf",
"purpose": "document",
"bytes": 482113,
"mime_type": "application/pdf",
"created_at": 1791820800,
"expires_at": 1794412800,
"status": "ready",
"source": "upload",
"workspace_id": "wrkspc_01JC0A2C4E6G8J0L2N4Q"
}Field descriptions are on Get a file.
Limits
| Limit | Value |
|---|---|
| File size | 100 MB; 500 MB for batch and code_input |
| Storage per workspace | 100 GB and 10,000 files |
| Retention | 1 to 90 days, default 30 |
Purposes, accepted types and when to use files are explained in the Files API guide.
Was this page helpful?