Upload File
POST/v1/files
Upload File
Header Parameters
Body ParametersForm Data
file: file
The file to upload
Returns
Upload File
curl https://api.anthropic.com/v1/files?beta=true \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H 'anthropic-beta: files-api-2025-04-14' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F 'file=@/path/to/file'Response 200
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false
}Returns Examples
Response 200
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false
}