Compare commits

...
Author SHA1 Message Date
wassnameandClaudypoo 0a691a1480 Make 400-retry integration tests deterministic (retry-then-succeed)
Addresses Copilot review: the timing-based calls>1 assertion could be flaky on
slow CI. Now the stub returns a transient 400 twice then a 200, so the retry count
is exact regardless of scheduling.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-05 09:47:16 +08:00
wassnameandClaudypoo 1901a00e9e Retry HTTP 400s that wrap a transient upstream code in error.code
OpenRouter is a passthrough for providers it does not control, and some transient
provider failures (502/503/529/...) arrive as HTTP 400 with the real status in the
JSON error.code. Retry only those; ordinary 400 invalid-request responses (including
inner error.code == 400) stay non-retryable. Reuses the existing TemporaryError/backoff.

Note: this edits generated code because retry classification here is HTTP-status only
(x-speakeasy-retries) and SDK hooks run outside the retry loop, so a 400 body cannot be
inspected via an overlay or hook. Preserving it across regen needs a genignore or upstream
Speakeasy support -- flagging for maintainers.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-07-05 09:35:55 +08:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
22803a327e chore: 🐝 Update SDK - Generate (spec change merged) 0.11.3 (#390)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-03 19:58:30 +00:00
d62640c385 chore: update OpenAPI spec from monorepo (#389)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-03 19:52:47 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
c2ae7dfde4 chore: 🐝 Update SDK - Generate (spec change merged) 0.11.2 (#388)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-03 15:09:37 +00:00
f6c5471023 chore: update OpenAPI spec from monorepo (#387)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-03 15:03:57 +00:00
Matt AppersonandGitHub ebd01743bc docs: use flat navigation.pages for multi-repo sourceRef (#386) 2026-07-01 20:25:35 -04:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
28299a788d chore: 🐝 Update SDK - Generate (spec change merged) 0.11.1 (#385)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-07-01 16:17:40 +00:00
3e57a57bc0 chore: update OpenAPI spec from monorepo (#384)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-07-01 16:11:46 +00:00
Matt AppersonandGitHub 87f0aa3a9b docs: auto-generate API Reference nav from Speakeasy service pages (#383) 2026-07-01 10:59:43 -04:00
Matt AppersonandGitHub babeffc9aa docs: Mintlify MDX docs + docs.json; bump Speakeasy to 1.787.0 (#382) 2026-06-30 16:13:28 -04:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
778e2e36fb chore: 🐝 Update SDK - Generate (spec change merged) 0.10.8 (#380)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-28 15:31:38 +00:00
14f262fa66 chore: update OpenAPI spec from monorepo (#379)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-28 15:25:57 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
10f2890d75 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.7 (#378)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 23:48:17 +00:00
ad1cfda1f4 chore: update OpenAPI spec from monorepo (#377)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 23:42:21 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
21020fb334 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.6 (#376)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 18:23:57 +00:00
a243d78d32 chore: update OpenAPI spec from monorepo (#375)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 18:17:47 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
66512fa808 chore: 🐝 Update SDK - Generate (spec change merged) 0.10.5 (#374)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 14:41:46 +00:00
7efd03fb3b chore: update OpenAPI spec from monorepo (#373)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 14:35:36 +00:00
github-actions[bot]GitHubspeakeasybotspeakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
e1b89f5aaf chore: 🐝 Update SDK - Generate (spec change merged) 0.10.4 (#372)
Co-authored-by: speakeasybot <bot@speakeasyapi.dev>
Co-authored-by: speakeasy-github[bot] <128539517+speakeasy-github[bot]@users.noreply.github.com>
2026-06-26 12:10:48 +00:00
32dd522d5a chore: update OpenAPI spec from monorepo (#371)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
2026-06-26 12:04:34 +00:00
2124 changed files with 52369 additions and 16707 deletions
+3 -1
View File
@@ -1 +1,3 @@
pylintrc pylintrc
docs/docs.json
docs/overview.mdx
+32
View File
@@ -0,0 +1,32 @@
name: Docs navigation
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
pull_request:
paths:
- "docs/sdks/**"
- "scripts/gen-docs-nav.sh"
- ".github/workflows/docs-nav.yaml"
jobs:
gen-docs-nav:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
# jq is preinstalled on GitHub-hosted ubuntu runners.
- name: Regenerate docs navigation
run: scripts/gen-docs-nav.sh
- name: Auto-commit docs.json navigation
uses: int128/update-generated-files-action@v2
with:
commit-message: "Chore: regenerate docs navigation"
-1
View File
@@ -16,7 +16,6 @@ __pycache__/
# Speakeasy generation artifacts (generated in OSS repo, not here) # Speakeasy generation artifacts (generated in OSS repo, not here)
.speakeasy/*.lock .speakeasy/*.lock
.speakeasy/*.openapi.yaml .speakeasy/*.openapi.yaml
/docs
# Environment # Environment
.env .env
.env.local .env.local
+7248 -7162
View File
File diff suppressed because it is too large Load Diff
+19 -1
View File
@@ -16,6 +16,8 @@ generation:
requestResponseComponentNamesFeb2024: true requestResponseComponentNamesFeb2024: true
securityFeb2025: true securityFeb2025: true
sharedErrorComponentsApr2025: true sharedErrorComponentsApr2025: true
sharedNestedComponentsJan2026: false
nameOverrideFeb2026: false
auth: auth:
oAuth2ClientCredentialsEnabled: true oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true oAuth2PasswordEnabled: true
@@ -25,14 +27,16 @@ generation:
schemas: schemas:
allOfMergeStrategy: shallowMerge allOfMergeStrategy: shallowMerge
requestBodyFieldName: "" requestBodyFieldName: ""
versioningStrategy: automatic
persistentEdits: {} persistentEdits: {}
tests: tests:
generateTests: false generateTests: false
generateNewTests: true generateNewTests: true
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
documentation: mintlify
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.10.3 version: 0.11.3
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
@@ -46,6 +50,7 @@ python:
authors: authors:
- OpenRouter - OpenRouter
baseErrorName: OpenRouterError baseErrorName: OpenRouterError
bodyVariantOverloads: false
clientServerStatusCodesAsErrors: true clientServerStatusCodesAsErrors: true
constFieldCasing: upper constFieldCasing: upper
defaultErrorName: OpenRouterDefaultError defaultErrorName: OpenRouterDefaultError
@@ -53,12 +58,18 @@ python:
enableCustomCodeRegions: false enableCustomCodeRegions: false
enumFormat: union enumFormat: union
envVarPrefix: OPENROUTER envVarPrefix: OPENROUTER
errorSchemaValidation: true
eventStreamClassNames:
async: EventStreamAsync
sync: EventStream
fixFlags: fixFlags:
asyncPaginationSep2025: true asyncPaginationSep2025: true
conflictResistantModelImportsFeb2026: false
responseRequiredSep2024: true responseRequiredSep2024: true
flattenGlobalSecurity: true flattenGlobalSecurity: true
flattenRequests: true flattenRequests: true
flatteningOrder: parameters-first flatteningOrder: parameters-first
forwardCompatibleEnumsByDefault: false
forwardCompatibleUnionsByDefault: tagged-only forwardCompatibleUnionsByDefault: tagged-only
imports: imports:
option: openapi option: openapi
@@ -71,18 +82,25 @@ python:
inferSSEOverload: true inferSSEOverload: true
inferUnionDiscriminators: true inferUnionDiscriminators: true
inputModelSuffix: input inputModelSuffix: input
inputTypedDictSuffix: TypedDict
legacyPyright: false legacyPyright: false
license: Apache-2.0 license: Apache-2.0
maxMethodParams: 999 maxMethodParams: 999
methodArguments: infer-optional-args methodArguments: infer-optional-args
methodTimeoutArgument: timeout-ms
methodTimeoutUnits: milliseconds
moduleName: "" moduleName: ""
multipartArrayFormat: legacy multipartArrayFormat: legacy
optionalDependencies: {}
outputModelSuffix: output outputModelSuffix: output
packageManager: uv packageManager: uv
packageName: openrouter packageName: openrouter
preApplyUnionDiscriminators: false preApplyUnionDiscriminators: false
pytestFilterWarnings: [] pytestFilterWarnings: []
pytestTimeout: 0 pytestTimeout: 0
rawResponseHelpers: false
responseFormat: flat responseFormat: flat
responseSchemaValidation: true
sseFlatResponse: true sseFlatResponse: true
templateVersion: v2 templateVersion: v2
useAsyncHooks: false
+260 -10
View File
@@ -4043,6 +4043,7 @@ components:
- perplexity - perplexity
- phala - phala
- poolside - poolside
- quiver
- recraft - recraft
- reka - reka
- relace - relace
@@ -4269,11 +4270,15 @@ components:
image_url: image_url:
properties: properties:
detail: detail:
description: Image detail level for vision models description: >-
Image detail level for vision models. `original` is an OpenRouter extension (not in the OpenAI Chat
Completions spec) requesting true original-resolution media; it is downgraded to `high` for providers
that lack an original-resolution tier.
enum: enum:
- auto - auto
- low - low
- high - high
- original
type: string type: string
url: url:
description: 'URL of the image (data: URLs supported)' description: 'URL of the image (data: URLs supported)'
@@ -4531,6 +4536,7 @@ components:
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter' - $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
- $ref: '#/components/schemas/BashServerTool' - $ref: '#/components/schemas/BashServerTool'
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/FilesServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool' - $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter' - $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
@@ -7579,6 +7585,28 @@ components:
- type - type
- vector_store_ids - vector_store_ids
type: object type: object
FilesServerTool:
description: >-
OpenRouter built-in server tool: read, write, edit, and list workspace files via the Files API. Requires the
`x-openrouter-file-ids: openrouter` request header.
example:
parameters: {}
type: openrouter:files
properties:
parameters:
$ref: '#/components/schemas/FilesServerToolConfig'
type:
enum:
- openrouter:files
type: string
required:
- type
type: object
FilesServerToolConfig:
description: Configuration for the openrouter:files server tool
example: {}
properties: {}
type: object
ForbiddenResponse: ForbiddenResponse:
description: Forbidden - Authentication successful but insufficient permissions description: Forbidden - Authentication successful but insufficient permissions
example: example:
@@ -8404,6 +8432,22 @@ components:
maxItems: 8 maxItems: 8
type: array type: array
type: object type: object
FusionSource:
description: A web page retrieved via web search during a fusion run.
example:
title: Example article title
url: https://example.com/article
properties:
title:
description: Title of the retrieved web page.
type: string
url:
description: URL of the web page a panel or the judge retrieved during the run.
type: string
required:
- url
- title
type: object
GenerationContentData: GenerationContentData:
description: Stored prompt and completion content description: Stored prompt and completion content
example: example:
@@ -9315,6 +9359,12 @@ components:
created: created:
description: Unix timestamp (seconds) when the image was generated description: Unix timestamp (seconds) when the image was generated
type: integer type: integer
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for
non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
type: type:
description: The event type description: The event type
enum: enum:
@@ -9387,11 +9437,14 @@ components:
example: 100 example: 100
type: integer type: integer
output_format: output_format:
description: Encoding of the returned image bytes. description: >-
Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported
by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
enum: enum:
- png - png
- jpeg - jpeg
- webp - webp
- svg
example: png example: png
type: string type: string
prompt: prompt:
@@ -9474,6 +9527,12 @@ components:
b64_json: b64_json:
description: Base64-encoded image bytes description: Base64-encoded image bytes
type: string type: string
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG).
Present for non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
required: required:
- b64_json - b64_json
type: object type: object
@@ -10291,6 +10350,7 @@ components:
- $ref: '#/components/schemas/OutputFusionServerToolItem' - $ref: '#/components/schemas/OutputFusionServerToolItem'
- $ref: '#/components/schemas/OutputAdvisorServerToolItem' - $ref: '#/components/schemas/OutputAdvisorServerToolItem'
- $ref: '#/components/schemas/OutputSubagentServerToolItem' - $ref: '#/components/schemas/OutputSubagentServerToolItem'
- $ref: '#/components/schemas/OutputFilesServerToolItem'
- $ref: '#/components/schemas/LocalShellCallItem' - $ref: '#/components/schemas/LocalShellCallItem'
- $ref: '#/components/schemas/LocalShellCallOutputItem' - $ref: '#/components/schemas/LocalShellCallOutputItem'
- $ref: '#/components/schemas/ShellCallItem' - $ref: '#/components/schemas/ShellCallItem'
@@ -10865,6 +10925,29 @@ components:
required: required:
- data - data
type: object type: object
ListWorkspaceMembersResponse:
example:
data:
- created_at: '2025-08-24T10:30:00Z'
id: 660e8400-e29b-41d4-a716-446655440000
role: member
user_id: user_abc123
workspace_id: 550e8400-e29b-41d4-a716-446655440000
total_count: 1
properties:
data:
description: List of workspace members
items:
$ref: '#/components/schemas/WorkspaceMember'
type: array
total_count:
description: Total number of members in the workspace
example: 5
type: integer
required:
- data
- total_count
type: object
ListWorkspacesResponse: ListWorkspacesResponse:
example: example:
data: data:
@@ -12523,6 +12606,7 @@ components:
- Venice - Venice
- Wafer - Wafer
- WandB - WandB
- Quiver
- Xiaomi - Xiaomi
- xAI - xAI
- Z.AI - Z.AI
@@ -16213,6 +16297,43 @@ components:
- status - status
- type - type
type: object type: object
OutputFilesServerToolItem:
description: An openrouter:files server tool output item
example:
filename: notes.txt
id: fl_tmp_abc123
operation: read
result: '{"id":"file_abc","filename":"notes.txt","content":"hello"}'
status: completed
type: openrouter:files
properties:
error:
description: Error message when the file operation failed.
type: string
file_id:
description: The target file id supplied in the tool-call arguments.
type: string
filename:
description: The target filename supplied in the tool-call arguments.
type: string
id:
type: string
operation:
description: The file operation performed (list, read, write, or edit).
type: string
result:
description: JSON-serialized result of the file operation.
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:files
type: string
required:
- status
- type
type: object
OutputFunctionCallItem: OutputFunctionCallItem:
allOf: allOf:
- $ref: '#/components/schemas/OutputItemFunctionCall' - $ref: '#/components/schemas/OutputItemFunctionCall'
@@ -16278,6 +16399,13 @@ components:
- model - model
type: object type: object
type: array type: array
sources:
description: >-
Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL
across the whole run. Present when at least one model cited a source.
items:
$ref: '#/components/schemas/FusionSource'
type: array
status: status:
$ref: '#/components/schemas/ToolCallStatus' $ref: '#/components/schemas/ToolCallStatus'
type: type:
@@ -16658,6 +16786,7 @@ components:
openrouter:datetime: '#/components/schemas/OutputDatetimeItem' openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem' openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem'
openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem' openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
openrouter:files: '#/components/schemas/OutputFilesServerToolItem'
openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem' openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem'
openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem' openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem' openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
@@ -16709,6 +16838,7 @@ components:
- $ref: '#/components/schemas/OutputFusionServerToolItem' - $ref: '#/components/schemas/OutputFusionServerToolItem'
- $ref: '#/components/schemas/OutputAdvisorServerToolItem' - $ref: '#/components/schemas/OutputAdvisorServerToolItem'
- $ref: '#/components/schemas/OutputSubagentServerToolItem' - $ref: '#/components/schemas/OutputSubagentServerToolItem'
- $ref: '#/components/schemas/OutputFilesServerToolItem'
- $ref: '#/components/schemas/OutputCustomToolCallItem' - $ref: '#/components/schemas/OutputCustomToolCallItem'
OutputItemWebSearchCall: OutputItemWebSearchCall:
example: example:
@@ -17934,6 +18064,7 @@ components:
- Venice - Venice
- Wafer - Wafer
- WandB - WandB
- Quiver
- Xiaomi - Xiaomi
- xAI - xAI
- Z.AI - Z.AI
@@ -18308,6 +18439,10 @@ components:
additionalProperties: additionalProperties:
nullable: true nullable: true
type: object type: object
quiver:
additionalProperties:
nullable: true
type: object
recraft: recraft:
additionalProperties: additionalProperties:
nullable: true nullable: true
@@ -18748,6 +18883,7 @@ components:
- Venice - Venice
- Wafer - Wafer
- WandB - WandB
- Quiver
- Xiaomi - Xiaomi
- xAI - xAI
- Z.AI - Z.AI
@@ -19823,6 +19959,7 @@ components:
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter' - $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter' - $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/FilesServerTool'
- $ref: '#/components/schemas/FusionServerTool_OpenRouter' - $ref: '#/components/schemas/FusionServerTool_OpenRouter'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool' - $ref: '#/components/schemas/ChatSearchModelsServerTool'
@@ -24413,6 +24550,7 @@ paths:
- perplexity - perplexity
- phala - phala
- poolside - poolside
- quiver
- recraft - recraft
- reka - reka
- relace - relace
@@ -24496,7 +24634,8 @@ paths:
description: >- description: >-
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned
in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to
scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required. scope to a different workspace. Treat the raw key as write-only; it is never returned after creation.
[Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: createBYOKKey operationId: createBYOKKey
requestBody: requestBody:
content: content:
@@ -27176,7 +27315,9 @@ paths:
- Guardrails - Guardrails
x-speakeasy-name-override: get x-speakeasy-name-override: get
patch: patch:
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: >-
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every
update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: updateGuardrail operationId: updateGuardrail
parameters: parameters:
- description: The unique identifier of the guardrail to update - description: The unique identifier of the guardrail to update
@@ -27370,8 +27511,8 @@ paths:
type: offsetLimit type: offsetLimit
post: post:
description: >- description: >-
Assign multiple API keys to a specific guardrail. [Management Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any
key](/docs/guides/overview/auth/management-api-keys) required. existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: bulkAssignKeysToGuardrail operationId: bulkAssignKeysToGuardrail
parameters: parameters:
- description: The unique identifier of the guardrail - description: The unique identifier of the guardrail
@@ -28723,7 +28864,8 @@ paths:
x-speakeasy-name-override: list x-speakeasy-name-override: list
post: post:
description: >- description: >-
Create a new API key for the authenticated user. [Management Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it
as a write-only, sensitive value; it cannot be retrieved later. [Management
key](/docs/guides/overview/auth/management-api-keys) required. key](/docs/guides/overview/auth/management-api-keys) required.
operationId: createKeys operationId: createKeys
requestBody: requestBody:
@@ -33139,12 +33281,14 @@ paths:
responses: responses:
'200': '200':
content: content:
application/octet-stream: video/mp4:
example: <binary video data> example: <binary video data>
schema: schema:
format: binary format: binary
type: string type: string
description: Video content stream description: >-
Video content stream. The body is the raw video bytes proxied from the upstream provider, and the
Content-Type reflects the provider media type (video/mp4).
'400': '400':
content: content:
application/json: application/json:
@@ -33433,7 +33577,7 @@ paths:
delete: delete:
description: >- description: >-
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be
deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: deleteWorkspace operationId: deleteWorkspace
parameters: parameters:
- description: The workspace ID (UUID) or slug - description: The workspace ID (UUID) or slug
@@ -33902,6 +34046,112 @@ paths:
tags: tags:
- Workspaces - Workspaces
x-speakeasy-name-override: setBudget x-speakeasy-name-override: setBudget
/workspaces/{id}/members:
get:
description: >-
List all members of a workspace. Returns paginated results. For the default workspace, returns all organization
members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: listWorkspaceMembers
parameters:
- description: The workspace ID (UUID) or slug
in: path
name: id
required: true
schema:
description: The workspace ID (UUID) or slug
example: production
minLength: 1
type: string
- description: Number of records to skip for pagination
in: query
name: offset
required: false
schema:
description: Number of records to skip for pagination
example: 0
minimum: 0
nullable: true
type: integer
- description: Maximum number of records to return (max 100)
in: query
name: limit
required: false
schema:
description: Maximum number of records to return (max 100)
example: 50
maximum: 100
minimum: 1
type: integer
responses:
'200':
content:
application/json:
example:
data:
- created_at: '2025-08-24T10:30:00Z'
id: 660e8400-e29b-41d4-a716-446655440000
role: member
user_id: user_abc123
workspace_id: 550e8400-e29b-41d4-a716-446655440000
total_count: 1
schema:
$ref: '#/components/schemas/ListWorkspaceMembersResponse'
description: List of workspace members
'401':
content:
application/json:
example:
error:
code: 401
message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
'403':
content:
application/json:
example:
error:
code: 403
message: Only management keys can perform this operation
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: Forbidden - Authentication successful but insufficient permissions
'404':
content:
application/json:
example:
error:
code: 404
message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found - Resource does not exist
'500':
content:
application/json:
example:
error:
code: 500
message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
summary: List workspace members
tags:
- Workspaces
x-speakeasy-name-override: listMembers
x-speakeasy-pagination:
inputs:
- in: parameters
name: offset
type: offset
- in: parameters
name: limit
type: limit
outputs:
results: $.data
type: offsetLimit
/workspaces/{id}/members/add: /workspaces/{id}/members/add:
post: post:
description: >- description: >-
+251 -9
View File
@@ -4039,6 +4039,7 @@ components:
- perplexity - perplexity
- phala - phala
- poolside - poolside
- quiver
- recraft - recraft
- reka - reka
- relace - relace
@@ -4266,11 +4267,13 @@ components:
image_url: image_url:
properties: properties:
detail: detail:
description: Image detail level for vision models description: >-
Image detail level for vision models. `original` is an OpenRouter extension (not in the OpenAI Chat Completions spec) requesting true original-resolution media; it is downgraded to `high` for providers that lack an original-resolution tier.
enum: enum:
- auto - auto
- low - low
- high - high
- original
type: string type: string
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
url: url:
@@ -4529,6 +4532,7 @@ components:
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter' - $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
- $ref: '#/components/schemas/BashServerTool' - $ref: '#/components/schemas/BashServerTool'
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/FilesServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool' - $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter' - $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
@@ -7552,6 +7556,27 @@ components:
- type - type
- vector_store_ids - vector_store_ids
type: object type: object
FilesServerTool:
description: >-
OpenRouter built-in server tool: read, write, edit, and list workspace files via the Files API. Requires the `x-openrouter-file-ids: openrouter` request header.
example:
parameters: {}
type: openrouter:files
properties:
parameters:
$ref: '#/components/schemas/FilesServerToolConfig'
type:
enum:
- openrouter:files
type: string
required:
- type
type: object
FilesServerToolConfig:
description: Configuration for the openrouter:files server tool
example: {}
properties: {}
type: object
ForbiddenResponse: ForbiddenResponse:
description: Forbidden - Authentication successful but insufficient permissions description: Forbidden - Authentication successful but insufficient permissions
example: example:
@@ -8355,6 +8380,22 @@ components:
maxItems: 8 maxItems: 8
type: array type: array
type: object type: object
FusionSource:
description: A web page retrieved via web search during a fusion run.
example:
title: Example article title
url: https://example.com/article
properties:
title:
description: Title of the retrieved web page.
type: string
url:
description: URL of the web page a panel or the judge retrieved during the run.
type: string
required:
- url
- title
type: object
GenerationContentData: GenerationContentData:
description: Stored prompt and completion content description: Stored prompt and completion content
example: example:
@@ -9262,6 +9303,11 @@ components:
created: created:
description: Unix timestamp (seconds) when the image was generated description: Unix timestamp (seconds) when the image was generated
type: integer type: integer
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
type: type:
description: The event type description: The event type
enum: enum:
@@ -9336,11 +9382,13 @@ components:
example: 100 example: 100
type: integer type: integer
output_format: output_format:
description: Encoding of the returned image bytes. description: >-
Encoding of the returned image bytes. Most models produce raster formats (png, jpeg, webp). SVG is supported by vectorization models (e.g. Quiver) — the SVG markup is UTF-8 base64-encoded in `b64_json`.
enum: enum:
- png - png
- jpeg - jpeg
- webp - webp
- svg
example: png example: png
type: string type: string
x-speakeasy-unknown-values: allow x-speakeasy-unknown-values: allow
@@ -9420,6 +9468,11 @@ components:
b64_json: b64_json:
description: Base64-encoded image bytes description: Base64-encoded image bytes
type: string type: string
media_type:
description: >-
Media type (MIME type) of the image. Omitted when the output is a standard raster format (PNG). Present for non-raster outputs such as SVG (`image/svg+xml`).
example: image/svg+xml
type: string
required: required:
- b64_json - b64_json
type: object type: object
@@ -10246,6 +10299,7 @@ components:
- $ref: '#/components/schemas/OutputFusionServerToolItem' - $ref: '#/components/schemas/OutputFusionServerToolItem'
- $ref: '#/components/schemas/OutputAdvisorServerToolItem' - $ref: '#/components/schemas/OutputAdvisorServerToolItem'
- $ref: '#/components/schemas/OutputSubagentServerToolItem' - $ref: '#/components/schemas/OutputSubagentServerToolItem'
- $ref: '#/components/schemas/OutputFilesServerToolItem'
- $ref: '#/components/schemas/LocalShellCallItem' - $ref: '#/components/schemas/LocalShellCallItem'
- $ref: '#/components/schemas/LocalShellCallOutputItem' - $ref: '#/components/schemas/LocalShellCallOutputItem'
- $ref: '#/components/schemas/ShellCallItem' - $ref: '#/components/schemas/ShellCallItem'
@@ -10819,6 +10873,29 @@ components:
required: required:
- data - data
type: object type: object
ListWorkspaceMembersResponse:
example:
data:
- created_at: '2025-08-24T10:30:00Z'
id: 660e8400-e29b-41d4-a716-446655440000
role: member
user_id: user_abc123
workspace_id: 550e8400-e29b-41d4-a716-446655440000
total_count: 1
properties:
data:
description: List of workspace members
items:
$ref: '#/components/schemas/WorkspaceMember'
type: array
total_count:
description: Total number of members in the workspace
example: 5
type: integer
required:
- data
- total_count
type: object
ListWorkspacesResponse: ListWorkspacesResponse:
example: example:
data: data:
@@ -12468,6 +12545,7 @@ components:
- Venice - Venice
- Wafer - Wafer
- WandB - WandB
- Quiver
- Xiaomi - Xiaomi
- xAI - xAI
- Z.AI - Z.AI
@@ -16137,6 +16215,43 @@ components:
- status - status
- type - type
type: object type: object
OutputFilesServerToolItem:
description: An openrouter:files server tool output item
example:
filename: notes.txt
id: fl_tmp_abc123
operation: read
result: '{"id":"file_abc","filename":"notes.txt","content":"hello"}'
status: completed
type: openrouter:files
properties:
error:
description: Error message when the file operation failed.
type: string
file_id:
description: The target file id supplied in the tool-call arguments.
type: string
filename:
description: The target filename supplied in the tool-call arguments.
type: string
id:
type: string
operation:
description: The file operation performed (list, read, write, or edit).
type: string
result:
description: JSON-serialized result of the file operation.
type: string
status:
$ref: '#/components/schemas/ToolCallStatus'
type:
enum:
- openrouter:files
type: string
required:
- status
- type
type: object
OutputFunctionCallItem: OutputFunctionCallItem:
allOf: allOf:
- $ref: '#/components/schemas/OutputItemFunctionCall' - $ref: '#/components/schemas/OutputItemFunctionCall'
@@ -16198,6 +16313,12 @@ components:
- model - model
type: object type: object
type: array type: array
sources:
description: >-
Web pages the analysis panels and judge retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.
items:
$ref: '#/components/schemas/FusionSource'
type: array
status: status:
$ref: '#/components/schemas/ToolCallStatus' $ref: '#/components/schemas/ToolCallStatus'
type: type:
@@ -16579,6 +16700,7 @@ components:
openrouter:datetime: '#/components/schemas/OutputDatetimeItem' openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem' openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem'
openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem' openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
openrouter:files: '#/components/schemas/OutputFilesServerToolItem'
openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem' openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem'
openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem' openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem' openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
@@ -16630,6 +16752,7 @@ components:
- $ref: '#/components/schemas/OutputFusionServerToolItem' - $ref: '#/components/schemas/OutputFusionServerToolItem'
- $ref: '#/components/schemas/OutputAdvisorServerToolItem' - $ref: '#/components/schemas/OutputAdvisorServerToolItem'
- $ref: '#/components/schemas/OutputSubagentServerToolItem' - $ref: '#/components/schemas/OutputSubagentServerToolItem'
- $ref: '#/components/schemas/OutputFilesServerToolItem'
- $ref: '#/components/schemas/OutputCustomToolCallItem' - $ref: '#/components/schemas/OutputCustomToolCallItem'
OutputItemWebSearchCall: OutputItemWebSearchCall:
example: example:
@@ -17843,6 +17966,7 @@ components:
- Venice - Venice
- Wafer - Wafer
- WandB - WandB
- Quiver
- Xiaomi - Xiaomi
- xAI - xAI
- Z.AI - Z.AI
@@ -18217,6 +18341,10 @@ components:
additionalProperties: additionalProperties:
nullable: true nullable: true
type: object type: object
quiver:
additionalProperties:
nullable: true
type: object
recraft: recraft:
additionalProperties: additionalProperties:
nullable: true nullable: true
@@ -18648,6 +18776,7 @@ components:
- Venice - Venice
- Wafer - Wafer
- WandB - WandB
- Quiver
- Xiaomi - Xiaomi
- xAI - xAI
- Z.AI - Z.AI
@@ -19711,6 +19840,7 @@ components:
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter' - $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter' - $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/FilesServerTool'
- $ref: '#/components/schemas/FusionServerTool_OpenRouter' - $ref: '#/components/schemas/FusionServerTool_OpenRouter'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter' - $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool' - $ref: '#/components/schemas/ChatSearchModelsServerTool'
@@ -24248,6 +24378,7 @@ paths:
- perplexity - perplexity
- phala - phala
- poolside - poolside
- quiver
- recraft - recraft
- reka - reka
- relace - relace
@@ -24330,7 +24461,7 @@ paths:
type: offsetLimit type: offsetLimit
post: post:
description: >- description: >-
Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. Treat the raw key as write-only; it is never returned after creation. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: createBYOKKey operationId: createBYOKKey
requestBody: requestBody:
content: content:
@@ -27038,7 +27169,8 @@ paths:
- Guardrails - Guardrails
x-speakeasy-name-override: get x-speakeasy-name-override: get
patch: patch:
description: Update an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. description: >-
Update an existing guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: updateGuardrail operationId: updateGuardrail
parameters: parameters:
- description: The unique identifier of the guardrail to update - description: The unique identifier of the guardrail to update
@@ -27235,7 +27367,7 @@ paths:
type: offsetLimit type: offsetLimit
post: post:
description: >- description: >-
Assign multiple API keys to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required. Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: bulkAssignKeysToGuardrail operationId: bulkAssignKeysToGuardrail
parameters: parameters:
- description: The unique identifier of the guardrail - description: The unique identifier of the guardrail
@@ -28616,7 +28748,7 @@ paths:
x-speakeasy-name-override: list x-speakeasy-name-override: list
post: post:
description: >- description: >-
Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required. Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it as a write-only, sensitive value; it cannot be retrieved later. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: createKeys operationId: createKeys
requestBody: requestBody:
content: content:
@@ -33058,12 +33190,13 @@ paths:
responses: responses:
'200': '200':
content: content:
application/octet-stream: video/mp4:
example: <binary video data> example: <binary video data>
schema: schema:
format: binary format: binary
type: string type: string
description: Video content stream description: >-
Video content stream. The body is the raw video bytes proxied from the upstream provider, and the Content-Type reflects the provider media type (video/mp4).
'400': '400':
content: content:
application/json: application/json:
@@ -33361,7 +33494,7 @@ paths:
/workspaces/{id}: /workspaces/{id}:
delete: delete:
description: >- description: >-
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required. Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: deleteWorkspace operationId: deleteWorkspace
parameters: parameters:
- description: The workspace ID (UUID) or slug - description: The workspace ID (UUID) or slug
@@ -33837,6 +33970,115 @@ paths:
- $ref: "#/components/parameters/AppIdentifier" - $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName" - $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories" - $ref: "#/components/parameters/AppCategories"
/workspaces/{id}/members:
get:
description: >-
List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
operationId: listWorkspaceMembers
parameters:
- description: The workspace ID (UUID) or slug
in: path
name: id
required: true
schema:
description: The workspace ID (UUID) or slug
example: production
minLength: 1
type: string
- description: Number of records to skip for pagination
in: query
name: offset
required: false
schema:
description: Number of records to skip for pagination
example: 0
minimum: 0
nullable: false
type: integer
- description: Maximum number of records to return (max 100)
in: query
name: limit
required: false
schema:
description: Maximum number of records to return (max 100)
example: 50
maximum: 100
minimum: 1
type: integer
responses:
'200':
content:
application/json:
example:
data:
- created_at: '2025-08-24T10:30:00Z'
id: 660e8400-e29b-41d4-a716-446655440000
role: member
user_id: user_abc123
workspace_id: 550e8400-e29b-41d4-a716-446655440000
total_count: 1
schema:
$ref: '#/components/schemas/ListWorkspaceMembersResponse'
description: List of workspace members
'401':
content:
application/json:
example:
error:
code: 401
message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
'403':
content:
application/json:
example:
error:
code: 403
message: Only management keys can perform this operation
schema:
$ref: '#/components/schemas/ForbiddenResponse'
description: Forbidden - Authentication successful but insufficient permissions
'404':
content:
application/json:
example:
error:
code: 404
message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found - Resource does not exist
'500':
content:
application/json:
example:
error:
code: 500
message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
summary: List workspace members
tags:
- Workspaces
x-speakeasy-name-override: listMembers
x-speakeasy-pagination:
inputs:
- in: parameters
name: offset
type: offset
- in: parameters
name: limit
type: limit
outputs:
results: $.data
type: offsetLimit
parameters:
- $ref: "#/components/parameters/AppIdentifier"
- $ref: "#/components/parameters/AppDisplayName"
- $ref: "#/components/parameters/AppCategories"
/workspaces/{id}/members/add: /workspaces/{id}/members/add:
post: post:
description: >- description: >-
+7 -8
View File
@@ -1,24 +1,23 @@
speakeasyVersion: 1.680.0 speakeasyVersion: 1.787.0
sources: sources:
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:5098eeb57496c3b506b3c940ffb9052507f9f0cde147c3d63cc264c89a774ccd sourceRevisionDigest: sha256:5381277309ba2f3a4a3e0719b00425be3f93c3103717316e6625bd5caf15b277
sourceBlobDigest: sha256:4b2c8f3e76ec1b55d75c75bfb3636ed8d7a3bcea6cdbcb3dc5dabb5a21ba8766 sourceBlobDigest: sha256:def8d29511aca594e11c3367b7013a64c8733cc8050e23deae98d9cc5df55c93
tags: tags:
- latest - latest
- speakeasy-sdk-regen-1782432971
- 1.0.0 - 1.0.0
targets: targets:
open-router: open-router:
source: OpenRouter API source: OpenRouter API
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:5098eeb57496c3b506b3c940ffb9052507f9f0cde147c3d63cc264c89a774ccd sourceRevisionDigest: sha256:5381277309ba2f3a4a3e0719b00425be3f93c3103717316e6625bd5caf15b277
sourceBlobDigest: sha256:4b2c8f3e76ec1b55d75c75bfb3636ed8d7a3bcea6cdbcb3dc5dabb5a21ba8766 sourceBlobDigest: sha256:def8d29511aca594e11c3367b7013a64c8733cc8050e23deae98d9cc5df55c93
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:a696107bd47df00518c4564d36d1225f22eb306eedd89809baa53b7a0012fe3e codeSamplesRevisionDigest: sha256:18d6fc594c9338480cbc65842c3f276ad0a58f2ceda311aff3d70ea33dbd6e6d
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.680.0 speakeasyVersion: 1.787.0
sources: sources:
OpenRouter API: OpenRouter API:
inputs: inputs:
+1 -1
View File
@@ -1,5 +1,5 @@
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.680.0 speakeasyVersion: 1.787.0
sources: sources:
OpenRouter API: OpenRouter API:
inputs: inputs:
+1 -1
View File
@@ -55,7 +55,7 @@ It's also possible to write a standalone Python script without needing to set up
```python ```python
#!/usr/bin/env -S uv run --script #!/usr/bin/env -S uv run --script
# /// script # /// script
# requires-python = ">=3.9" # requires-python = ">=3.10"
# dependencies = [ # dependencies = [
# "openrouter", # "openrouter",
# ] # ]
+1 -1
View File
@@ -55,7 +55,7 @@ It's also possible to write a standalone Python script without needing to set up
```python ```python
#!/usr/bin/env -S uv run --script #!/usr/bin/env -S uv run --script
# /// script # /// script
# requires-python = ">=3.9" # requires-python = ">=3.10"
# dependencies = [ # dependencies = [
# "openrouter", # "openrouter",
# ] # ]
+81 -1
View File
@@ -58,4 +58,84 @@ Based on:
### Generated ### Generated
- [python v0.10.3] . - [python v0.10.3] .
### Releases ### Releases
- [PyPI v0.10.3] https://pypi.org/project/openrouter/0.10.3 - . - [PyPI v0.10.3] https://pypi.org/project/openrouter/0.10.3 - .
## 2026-06-26 12:06:01
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.4] .
### Releases
- [PyPI v0.10.4] https://pypi.org/project/openrouter/0.10.4 - .
## 2026-06-26 14:36:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.5] .
### Releases
- [PyPI v0.10.5] https://pypi.org/project/openrouter/0.10.5 - .
## 2026-06-26 18:19:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.6] .
### Releases
- [PyPI v0.10.6] https://pypi.org/project/openrouter/0.10.6 - .
## 2026-06-26 23:43:40
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.7] .
### Releases
- [PyPI v0.10.7] https://pypi.org/project/openrouter/0.10.7 - .
## 2026-06-28 15:27:21
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.680.0 (2.788.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.8] .
### Releases
- [PyPI v0.10.8] https://pypi.org/project/openrouter/0.10.8 - .
## 2026-07-01 16:13:11
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.1] .
### Releases
- [PyPI v0.11.1] https://pypi.org/project/openrouter/0.11.1 - .
## 2026-07-03 15:05:16
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.2] .
### Releases
- [PyPI v0.11.2] https://pypi.org/project/openrouter/0.11.2 - .
## 2026-07-03 19:54:08
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.787.0 (2.914.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.3] .
### Releases
- [PyPI v0.11.3] https://pypi.org/project/openrouter/0.11.3 - .
+14
View File
@@ -0,0 +1,14 @@
---
title: "AABenchmarkEntry"
---
Artificial Analysis benchmark index scores.
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| `agentic_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Agentic Index score | 55.8 |
| `coding_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Coding Index score | 63.2 |
| `intelligence_index` | *Nullable[float]* | :heavy_check_mark: | Artificial Analysis Intelligence Index score | 71.4 |
+24
View File
@@ -0,0 +1,24 @@
---
title: "Action"
---
## Supported Types
### `components.OutputWebSearchCallItemActionSearch`
```python
value: components.OutputWebSearchCallItemActionSearch = /* values here */
```
### `components.ActionOpenPage`
```python
value: components.ActionOpenPage = /* values here */
```
### `components.ActionFindInPage`
```python
value: components.ActionFindInPage = /* values here */
```
+21
View File
@@ -0,0 +1,21 @@
---
title: "ActionEnum"
---
## Example Usage
```python
from openrouter.components import ActionEnum
# Open enum: unrecognized values are captured as UnrecognizedStr
value: ActionEnum = "read"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"read"`
- `"write"`
- `"delete"`
+11
View File
@@ -0,0 +1,11 @@
---
title: "ActionFindInPage"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `pattern` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.TypeFindInPage](../components/typefindinpage.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
+10
View File
@@ -0,0 +1,10 @@
---
title: "ActionOpenPage"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `type` | [components.TypeOpenPage](../components/typeopenpage.mdx) | :heavy_check_mark: | N/A |
| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
+15
View File
@@ -0,0 +1,15 @@
---
title: "ActionTypeSearch"
---
## Example Usage
```python
from openrouter.components import ActionTypeSearch
value: ActionTypeSearch = "search"
```
## Values
- `"search"`
@@ -1,5 +1,6 @@
# ActivityItem ---
title: "ActivityItem"
---
## Fields ## Fields
+9
View File
@@ -0,0 +1,9 @@
---
title: "ActivityResponse"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `data` | List[[components.ActivityItem](../components/activityitem.mdx)] | :heavy_check_mark: | List of activity items |
+14
View File
@@ -0,0 +1,14 @@
---
title: "AdvisorNestedTool"
---
A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
| `parameters` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | |
| `type` | *str* | :heavy_check_mark: | N/A | |
| `__pydantic_extra__` | Dict[str, *Nullable[Any]*] | :heavy_minus_sign: | N/A | \{<br/>"type": "openrouter:web_search"<br/>} |
+13
View File
@@ -0,0 +1,13 @@
---
title: "AdvisorReasoning"
---
Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `effort` | [Optional[components.AdvisorReasoningEffort]](../components/advisorreasoningeffort.mdx) | :heavy_minus_sign: | Reasoning effort level for the advisor call. |
| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of reasoning tokens the advisor may use. |
@@ -0,0 +1,27 @@
---
title: "AdvisorReasoningEffort"
---
Reasoning effort level for the advisor call.
## Example Usage
```python
from openrouter.components import AdvisorReasoningEffort
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AdvisorReasoningEffort = "max"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"max"`
- `"xhigh"`
- `"high"`
- `"medium"`
- `"low"`
- `"minimal"`
- `"none"`
@@ -0,0 +1,21 @@
---
title: "AdvisorServerToolConfig"
---
Configuration for one openrouter:advisor server tool entry.
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `forward_transcript` | *Optional[bool]* | :heavy_minus_sign: | When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call. | false |
| `instructions` | *Optional[str]* | :heavy_minus_sign: | System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own. | You are a senior staff engineer. Give a focused, decisive plan. |
| `max_completion_tokens` | *Optional[int]* | :heavy_minus_sign: | Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies. | 2048 |
| `max_tool_calls` | *Optional[int]* | :heavy_minus_sign: | Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools. | 5 |
| `model` | *Optional[str]* | :heavy_minus_sign: | Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model. | ~anthropic/claude-opus-latest |
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 164 chars. | reviewer |
| `reasoning` | [Optional[components.AdvisorReasoning]](../components/advisorreasoning.mdx) | :heavy_minus_sign: | Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking. | \{<br/>"effort": "high"<br/>} |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result. | false |
| `temperature` | *Optional[float]* | :heavy_minus_sign: | Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies. | 0.7 |
| `tools` | List[[components.AdvisorNestedTool](../components/advisornestedtool.mdx)] | :heavy_minus_sign: | Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself. | |
@@ -0,0 +1,13 @@
---
title: "AdvisorServerToolOpenRouter"
---
OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `parameters` | [Optional[components.AdvisorServerToolConfig]](../components/advisorservertoolconfig.mdx) | :heavy_minus_sign: | Configuration for one openrouter:advisor server tool entry. | \{<br/>"model": "~anthropic/claude-opus-latest",<br/>"name": "reviewer"<br/>} |
| `type` | [components.AdvisorServerToolOpenRouterType](../components/advisorservertoolopenroutertype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AdvisorServerToolOpenRouterType"
---
## Example Usage
```python
from openrouter.components import AdvisorServerToolOpenRouterType
value: AdvisorServerToolOpenRouterType = "openrouter:advisor"
```
## Values
- `"openrouter:advisor"`
+10
View File
@@ -0,0 +1,10 @@
---
title: "AllowedTools"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `read_only` | *Optional[bool]* | :heavy_minus_sign: | N/A |
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
+24
View File
@@ -0,0 +1,24 @@
---
title: "AllowedToolsUnion"
---
## Supported Types
### `List[str]`
```python
value: List[str] = /* values here */
```
### `components.AllowedTools`
```python
value: components.AllowedTools = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
+9
View File
@@ -0,0 +1,9 @@
---
title: "Always"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
+18
View File
@@ -0,0 +1,18 @@
---
title: "AnnotationAddedEvent"
---
Event emitted when a text annotation is added to output
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `annotation` | [components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.mdx) | :heavy_check_mark: | N/A | \{<br/>"file_id": "file-abc123",<br/>"filename": "research_paper.pdf",<br/>"index": 0,<br/>"type": "file_citation"<br/>} |
| `annotation_index` | *int* | :heavy_check_mark: | N/A | |
| `content_index` | *int* | :heavy_check_mark: | N/A | |
| `item_id` | *str* | :heavy_check_mark: | N/A | |
| `output_index` | *int* | :heavy_check_mark: | N/A | |
| `sequence_number` | *int* | :heavy_check_mark: | N/A | |
| `type` | [components.AnnotationAddedEventType](../components/annotationaddedeventtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnnotationAddedEventType"
---
## Example Usage
```python
from openrouter.components import AnnotationAddedEventType
value: AnnotationAddedEventType = "response.output_text.annotation.added"
```
## Values
- `"response.output_text.annotation.added"`
@@ -0,0 +1,15 @@
---
title: "AnthropicAdvisorMessageUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `model` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicAdvisorMessageUsageIterationType](../components/anthropicadvisormessageusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicAdvisorMessageUsageIterationType"
---
## Example Usage
```python
from openrouter.components import AnthropicAdvisorMessageUsageIterationType
value: AnthropicAdvisorMessageUsageIterationType = "advisor_message"
```
## Values
- `"advisor_message"`
@@ -0,0 +1,21 @@
---
title: "AnthropicAllowedCallers"
---
## Example Usage
```python
from openrouter.components import AnthropicAllowedCallers
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicAllowedCallers = "direct"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"direct"`
- `"code_execution_20250825"`
- `"code_execution_20260120"`
@@ -0,0 +1,11 @@
---
title: "AnthropicBase64ImageSource"
---
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A | |
| `media_type` | [components.AnthropicImageMimeType](../components/anthropicimagemimetype.mdx) | :heavy_check_mark: | N/A | image/jpeg |
| `type` | [components.AnthropicBase64ImageSourceType](../components/anthropicbase64imagesourcetype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicBase64ImageSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicBase64ImageSourceType
value: AnthropicBase64ImageSourceType = "base64"
```
## Values
- `"base64"`
@@ -0,0 +1,11 @@
---
title: "AnthropicBase64PdfSource"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A |
| `media_type` | [components.AnthropicBase64PdfSourceMediaType](../components/anthropicbase64pdfsourcemediatype.mdx) | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicBase64PdfSourceType](../components/anthropicbase64pdfsourcetype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicBase64PdfSourceMediaType"
---
## Example Usage
```python
from openrouter.components import AnthropicBase64PdfSourceMediaType
value: AnthropicBase64PdfSourceMediaType = "application/pdf"
```
## Values
- `"application/pdf"`
@@ -0,0 +1,15 @@
---
title: "AnthropicBase64PdfSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicBase64PdfSourceType
value: AnthropicBase64PdfSourceType = "base64"
```
## Values
- `"base64"`
@@ -0,0 +1,13 @@
---
title: "AnthropicCacheControlDirective"
---
Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models.
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `ttl` | [Optional[components.AnthropicCacheControlTTL]](../components/anthropiccachecontrolttl.mdx) | :heavy_minus_sign: | N/A | 5m |
| `type` | [components.AnthropicCacheControlDirectiveType](../components/anthropiccachecontroldirectivetype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicCacheControlDirectiveType"
---
## Example Usage
```python
from openrouter.components import AnthropicCacheControlDirectiveType
value: AnthropicCacheControlDirectiveType = "ephemeral"
```
## Values
- `"ephemeral"`
@@ -0,0 +1,20 @@
---
title: "AnthropicCacheControlTTL"
---
## Example Usage
```python
from openrouter.components import AnthropicCacheControlTTL
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicCacheControlTTL = "5m"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"5m"`
- `"1h"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCitationCharLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `document_index` | *int* | :heavy_check_mark: | N/A |
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `end_char_index` | *int* | :heavy_check_mark: | N/A |
| `start_char_index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationCharLocationParamType](../components/anthropiccitationcharlocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationCharLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationCharLocationParamType
value: AnthropicCitationCharLocationParamType = "char_location"
```
## Values
- `"char_location"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCitationContentBlockLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `document_index` | *int* | :heavy_check_mark: | N/A |
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationContentBlockLocationParamType](../components/anthropiccitationcontentblocklocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationContentBlockLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationContentBlockLocationParamType
value: AnthropicCitationContentBlockLocationParamType = "content_block_location"
```
## Values
- `"content_block_location"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCitationPageLocationParam"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `document_index` | *int* | :heavy_check_mark: | N/A |
| `document_title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `end_page_number` | *int* | :heavy_check_mark: | N/A |
| `start_page_number` | *int* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationPageLocationParamType](../components/anthropiccitationpagelocationparamtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationPageLocationParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationPageLocationParamType
value: AnthropicCitationPageLocationParamType = "page_location"
```
## Values
- `"page_location"`
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationSearchResultLocation"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `end_block_index` | *int* | :heavy_check_mark: | N/A |
| `search_result_index` | *int* | :heavy_check_mark: | N/A |
| `source` | *str* | :heavy_check_mark: | N/A |
| `start_block_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationSearchResultLocationType](../components/anthropiccitationsearchresultlocationtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationSearchResultLocationType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationSearchResultLocationType
value: AnthropicCitationSearchResultLocationType = "search_result_location"
```
## Values
- `"search_result_location"`
@@ -0,0 +1,13 @@
---
title: "AnthropicCitationWebSearchResultLocation"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| `cited_text` | *str* | :heavy_check_mark: | N/A |
| `encrypted_index` | *str* | :heavy_check_mark: | N/A |
| `title` | *Nullable[str]* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicCitationWebSearchResultLocationType](../components/anthropiccitationwebsearchresultlocationtype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicCitationWebSearchResultLocationType"
---
## Example Usage
```python
from openrouter.components import AnthropicCitationWebSearchResultLocationType
value: AnthropicCitationWebSearchResultLocationType = "web_search_result_location"
```
## Values
- `"web_search_result_location"`
@@ -0,0 +1,14 @@
---
title: "AnthropicCompactionUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `type` | [components.AnthropicCompactionUsageIterationType](../components/anthropiccompactionusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicCompactionUsageIterationType"
---
## Example Usage
```python
from openrouter.components import AnthropicCompactionUsageIterationType
value: AnthropicCompactionUsageIterationType = "compaction"
```
## Values
- `"compaction"`
@@ -0,0 +1,14 @@
---
title: "AnthropicDocumentBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
| `citations` | [OptionalNullable[components.AnthropicDocumentBlockParamCitations]](../components/anthropicdocumentblockparamcitations.mdx) | :heavy_minus_sign: | N/A | |
| `context` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `source` | [components.AnthropicDocumentBlockParamSourceUnion](../components/anthropicdocumentblockparamsourceunion.mdx) | :heavy_check_mark: | N/A | |
| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `type` | [components.TypeDocument](../components/typedocument.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,9 @@
---
title: "AnthropicDocumentBlockParamCitations"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,18 @@
---
title: "AnthropicDocumentBlockParamContent1"
---
## Supported Types
### `components.AnthropicImageBlockParam`
```python
value: components.AnthropicImageBlockParam = /* values here */
```
### `components.AnthropicTextBlockParam`
```python
value: components.AnthropicTextBlockParam = /* values here */
```
@@ -0,0 +1,18 @@
---
title: "AnthropicDocumentBlockParamContent2"
---
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[components.AnthropicDocumentBlockParamContent1]`
```python
value: List[components.AnthropicDocumentBlockParamContent1] = /* values here */
```
@@ -0,0 +1,36 @@
---
title: "AnthropicDocumentBlockParamSourceUnion"
---
## Supported Types
### `components.AnthropicBase64PdfSource`
```python
value: components.AnthropicBase64PdfSource = /* values here */
```
### `components.AnthropicPlainTextSource`
```python
value: components.AnthropicPlainTextSource = /* values here */
```
### `components.SourceContent`
```python
value: components.SourceContent = /* values here */
```
### `components.AnthropicURLPdfSource`
```python
value: components.AnthropicURLPdfSource = /* values here */
```
### `components.AnthropicFileDocumentSource`
```python
value: components.AnthropicFileDocumentSource = /* values here */
```
@@ -0,0 +1,10 @@
---
title: "AnthropicFileDocumentSource"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `file_id` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicFileDocumentSourceType](../components/anthropicfiledocumentsourcetype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicFileDocumentSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicFileDocumentSourceType
value: AnthropicFileDocumentSourceType = "file"
```
## Values
- `"file"`
@@ -0,0 +1,11 @@
---
title: "AnthropicImageBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
| `source` | [components.AnthropicImageBlockParamSource](../components/anthropicimageblockparamsource.mdx) | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicImageBlockParamType](../components/anthropicimageblockparamtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,18 @@
---
title: "AnthropicImageBlockParamSource"
---
## Supported Types
### `components.AnthropicBase64ImageSource`
```python
value: components.AnthropicBase64ImageSource = /* values here */
```
### `components.AnthropicURLImageSource`
```python
value: components.AnthropicURLImageSource = /* values here */
```
@@ -0,0 +1,15 @@
---
title: "AnthropicImageBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicImageBlockParamType
value: AnthropicImageBlockParamType = "image"
```
## Values
- `"image"`
@@ -0,0 +1,22 @@
---
title: "AnthropicImageMimeType"
---
## Example Usage
```python
from openrouter.components import AnthropicImageMimeType
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicImageMimeType = "image/jpeg"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"image/jpeg"`
- `"image/png"`
- `"image/gif"`
- `"image/webp"`
@@ -0,0 +1,10 @@
---
title: "AnthropicInputTokensClearAtLeast"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `type` | [components.AnthropicInputTokensClearAtLeastType](../components/anthropicinputtokensclearatleasttype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicInputTokensClearAtLeastType"
---
## Example Usage
```python
from openrouter.components import AnthropicInputTokensClearAtLeastType
value: AnthropicInputTokensClearAtLeastType = "input_tokens"
```
## Values
- `"input_tokens"`
@@ -0,0 +1,10 @@
---
title: "AnthropicInputTokensTrigger"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `type` | [components.AnthropicInputTokensTriggerType](../components/anthropicinputtokenstriggertype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicInputTokensTriggerType"
---
## Example Usage
```python
from openrouter.components import AnthropicInputTokensTriggerType
value: AnthropicInputTokensTriggerType = "input_tokens"
```
## Values
- `"input_tokens"`
@@ -0,0 +1,10 @@
---
title: "AnthropicIterationCacheCreation"
---
## Fields
| Field | Type | Required | Description |
| --------------------------- | --------------------------- | --------------------------- | --------------------------- |
| `ephemeral_1h_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
| `ephemeral_5m_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicMessageUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `model` | *Optional[str]* | :heavy_minus_sign: | N/A | |
| `type` | [components.AnthropicMessageUsageIterationType](../components/anthropicmessageusageiterationtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicMessageUsageIterationType"
---
## Example Usage
```python
from openrouter.components import AnthropicMessageUsageIterationType
value: AnthropicMessageUsageIterationType = "message"
```
## Values
- `"message"`
@@ -0,0 +1,11 @@
---
title: "AnthropicPlainTextSource"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A |
| `media_type` | [components.AnthropicPlainTextSourceMediaType](../components/anthropicplaintextsourcemediatype.mdx) | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicPlainTextSourceType](../components/anthropicplaintextsourcetype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicPlainTextSourceMediaType"
---
## Example Usage
```python
from openrouter.components import AnthropicPlainTextSourceMediaType
value: AnthropicPlainTextSourceMediaType = "text/plain"
```
## Values
- `"text/plain"`
@@ -0,0 +1,15 @@
---
title: "AnthropicPlainTextSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicPlainTextSourceType
value: AnthropicPlainTextSourceType = "text"
```
## Values
- `"text"`
@@ -0,0 +1,14 @@
---
title: "AnthropicSearchResultBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
| `citations` | [Optional[components.AnthropicSearchResultBlockParamCitations]](../components/anthropicsearchresultblockparamcitations.mdx) | :heavy_minus_sign: | N/A | |
| `content` | List[[components.AnthropicTextBlockParam](../components/anthropictextblockparam.mdx)] | :heavy_check_mark: | N/A | |
| `source` | *str* | :heavy_check_mark: | N/A | |
| `title` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicSearchResultBlockParamType](../components/anthropicsearchresultblockparamtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,9 @@
---
title: "AnthropicSearchResultBlockParamCitations"
---
## Fields
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicSearchResultBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicSearchResultBlockParamType
value: AnthropicSearchResultBlockParamType = "search_result"
```
## Values
- `"search_result"`
+20
View File
@@ -0,0 +1,20 @@
---
title: "AnthropicSpeed"
---
## Example Usage
```python
from openrouter.components import AnthropicSpeed
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicSpeed = "fast"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"fast"`
- `"standard"`
@@ -0,0 +1,12 @@
---
title: "AnthropicTextBlockParam"
---
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cache_control` | [Optional[components.AnthropicCacheControlDirective]](../components/anthropiccachecontroldirective.mdx) | :heavy_minus_sign: | Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. Currently supported for Anthropic Claude models. | \{<br/>"type": "ephemeral"<br/>} |
| `citations` | List[[components.Citation](../components/citation.mdx)] | :heavy_minus_sign: | N/A | |
| `text` | *str* | :heavy_check_mark: | N/A | |
| `type` | [components.AnthropicTextBlockParamType](../components/anthropictextblockparamtype.mdx) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,15 @@
---
title: "AnthropicTextBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicTextBlockParamType
value: AnthropicTextBlockParamType = "text"
```
## Values
- `"text"`
@@ -0,0 +1,20 @@
---
title: "AnthropicThinkingDisplay"
---
## Example Usage
```python
from openrouter.components import AnthropicThinkingDisplay
# Open enum: unrecognized values are captured as UnrecognizedStr
value: AnthropicThinkingDisplay = "summarized"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"summarized"`
- `"omitted"`
@@ -0,0 +1,10 @@
---
title: "AnthropicThinkingTurns"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `type` | [components.AnthropicThinkingTurnsType](../components/anthropicthinkingturnstype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicThinkingTurnsType"
---
## Example Usage
```python
from openrouter.components import AnthropicThinkingTurnsType
value: AnthropicThinkingTurnsType = "thinking_turns"
```
## Values
- `"thinking_turns"`
+10
View File
@@ -0,0 +1,10 @@
---
title: "AnthropicToolUsesKeep"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `type` | [components.AnthropicToolUsesKeepType](../components/anthropictooluseskeeptype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicToolUsesKeepType"
---
## Example Usage
```python
from openrouter.components import AnthropicToolUsesKeepType
value: AnthropicToolUsesKeepType = "tool_uses"
```
## Values
- `"tool_uses"`
@@ -0,0 +1,10 @@
---
title: "AnthropicToolUsesTrigger"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `type` | [components.AnthropicToolUsesTriggerType](../components/anthropictoolusestriggertype.mdx) | :heavy_check_mark: | N/A |
| `value` | *int* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicToolUsesTriggerType"
---
## Example Usage
```python
from openrouter.components import AnthropicToolUsesTriggerType
value: AnthropicToolUsesTriggerType = "tool_uses"
```
## Values
- `"tool_uses"`
@@ -0,0 +1,14 @@
---
title: "AnthropicUnknownUsageIteration"
---
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `cache_creation` | [OptionalNullable[components.AnthropicIterationCacheCreation]](../components/anthropiciterationcachecreation.mdx) | :heavy_minus_sign: | N/A | \{<br/>"ephemeral_1h_input_tokens": 0,<br/>"ephemeral_5m_input_tokens": 0<br/>} |
| `cache_creation_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `cache_read_input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `input_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `output_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `type` | *str* | :heavy_check_mark: | N/A | |
@@ -0,0 +1,10 @@
---
title: "AnthropicURLImageSource"
---
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| `type` | [components.AnthropicURLImageSourceType](../components/anthropicurlimagesourcetype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicURLImageSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicURLImageSourceType
value: AnthropicURLImageSourceType = "url"
```
## Values
- `"url"`
+10
View File
@@ -0,0 +1,10 @@
---
title: "AnthropicURLPdfSource"
---
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `type` | [components.AnthropicURLPdfSourceType](../components/anthropicurlpdfsourcetype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicURLPdfSourceType"
---
## Example Usage
```python
from openrouter.components import AnthropicURLPdfSourceType
value: AnthropicURLPdfSourceType = "url"
```
## Values
- `"url"`
@@ -0,0 +1,30 @@
---
title: "AnthropicUsageIteration"
---
## Supported Types
### `components.AnthropicCompactionUsageIteration`
```python
value: components.AnthropicCompactionUsageIteration = /* values here */
```
### `components.AnthropicMessageUsageIteration`
```python
value: components.AnthropicMessageUsageIteration = /* values here */
```
### `components.AnthropicAdvisorMessageUsageIteration`
```python
value: components.AnthropicAdvisorMessageUsageIteration = /* values here */
```
### `components.AnthropicUnknownUsageIteration`
```python
value: components.AnthropicUnknownUsageIteration = /* values here */
```
@@ -0,0 +1,13 @@
---
title: "AnthropicWebSearchResultBlockParam"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `encrypted_content` | *str* | :heavy_check_mark: | N/A |
| `page_age` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `title` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.AnthropicWebSearchResultBlockParamType](../components/anthropicwebsearchresultblockparamtype.mdx) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicWebSearchResultBlockParamType"
---
## Example Usage
```python
from openrouter.components import AnthropicWebSearchResultBlockParamType
value: AnthropicWebSearchResultBlockParamType = "web_search_result"
```
## Values
- `"web_search_result"`
@@ -0,0 +1,13 @@
---
title: "AnthropicWebSearchToolUserLocation"
---
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `city` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `region` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `timezone` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `type` | [components.AnthropicWebSearchToolUserLocationType](../components/anthropicwebsearchtooluserlocationtype.mdx) | :heavy_check_mark: | N/A |
@@ -0,0 +1,15 @@
---
title: "AnthropicWebSearchToolUserLocationType"
---
## Example Usage
```python
from openrouter.components import AnthropicWebSearchToolUserLocationType
value: AnthropicWebSearchToolUserLocationType = "approximate"
```
## Values
- `"approximate"`
+47
View File
@@ -0,0 +1,47 @@
---
title: "APIErrorType"
---
Canonical OpenRouter error type, stable across all API formats
## Example Usage
```python
from openrouter.components import APIErrorType
# Open enum: unrecognized values are captured as UnrecognizedStr
value: APIErrorType = "context_length_exceeded"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"context_length_exceeded"`
- `"max_tokens_exceeded"`
- `"token_limit_exceeded"`
- `"string_too_long"`
- `"authentication"`
- `"permission_denied"`
- `"payment_required"`
- `"rate_limit_exceeded"`
- `"provider_overloaded"`
- `"provider_unavailable"`
- `"invalid_request"`
- `"invalid_prompt"`
- `"not_found"`
- `"precondition_failed"`
- `"payload_too_large"`
- `"unprocessable"`
- `"content_policy_violation"`
- `"refusal"`
- `"invalid_image"`
- `"image_too_large"`
- `"image_too_small"`
- `"unsupported_image_format"`
- `"image_not_found"`
- `"image_download_failed"`
- `"server"`
- `"timeout"`
- `"unmapped"`
+27
View File
@@ -0,0 +1,27 @@
---
title: "APIType"
---
Type of API used for the generation
## Example Usage
```python
from openrouter.components import APIType
# Open enum: unrecognized values are captured as UnrecognizedStr
value: APIType = "completions"
```
## Values
This is an open enum. Unrecognized values will not fail type checks.
- `"completions"`
- `"embeddings"`
- `"rerank"`
- `"tts"`
- `"stt"`
- `"video"`
- `"image"`

Some files were not shown because too many files have changed in this diff Show More