v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

List Files

get/v1/files?beta=true

Query parameters

before_idstring

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object.

after_idstring

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.

ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object.

limitinteger

Number of items to return per page.

Defaults to 20. Ranges from 1 to 1000.

Number of items to return per page.

Defaults to 20. Ranges from 1 to 1000.

scope_idstring

Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID).

Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID).

Headers

anthropic-betastring

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

x-api-keystring

Your unique API key for authentication.

This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the Console. Each key is scoped to a Workspace.

Your unique API key for authentication.

This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the Console. Each key is scoped to a Workspace.

Response

Successful Response

first_idstring nullable

ID of the first file in this page of results.

has_moreboolean

Whether there are more results available.

last_idstring nullable

ID of the last file in this page of results.

Example response

{
  "data": [
    {
      "created_at": "2025-04-15T18:37:24.100435Z",
      "filename": "document.pdf",
      "id": "file_011CNha8iCJcU1wXNR6q4V8w",
      "mime_type": "application/pdf",
      "size_bytes": 102400
    }
  ],
  "first_id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "last_id": "file_013Zva2CMHLNnXjNJJKqJ2EF"
}