Upload File changedapi/files/upload
Nearest release: v2.1.245, published an hour after 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+33added
Lines−14removed
From line
1
where the diff opens
First seen
20 Aug 2026
this site's first read of the page
Recorded edits7to this page, all time
# Upload File ## Body parameters (form-data) ## Returns ## Example ### Response (200) ## Upload File ### Returns ### Example #### Response
The whole hunk
from line 1, old and new numbered
/
from line 1
1---
2title: Upload File
3url: https://platform.claude.com/docs/en/api/files/upload
4---
1# Upload File
52
6## Upload File
3**POST** `/v1/files`
74
8**post** `/v1/files`
9
105Upload File
116
12### Returns
7## Body parameters (form-data)
138
14- `FileMetadata object { id, created_at, filename, 5 more }`
9- `file: string`
1510
11 The file to upload
12
13 format: binary
14
15- `expires_in_seconds: optional number`
16
17 Seconds from upload until the file expires and its bytes become permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).
18
19 minimum: 3600, maximum: 7776000
20
21## Returns
22
23- `FileMetadata object`
24
1625 - `id: string`
1726
1827 Unique object identifier.
from line 32
2332
2433 RFC 3339 datetime string representing when the file was created.
2534
35 format: date-time
36
2637 - `filename: string`
2738
2839 Original filename of the uploaded file.
2940
41 maxLength: 500, minLength: 1
42
3043 - `mime_type: string`
3144
3245 MIME type of the file.
3346
47 maxLength: 255, minLength: 1
48
3449 - `size_bytes: number`
3550
3651 Size of the file in bytes.
3752
53 minimum: 0
54
3855 - `type: "file"`
3956
4057 Object type.
from line 58
4158
4259 For files, this is always `"file"`.
4360
44 - `"file"`
45
4661 - `downloadable: optional boolean`
4762
4863 Whether the file can be downloaded.
4964
65 default: false
66
5067 - `expires_at: optional string or null`
5168
5269 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.
5370
54### Example
71 format: date-time
5572
56```http
73## Example
74
75```bash
5776curl https://api.anthropic.com/v1/files \
5877 -H 'Content-Type: multipart/form-data' \
5978 -H 'anthropic-version: 2023-06-01' \
from line 80
6180 -F 'file=@/path/to/file'
6281```
6382
64#### Response
83### Response (200)
6584
6685```json
6786{
No line in this hunk matches that.