Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
One change · api

Upload File changed

api/beta/files/upload

Nearest release: v2.1.251, published 2 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+13added
Lines−1removed
From line 104 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits9to this page, all time

The whole hunk

from line 104, old and new numbered
/
lines
from line 104
104104 
105105 format: binary
106106 
107- `expires_in_seconds: optional number`
108 
109 Seconds from upload until the file expires and its bytes become permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).
110 
111 minimum: 3600, maximum: 7776000
112 
107113## Returns
108114 
109115- `BetaFileMetadata object`
from line 156
150156 
151157 default: false
152158 
159 - `expires_at: optional string or null`
160 
161 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.
162 
163 format: date-time
164 
153165 - `scope: optional BetaFileScope or null`
154166 
155167 The scope of this file, indicating the context in which it was created (e.g., a session).
from line 180
168180curl https://api.anthropic.com/v1/files \
169181 -H 'Content-Type: multipart/form-data' \
170182 -H 'anthropic-version: 2023-06-01' \
171 -H 'anthropic-beta: files-api-2025-04-14' \
172183 -H "X-Api-Key: $ANTHROPIC_API_KEY" \
173184 -F 'file=@/path/to/file'
174185```
from line 195
184195 "size_bytes": 102400,
185196 "type": "file",
186197 "downloadable": false,
198 "expires_at": "2025-05-15T18:37:24.100435Z",
187199 "scope": {
188200 "id": "id",
189201 "type": "session"