List files
Changed onLists files belonging to the workspace of the authenticating API key.
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Query parameters
Maximum number of files to return (1–1000).
Opaque pagination cursor from a previous response.
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.
OpenAI-style forward cursor: the id to list after.
Anthropic-style forward cursor: the id to list after.
Anthropic-style reverse cursor. Not supported by OpenRouter storage.
Sort direction. Only asc is supported by OpenRouter storage.
Response
A page of files.
A page of files, in the negotiated shape.
A page of files in the OpenRouter shape.
A page of files in OpenAI's shape.
A page of files in Anthropic's shape.
Example response
{
"_shape": "openrouter",
"cursor": null,
"data": [],
"first_id": null,
"has_more": false,
"last_id": null
}Changes
- 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
cursorfrom the response with the status
13 more changes in this revision
- breaking