get/v1/files

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Query parameters

pagestring nullable

Opaque page cursor returned in a prior list response's next_page. Prefixed page_.

ids[]string[] nullable

Restrict the result set to Files whose id is in this list. At most 100 entries (after de-duplication). Mutually exclusive with page and limit. When supplied, the response is always a single page (next_page is null). IDs that do not resolve to a visible File — including deleted Files — are silently omitted.

limitinteger

Number of items to return per page.

Defaults to 20. Ranges from 1 to 1000.

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

anthropic-workspace-idstring

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Response

Successful Response

next_pagestring nullable

Opaque cursor for the next page. Supply as ?page= to fetch the next page; null when there are no more results.

Example response

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

Changes

    • warning

      deleted the header request parameter x-api-key

    • breaking

      the response's property type changed from no type to object for status

    • info

      added the optional property / to the response with the status

    • info

      removed discriminator from response property for the response status

    • info

      removed from the response property oneOf list for the response status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status