Follow Discord
Sweep 31 Oct 2026 · 01:10Z Build v2.1.316 534 read Stable v2.1.309 Latest v2.1.316 Next v2.1.316 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

files changedbuild-with-claude/files

Recorded here
Lines+69added
Lines−8removed
From line 4 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits29to this page, all time

## Availability ### API support #### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) #### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) ### Data handling

The whole hunk

from line 4, old and new numbered
/
lines
from line 4
44description: Upload files once, reference them by file_id in Messages requests, and download outputs created by skills or the code execution tool.
55featureMetadata:
66 status: ga
7 zdr: not-eligible
7 zdr:
8 eligibility: not-eligible
9 note: Files retained until explicitly deleted or they reach their configured expiration.
10 supportedModels:
11 - claude-fable-5-1
12 - claude-mythos-5-1
13 - claude-fable-5
14 - claude-mythos-5
15 - claude-mythos-preview
16 - claude-opus-5-5
17 - claude-opus-5
18 - claude-sonnet-5-5
19 - claude-sonnet-5
20 - claude-haiku-5-5
21 - claude-haiku-4-5-20251001
22 - claude-opus-4-8
23 - claude-opus-4-7
24 - claude-opus-4-6
25 - claude-sonnet-4-6
26 - claude-opus-4-5-20251101
27 - claude-sonnet-4-5-20250929
828 supportedPlatforms:
929 Claude API: ga
1030 Claude Platform on AWS: ga
11 Microsoft Foundry:
12 availability: ga
13 note: On [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), the Files API requires a [Hosted on Anthropic deployment](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure).
31 Claude Models on Google Cloud (Anthropic managed): ga
32 Microsoft Foundry (hosted on Anthropic): ga
1433---
1534 
35**API support**: Usage differs by product.
36 
37* **Messages API**: Refer to an uploaded file by its `file_id` in a `document`, `image` or `container_upload` block.
38* **Managed Agents**: Mount files in the session’s sandbox, or refer to a `file_id` in a `user.message` event.
39 
1640The Files API lets you upload and manage files to use with the Claude API without re-uploading content with each request. This is particularly useful when using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to provide inputs (for example, datasets and documents) and then download outputs (for example, charts). You can [explore the API reference directly](https://platform.claude.com/docs/en/api/files/upload), in addition to this guide.
1741 
1842## File type support
1943 
20Referencing a `file_id` in a Messages request is supported on all models that support the given file type. [Images](https://platform.claude.com/docs/en/build-with-claude/vision) are supported on all current Claude models. For [PDFs](https://platform.claude.com/docs/en/build-with-claude/pdf-support) and [other file types with the code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#compatibility), see the linked pages for model support.
44Referencing a `file_id` in a Messages request is supported on all models that support the given file type. [Images](https://platform.claude.com/docs/en/build-with-claude/vision) are supported on all current Claude models. For [PDFs](https://platform.claude.com/docs/en/build-with-claude/pdf-support) and [other file types with the code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#availability-feature-support), see the linked pages for model support.
2145 
2246## How the Files API works
2347 
from line 52
2852* **Reference files** in [Messages](https://platform.claude.com/docs/en/api/messages/create) requests using the `file_id` instead of re-uploading content
2953* **Manage your files** with list, retrieve, and delete operations
3054 
31<Warning id="workspace-scoped-access">
32 **Uploaded files are accessible to your entire workspace, not scoped to an end user, conversation, or session.** Any API key with access to a workspace can access any files uploaded to that workspace. Every service account, and every user whose organization role allows API access, can use the Default Workspace in addition to any workspace you add them to, so keep files that must stay separate in their own workspace and access them only with [keys scoped to that workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#api-keys-and-resource-scoping). Never accept `file_id` values from end users or other untrusted sources: a user-supplied file ID would let one user of your application read content that another user uploaded. Treat file IDs as server-side references, and keep the mapping between your users and their files in your application.
55<Warning id="workspace-scoped-access" title="Uploaded files are accessible to your entire workspace">
56 Files are not scoped to an end user, conversation, or session. Any API key with access to a workspace can access any files uploaded to that workspace. Every service account, and every user whose organization role allows API access, can use the Default Workspace in addition to any workspace you add them to, so keep files that must stay separate in their own workspace and access them only with [keys scoped to that workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#api-keys-and-resource-scoping). Never accept `file_id` values from end users or other untrusted sources: a user-supplied file ID would let one user of your application read content that another user uploaded. Treat file IDs as server-side references, and keep the mapping between your users and their files in your application.
3357 
3458 If you are building a multitenant application on the Files API, create a separate [workspace](https://platform.claude.com/docs/en/manage-claude/workspaces) for each tenant. The workspace is the isolation boundary for files, so a workspace for each tenant gives that tenant’s data hard isolation from every other tenant. Each organization can have up to 100 workspaces; contact your account team if you need more.
3559</Warning>
from line 967
943967* Files persist until you delete them with the `DELETE /v1/files/{file_id}` endpoint or they reach their `expires_at`.
944968* Deleted files cannot be recovered.
945969* Files are inaccessible through the API shortly after deletion, but they may persist in active Messages API calls and associated tool uses.
946* Files that users delete will be deleted in accordance with Anthropic’s [data retention policy](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data). For ZDR eligibility across all features, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
970* Files that users delete will be deleted in accordance with Anthropic’s [data retention policy](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data).
947971 
948972### File expiration
949973 
from line 1067
10431067 Process and analyze visual input and generate text and code from images.
10441068 </Card>
10451069</CardGroup>
1070 
1071## Availability
1072 
1073The Files API is available on every model.
1074 
1075### API support
1076 
1077#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
1078 
1079* Availability: Available
1080* Usage: Refer to an uploaded file by its `file_id` in a `document`, `image` or `container_upload` block.
1081 
1082| Status | Cloud platforms |
1083| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
1084| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed), [Microsoft Foundry (hosted on Anthropic)](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) |
1085 
1086#### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
1087 
1088* Availability: Available
1089* Usage: Mount uploaded files in the session’s sandbox as session resources (read-only, under `/mnt/session/uploads`), or refer to a `file_id` in an `image` or `document` block of a `user.message` event. Files the agent writes to `/mnt/session/outputs/` can be downloaded with the Files API.
1090 
1091| Status | Cloud platforms |
1092| --------- | ----------------------- |
1093| Available | All supported platforms |
1094 
1095### Data handling
1096 
1097[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
1098 
1099| Item | Zero data retention | HIPAA |
1100| ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
1101| Status | Not eligible | Not eligible |
1102| Details | Files retained until explicitly deleted or they reach their configured expiration. [Learn more](https://platform.claude.com/docs/en/build-with-claude/files#data-retention) | — |
1103 
1104Applicable endpoints:
1105 
1106* `/v1/files`
10461107 
Feedback