latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-191441,1001.9 MB

0042750ea1ee

Upload File

post/v1/files

Headers

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.

expires_atstring date-time nullable

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.

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",
  "expires_at": "2025-05-15T18:37:24.100435Z",
  "filename": "document.pdf",
  "id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mime_type": "application/pdf",
  "size_bytes": 102400
}