v126

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-04957391.2 MB
Files

List files

Lists files belonging to the workspace of the authenticating API key.

get/files

Query parameters

limitinteger

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

Example:100

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

cursorstring

Opaque pagination cursor from a previous response.

Example:eyJjdXJzb3IiOiJvcl9maWxlXzAxMUNOaGE4aUNKY1Uxd1hOUjZxNFY4dyJ9

Opaque pagination cursor from a previous response.

workspace_idstring uuid

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

Example:a103d8b6-42f0-4e50-9a3c-bf41e2c3c1a7

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

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

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

afterstring

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

Example:or_file_011CNha8iCJcU1wXNR6q4V8w

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

after_idstring

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

Example:or_file_011CNha8iCJcU1wXNR6q4V8w

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

before_idstring

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

Example:or_file_011CNha8iCJcU1wXNR6q4V8w

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

order'asc' | 'desc'

Sort direction. Only asc is supported by OpenRouter storage.

Example:asc

Sort direction. Only asc is supported by OpenRouter storage.

Response

A page of files.

OR
OR

Example response

{
  "_shape": "openrouter",
  "cursor": null,
  "data": [],
  "first_id": null,
  "has_more": false,
  "last_id": null
}