Anthropic Files API

The Files API lets you upload and manage files for reuse across Messages, Batches, code execution, and Managed Agents without re-uploading content. 500 MB request limit; supports PDFs, images, Office documents, and plain text.

Operations 10

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/files Upload a file that expires · Upload File #
Ask an LLM
“How do I upload a file so I can reference it in later requests?”
“Can I set an uploaded file to expire after a number of seconds?”
Tell an agent
Upload {file} and expire it after {expires_in_seconds} seconds.
On the plain endpoint, upload file {file}.
GET /v1/files List uploaded files on the plain endpoint · List Files #
Ask an LLM
“Which files have I uploaded, listed without the beta query flag?”
“Can I look up several specific files by their IDs in one list call?”
Tell an agent
On the plain endpoint, list files {ids}.
List {limit} of my uploaded files per page without the beta flag.
GET /v1/files/{file_id} Get a file's metadata on the plain endpoint · Get File Metadata #
Ask an LLM
“What's the name, size and type of a file I uploaded?”
“Can I read a file's metadata without adding the beta query flag?”
Tell an agent
Get metadata for file {file_id} on the plain endpoint.
Without the beta parameter, describe uploaded file {file_id}.
DELETE /v1/files/{file_id} Delete a file on the plain endpoint · Delete File #
Ask an LLM
“How do I delete a file I uploaded, without the beta query flag?”
“Is deleting an uploaded file from /v1/files permanent?”
Tell an agent destructive · confirm first
Delete file {file_id} using the plain endpoint.
Without the beta parameter, erase uploaded file {file_id}.
GET /v1/files/{file_id}/content Download a file's content on the plain endpoint · Download File #
Ask an LLM
“How do I download the actual contents of a stored file?”
“Can I fetch file bytes from /content without the beta query flag?”
Tell an agent
Download the contents of file {file_id} on the plain endpoint.
Without the beta parameter, save file {file_id} locally.
GET /v1/files/{file_id}/content?beta=true Download a file's content via the beta flag · Download File #
Ask an LLM
“Can I download a file an agent produced through the beta files endpoint?”
“What's the beta-flag way to get a file's raw bytes?”
Tell an agent
Download beta file {file_id} content.
With the beta flag, pull the bytes of file {file_id}.
GET /v1/files/{file_id}?beta=true Get a file's metadata via the beta flag · Get File Metadata #
Ask an LLM
“How do I read a file's metadata through the beta files endpoint?”
“Does the beta flag return the same file details as the plain call?”
Tell an agent
Get beta file metadata for {file_id}.
With the beta flag, show the details of file {file_id}.
DELETE /v1/files/{file_id}?beta=true Delete a file via the beta flag · Delete File #
Ask an LLM
“Can I delete an uploaded file through the beta files endpoint?”
“What's the beta-flag call to remove a stored file?”
Tell an agent destructive · confirm first
Delete beta file {file_id}.
With the beta flag, remove file {file_id} for good.
POST /v1/files?beta=true Upload a file via the beta flag · Upload File #
Ask an LLM
“How do I upload a file with the beta files endpoint?”
“Which beta-flag call stores a new file for later use in messages?”
Tell an agent
Upload beta file {file}.
With the beta flag, store {file} for use in later requests.
GET /v1/files?beta=true List files by scope via the beta flag · List Files #
Ask an LLM
“Can I list only the files that belong to a particular scope, such as one session?”
“How do I page through files with before and after IDs using the beta flag?”
Tell an agent
List files in scope {scope_id}.
With the beta flag, list files uploaded after {after_id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/anthropic-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

anthropic-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Anthropic Files API
servers:
- url: https://api.anthropic.com
tags:


# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/anthropic/refs/heads/main/openapi/anthropic-files-api-openapi.yml