Learning resourcesReviewed · Anthropic

Claude Files API guide

Anthropic’s Files API guide teaches developers to reuse files in Claude applications, but uploaded files are accessible across their workspace and remain stored until deletion or expiration. It explains file references, generated-output downloads, access boundaries, storage limits and migration from the older beta interface.

Researched 25 Nov 2026

In short.

Anthropic’s Files API guide helps developers build Claude applications that reuse uploaded files, but workspace-wide access and retained content require careful data handling. It documents document, image and code-execution inputs, generated-file downloads, expiration and migration to the stable interface. File operations are free according to the page, while content used in Messages is billed as input tokens. The feature is not eligible for zero data retention or HIPAA. Runtime behavior, reliability and performance are not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is limited to the complete selected Files API documentation page at [https://platform.claude.com/docs/en/build-with-claude/files.md], including its workspace-access warning, retention and expiration notices, cloud-access caveats, billing, migration and availability statements. Linked pages were excluded. No behavior was tested or executed; compatibility details delegated to linked pages, complete legal terms, exact application costs and operational performance remain unknown or unassessed.

The overview

identity

This is Anthropic’s developer guide to the Claude Files API. The API stores uploaded files, assigns reusable file_id references and supports downloading outputs created by skills or the code execution tool. The guide includes HTTP, CLI and SDK examples.

The original source address is [https://platform.claude.com/docs/en/build-with-claude/files.md]. Its page metadata identifies the documentation address as [https://platform.claude.com/docs/en/build-with-claude/files].

assessment

The guide is useful when an application repeatedly supplies the same documents, images or datasets to Claude. It explains both the basic upload-and-reference pattern and operational details such as expiration, pagination and access boundaries.

The main decision is whether persistent, workspace-accessible storage fits the application. The documented benefit is avoiding repeated uploads; file reuse does not remove input-token charges. Applications requiring this feature to qualify for zero data retention or HIPAA would face an explicit eligibility limitation.

users

The intended readers are developers building document-processing applications, image-analysis features, data-analysis tools or agent workflows with Claude. Beginners get examples of the full upload-to-message sequence; experienced developers get lifecycle, migration and audit details.

Teams serving multiple customers should pay particular attention to workspace isolation and cloud access controls. The page recommends a workspace per tenant, with up to 1,000 workspaces per organization by default, but also describes cloud-specific access rules that can affect isolation.

capabilities

The documented operations cover uploading, listing, retrieving metadata, deleting and downloading eligible generated files. Messages requests can reference PDFs and plain text through document blocks, supported images through image blocks, and datasets or other tool inputs through container_upload blocks. Document blocks can also enable citations.

Managed Agents can mount uploaded session resources read-only under /mnt/session/uploads or receive image and document references in user.message events. Files written to /mnt/session/outputs can be downloaded. The page also states that supported image, video and audio outputs produced through code execution on the Claude API carry signed C2PA Content Credentials when downloaded; verification details are on a linked page.

Using it

requirements

Using the examples requires API access, credentials authorized for the relevant workspace, and an HTTP client, the ant CLI or an appropriate SDK. The HTTP examples use the x-api-key header and anthropic-version: 2026-10-21. The stable Files API requires no Files beta header.

The page describes availability through the Claude API, Claude Platform on AWS, Anthropic-managed Claude Models on Google Cloud, and Microsoft Foundry hosted on Anthropic. It says the Files API is available on every model, while actual file-type support depends on the model and tool. Detailed PDF and code-execution compatibility requirements are delegated to linked pages and are not established here.

mechanism

Uploading sends a file to Anthropic’s storage and returns metadata containing a unique id. Subsequent requests use that value as file_id, allowing multiple requests in the workspace to refer to the stored content. A file cannot be edited or renamed after upload; changing it requires a new upload.

Uploaded files have downloadable set to false. Downloads are available for files created by skills or code execution when their metadata reports downloadable: true. A generated file’s identifier appears in the relevant tool result, and its content is retrieved through GET /v1/files/{file_id}/content.

setup

Choose the workspace and its authorized credentials, then upload the file through POST /v1/files and retain the returned identifier in the application. Use document, image or container_upload according to the file’s intended use. If automatic expiration is needed, set expires_in_seconds during upload; it cannot be changed later.

Existing integrations using files-api-2025-04-14 can retain that header and its older response shapes. Moving to the stable interface requires updating pagination to page and next_page, handling expires_at, and checking the SDK’s namespace behavior. SDK-specific version thresholds are provided for changes to the beta namespace, rather than as a general minimum-version requirement.

example

For a reusable PDF summarizer, the documented sequence is to upload document.pdf, save the returned id, and send a Messages request containing a summarization prompt plus a document block whose source has type file and that file_id. The page’s example uses claude-opus-5-5 and max_tokens of 1024.

Later requests can reference the same stored PDF while it remains accessible. A dataset-analysis application instead supplies a container_upload block to code execution, then downloads generated artifacts using their returned identifiers. These are documented examples; no requests were executed and no outputs were observed.

Assessment & evidence

limitations

Storage limits are 500 MB per file and 1 TB per organization. A file that uploads successfully can still exceed a model’s context window when used in Messages. Uploaded originals cannot be downloaded through this API, and deleted files cannot be recovered.

Files are accessible to any API key with access to their workspace, rather than being isolated by application user or conversation. The page warns against accepting untrusted file IDs and recommends server-side user-to-file mappings. On Anthropic-managed Google Cloud, IAM roles apply across the project’s workspaces, so separate workspaces alone do not restrict who can access their resources.

The document block does not directly support formats such as .docx and .xlsx. The page recommends extracting text, converting suitable documents to PDF, or using code execution for dataset analysis. Expired files can remain listed, and deletion may not immediately stop access within already active Messages calls and tool uses.

reasoning

A reasonable fit follows from repeated use of the same inputs: a reusable identifier can simplify file submission and centralize lifecycle management. This is an architectural inference from the documented mechanism; the page supplies no measured latency, accuracy or reliability improvements.

Access design is central to that fit. Since workspace authorization covers stored files, an application must maintain its own user-level ownership mapping and account for the cloud platform’s access rules. Storage expiration also needs to match the application’s retention needs without being treated as proof of immediate physical deletion.

alternatives

The page demonstrates reading a local text file and including its contents directly in a Messages request. That is a documented option when a reusable stored file reference is unnecessary. CSV and Markdown can also be uploaded with an explicit text/plain content type when the goal is reading their text.

For .docx documents containing images, the page recommends conversion to PDF to use image parsing and document citations. For dataset computation and visualization, it recommends the code execution route. These are alternative input approaches within Claude; comparisons with other providers or local tools are not supported by the supplied evidence.

evidence

The evidence consists of the complete captured Anthropic Files API page at [https://platform.claude.com/docs/en/build-with-claude/files.md]. It contains request examples, metadata shapes, access warnings, lifecycle rules, limits, billing statements and migration guidance. Linked API references, privacy policies and tool guides are outside the supplied scope.

The documentation supports descriptions of intended behavior. No code, CLI commands or API requests were executed. Actual response behavior, platform-specific access enforcement, deletion timing, Content Credential verification, reliability and performance remain unassessed.

Access & freshness

costs

The page states that uploading, downloading, listing, metadata retrieval and deletion are free. File content supplied in Messages requests is charged as input tokens, including when it is referenced through a previously uploaded file_id.

Exact model-token prices, tool charges, cloud-provider charges and total application cost are not established by this page. It provides no measured cost comparison for repeated uploads versus file references. File-related API calls are limited to approximately 500 requests per minute, with higher limits available by contacting sales.

rights

The supplied page does not establish a redistribution license for the documentation or its examples, rights in generated artifacts, or the complete service terms. Those permissions remain unknown from this evidence.

The feature is explicitly ineligible for zero data retention and HIPAA. Files persist until deletion or configured expiration. Expiration removes API access to content but is not a guaranteed-deletion control: underlying content may remain temporarily for safety review, and metadata can remain readable for up to 30 days.

freshness

The source snapshot was captured on 2026-11-25 at 06:55:06.580 UTC. Its source revision is sha256:bf2e7e06aa3569dd30b9f88a57b03fb2a2eee2f703d718dd7b6f29832f1c686d. No explicit publication or last-updated date is supplied.

The captured page labels the Files API stable and out of beta. It documents continued compatibility with files-api-2025-04-14, while explaining that removing that header changes response shapes. The date in that header identifies the compatibility interface, not the guide’s update date. Changes after the captured snapshot are unknown.

actions

Before adopting the API, confirm that persistent file storage and the documented eligibility limits fit the intended data. Choose workspace and cloud access boundaries, keep file identifiers under server-side control, and decide whether uploads should expire automatically. Preserve original inputs elsewhere if the application needs to retrieve them later.

Plan pagination and lifecycle handling explicitly. Standard list requests return 20 files by default and at most 1,000 per page. Queries for up to 100 known IDs silently omit inaccessible or missing files, so compare requested and returned IDs. Check expires_at when listing files because expired metadata may remain visible.

If audit records are required, enable the appropriate logging before use. The Compliance API Activity Feed records uploads, content downloads and deletions while enabled, but omits listing and metadata retrieval and cannot recover earlier disabled-period records. AWS and Google Cloud have separate logging requirements. Validate the intended upload, reference, expiration and generated-output download paths before relying on them in an application.

Evidence for this report

selected-page.txtselected · checked 2026-11-25