Skip to main content
Portkey supports Anthropicโ€™s Files API (beta), enabling you to upload, list, retrieve, and delete files through the gateway. Uploaded files can be referenced in chat completions using file_id instead of re-uploading content each request.
The Files API is in beta and requires the files-api-2025-04-14 beta header. Portkey sets this automatically for file endpoints when using the SDK. For cURL requests, include the anthropic-beta: files-api-2025-04-14 header.

Upload a file

Use uploaded files in chat completions

Once a file is uploaded, reference it by file_id in your chat completions requests:
When using the SDK, the anthropic-beta header is set automatically for file endpoints. For chat completions with file references via cURL, include anthropic-beta: files-api-2025-04-14 in your request headers.

List files

Get file

Delete file

Supported file types

Anthropicโ€™s Files API supports the following file types:

Limitations

  • The Files API is only available on direct Anthropic API โ€” it is not supported on Bedrock or Vertex AI
  • Files API is currently in beta and requires the files-api-2025-04-14 beta header for cURL requests
  • Refer to Anthropicโ€™s documentation for the latest file size and rate limits
Last modified on July 28, 2026