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"