List Files
GET/v1/files
List Files
Query Parameters
after_id: optional string
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.
before_id: optional string
ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.
Header Parameters
Returns
first_id: optional string
ID of the first file in this page of results.
has_more: optional boolean
Whether there are more results available.
last_id: optional string
ID of the last file in this page of results.
List Files
curl https://api.anthropic.com/v1/files?beta=true \
-H 'anthropic-version: 2023-06-01' \
-H 'anthropic-beta: files-api-2025-04-14' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"Response 200
{
"data": [
{
"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
}
],
"first_id": "file_011CNha8iCJcU1wXNR6q4V8w",
"has_more": true,
"last_id": "file_013Zva2CMHLNnXjNJJKqJ2EF"
}Returns Examples
Response 200
{
"data": [
{
"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
}
],
"first_id": "file_011CNha8iCJcU1wXNR6q4V8w",
"has_more": true,
"last_id": "file_013Zva2CMHLNnXjNJJKqJ2EF"
}