Skip to main content
GET
List files

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Query Parameters

limit
integer

Maximum number of files to return (1–1000).

Required range: 1 <= x <= 1000
Example:

100

cursor
string

Opaque pagination cursor from a previous response.

Example:

"eyJjdXJzb3IiOiJvcl9maWxlXzAxMUNOaGE4aUNKY1Uxd1hOUjZxNFY4dyJ9"

workspace_id
string<uuid>

Workspace to scope the request to. Defaults to the caller’s default workspace.

Example:

"a103d8b6-42f0-4e50-9a3c-bf41e2c3c1a7"

provider
enum<string>

Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.

Available options:
openai,
anthropic
Example:

"openai"

after
string

OpenAI-style forward cursor: the id to list after.

Example:

"or_file_011CNha8iCJcU1wXNR6q4V8w"

after_id
string

Anthropic-style forward cursor: the id to list after.

Example:

"or_file_011CNha8iCJcU1wXNR6q4V8w"

before_id
string

Anthropic-style reverse cursor. Not supported by OpenRouter storage.

Example:

"or_file_011CNha8iCJcU1wXNR6q4V8w"

order
enum<string>

Sort direction. Only asc is supported by OpenRouter storage.

Available options:
asc,
desc
Example:

"asc"

Response

A page of files.

A page of files, in the negotiated shape.

_shape
enum<string>
required
Available options:
openrouter
cursor
string | null
required

Opaque cursor for the next page; null when there are no more results.

data
object[]
required
first_id
string | null
required
has_more
boolean
required
last_id
string | null
required