Skip to content
中文

List files

GET/anthropic/v1/files● Supported

Official Anthropic docs ↗

Request parameters

  • idsarrayoptional

    query: Query param: 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.

    Verified to take effect.

  • scope_idstringoptional◐ Partially supported

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

    Requires anthropic-beta: managed-agents-2026-04-01. Invalid scope_id returns 400; a nonexistent session scope returns 404.

  • limitnumberoptional

    query: Number of items per page.

    Verified to take effect.

  • pagestringoptional

    query:

    Verified to take effect.

  • after_idstringoptional

    query: Return the page of files immediately after this file id (older files).

    Returns the page after this file (older files); cannot be combined with before_id or page.

  • before_idstringoptional

    query: Return the page of files immediately before this file id (newer files).

    Returns the page before this file (newer files); cannot be combined with after_id or page.

Returns

200

Newest first. Paginate with after_id / before_id and limit (sending both returns 400), or with the page cursor (next_page); use only one of the three. Responses contain data, has_more, first_id, last_id and next_page. ids (up to 100 distinct IDs) is mutually exclusive with page, after_id, before_id and limit. scope_id requires the anthropic-beta: managed-agents-2026-04-01 header; a missing header returns 400 and a nonexistent session scope returns 404. anthropic-workspace-id returns 400.

Errors follow the Anthropic format — see error codes

Request

curl
curl https://api.deepraxis.com/anthropic/v1/files \
  -H "x-api-key: $PRAXIS_API_KEY" \
  -H "anthropic-version: 2023-06-01"
Python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.deepraxis.com/anthropic",
    api_key="$PRAXIS_API_KEY",
)

files = client.files.list()
TypeScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.deepraxis.com/anthropic",
  apiKey: "$PRAXIS_API_KEY",
});

const files = await client.files.list();

Response 200

{
  "data": [
    {
      "id": "file_dp_01M42FVDJD8QGPRQ0059E7V056",
      "type": "file",
      "filename": "pixel.png",
      "mime_type": "image/png",
      "size_bytes": 70,
      "created_at": "2026-10-04T03:38:18.651Z",
      "expires_at": null,
      "downloadable": false
    }
  ],
  "next_page": null
}

Response

HTTP 200

Files listed

application/json

Name Type Description
data array<object>
data[].id string Unique object identifier. The format and length of IDs may change over time.
data[].created_at string RFC 3339 datetime string representing when the file was created.
data[].filename string Original filename of the uploaded file.
data[].mime_type string MIME type of the file.
data[].size_bytes number Size of the file in bytes.
data[].type string Object type. For files, this is always "file".
data[].downloadable boolean Whether the file can be downloaded.
data[].expires_at null | string RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with expires_in_seconds, this is the upload time plus that value.
data[].scope null | object The scope of this file, indicating the context in which it was created (e.g., a session).
next_page null | string