Files
Download file content
Changed onDownloads the raw bytes of a file. Only files created server-side are downloadable; uploaded files return 400.
get/files/{file_id}/content
Request
- Base URL: https://openrouter.ai/api/v1
- URL: https://openrouter.ai/api/v1/files/{file_id}/content
- Auth: HTTP bearer
Path parameters
file_idstring required
Example:or_file_011CNha8iCJcU1wXNR6q4V8w
Query parameters
workspace_idstring uuid
Workspace to scope the request to. Defaults to the caller’s default workspace.
Example:a103d8b6-42f0-4e50-9a3c-bf41e2c3c1a7
provider'openai' | 'anthropic'
Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Example:openai
Response
The raw file content.
Changes
- breaking
for the
pathrequest parameterfile_id, the minLength was increased from0to1 - breaking
added the pattern
^[\w-]+$to thepathrequest parameterfile_id - warning
for the
pathrequest parameterfile_id, the maxLength was set to256
- breaking
- info
added the new optional
queryrequest parameterprovider - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info