Files API

Upload supported documents or media once and refer to their file identifiers from subsequent Claude API requests.

Reuse identifiers deliberately

Upload an approved test document and retain the returned identifier with its version and owner. Reference the file in multiple requests without sending its bytes each time. Check which file types, content blocks and endpoints support your intended use.

Track the file lifecycle

Treat uploaded files as remote copies of project data. Decide what gets uploaded, who may refer to a file identifier and when the file should be deleted. Include a test that replaces a document with a new version and verifies that the application uses the updated identifier.

Source documentation

Official Claude documentation