Get file metadata
Changed onRetrieves metadata for a single file owned by the requesting workspace.
Request
- Base URL: https://openrouter.ai/api/v1
- URL: https://openrouter.ai/api/v1/files/{file_id}
- Auth: HTTP bearer
Path parameters
Query parameters
Workspace to scope the request to. Defaults to the caller’s default workspace.
Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
Response
The file metadata.
Example response
{
"_shape": "openrouter",
"created_at": "2025-01-01T00:00:00Z",
"downloadable": false,
"filename": "document.pdf",
"id": "or_file_011CNha8iCJcU1wXNR6q4V8w",
"mime_type": "application/pdf",
"size_bytes": 1024000,
"type": "file"
}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
- breaking
added to the response body
oneOflist for the response status - breaking
the response's body type changed from
objectto no type for status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - info
added the new optional
queryrequest parameterprovider - info
added response discriminator for the response status
- 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
- breaking