Upload File
POST/v1/files
Upload File
Body (form-data)
Returns
Upload File
curl https://api.anthropic.com/v1/files \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F 'file=@/path/to/file'{
"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,
"expires_at": "2025-05-15T18:37:24.100435Z"
}Returns Examples
{
"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,
"expires_at": "2025-05-15T18:37:24.100435Z"
}