v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-261319281.7 MB

Upload File

post/v1/files?beta=true

Headers

anthropic-betastring

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Response

Successful Response

created_atstring date-time required

RFC 3339 datetime string representing when the file was created.

downloadableboolean

Whether the file can be downloaded.

filenamestring required

Original filename of the uploaded file.

idstring required

Unique object identifier.

The format and length of IDs may change over time.

mime_typestring required

MIME type of the file.

size_bytesinteger required

Size of the file in bytes.

type'file' required

Object type.

For files, this is always "file".

Example response

{
  "created_at": "2025-04-15T18:37:24.100435Z",
  "filename": "document.pdf",
  "id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mime_type": "application/pdf",
  "size_bytes": 102400
}