mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-30 12:20:57 +08:00
Merge remote-tracking branch 'upstream/main' into fix/chat-transient-retries
# Conflicts: # .genignore # src/openrouter/utils/retries.py
This commit is contained in:
+3
-1
@@ -1,5 +1,7 @@
|
||||
pylintrc
|
||||
docs/docs.json
|
||||
docs/overview.mdx
|
||||
# Owns retry response classification (408/429/5XX + transient inner error.code on 400s).
|
||||
# Speakeasy has no overlay/hook surface for the 400-inner-code case, so this file is
|
||||
# hand-maintained; genignore stops `speakeasy generate` from overwriting it. -- Claude
|
||||
src/openrouter/utils/retries.py
|
||||
src/openrouter/utils/retries.py
|
||||
|
||||
@@ -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"
|
||||
@@ -16,7 +16,6 @@ __pycache__/
|
||||
# Speakeasy generation artifacts (generated in OSS repo, not here)
|
||||
.speakeasy/*.lock
|
||||
.speakeasy/*.openapi.yaml
|
||||
/docs
|
||||
# Environment
|
||||
.env
|
||||
.env.local
|
||||
|
||||
+7239
-7154
File diff suppressed because it is too large
Load Diff
+19
-1
@@ -16,6 +16,8 @@ generation:
|
||||
requestResponseComponentNamesFeb2024: true
|
||||
securityFeb2025: true
|
||||
sharedErrorComponentsApr2025: true
|
||||
sharedNestedComponentsJan2026: false
|
||||
nameOverrideFeb2026: false
|
||||
auth:
|
||||
oAuth2ClientCredentialsEnabled: true
|
||||
oAuth2PasswordEnabled: true
|
||||
@@ -25,14 +27,16 @@ generation:
|
||||
schemas:
|
||||
allOfMergeStrategy: shallowMerge
|
||||
requestBodyFieldName: ""
|
||||
versioningStrategy: automatic
|
||||
persistentEdits: {}
|
||||
tests:
|
||||
generateTests: false
|
||||
generateNewTests: true
|
||||
skipResponseBodyAssertions: false
|
||||
documentation: mintlify
|
||||
preApplyUnionDiscriminators: true
|
||||
python:
|
||||
version: 0.10.8
|
||||
version: 0.11.3
|
||||
additionalDependencies:
|
||||
dev: {}
|
||||
main: {}
|
||||
@@ -46,6 +50,7 @@ python:
|
||||
authors:
|
||||
- OpenRouter
|
||||
baseErrorName: OpenRouterError
|
||||
bodyVariantOverloads: false
|
||||
clientServerStatusCodesAsErrors: true
|
||||
constFieldCasing: upper
|
||||
defaultErrorName: OpenRouterDefaultError
|
||||
@@ -53,12 +58,18 @@ python:
|
||||
enableCustomCodeRegions: false
|
||||
enumFormat: union
|
||||
envVarPrefix: OPENROUTER
|
||||
errorSchemaValidation: true
|
||||
eventStreamClassNames:
|
||||
async: EventStreamAsync
|
||||
sync: EventStream
|
||||
fixFlags:
|
||||
asyncPaginationSep2025: true
|
||||
conflictResistantModelImportsFeb2026: false
|
||||
responseRequiredSep2024: true
|
||||
flattenGlobalSecurity: true
|
||||
flattenRequests: true
|
||||
flatteningOrder: parameters-first
|
||||
forwardCompatibleEnumsByDefault: false
|
||||
forwardCompatibleUnionsByDefault: tagged-only
|
||||
imports:
|
||||
option: openapi
|
||||
@@ -71,18 +82,25 @@ python:
|
||||
inferSSEOverload: true
|
||||
inferUnionDiscriminators: true
|
||||
inputModelSuffix: input
|
||||
inputTypedDictSuffix: TypedDict
|
||||
legacyPyright: false
|
||||
license: Apache-2.0
|
||||
maxMethodParams: 999
|
||||
methodArguments: infer-optional-args
|
||||
methodTimeoutArgument: timeout-ms
|
||||
methodTimeoutUnits: milliseconds
|
||||
moduleName: ""
|
||||
multipartArrayFormat: legacy
|
||||
optionalDependencies: {}
|
||||
outputModelSuffix: output
|
||||
packageManager: uv
|
||||
packageName: openrouter
|
||||
preApplyUnionDiscriminators: false
|
||||
pytestFilterWarnings: []
|
||||
pytestTimeout: 0
|
||||
rawResponseHelpers: false
|
||||
responseFormat: flat
|
||||
responseSchemaValidation: true
|
||||
sseFlatResponse: true
|
||||
templateVersion: v2
|
||||
useAsyncHooks: false
|
||||
|
||||
@@ -4536,6 +4536,7 @@ components:
|
||||
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/BashServerTool'
|
||||
- $ref: '#/components/schemas/DatetimeServerTool'
|
||||
- $ref: '#/components/schemas/FilesServerTool'
|
||||
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
|
||||
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
|
||||
@@ -7584,6 +7585,28 @@ components:
|
||||
- type
|
||||
- vector_store_ids
|
||||
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:
|
||||
description: Forbidden - Authentication successful but insufficient permissions
|
||||
example:
|
||||
@@ -10327,6 +10350,7 @@ components:
|
||||
- $ref: '#/components/schemas/OutputFusionServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputAdvisorServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputSubagentServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputFilesServerToolItem'
|
||||
- $ref: '#/components/schemas/LocalShellCallItem'
|
||||
- $ref: '#/components/schemas/LocalShellCallOutputItem'
|
||||
- $ref: '#/components/schemas/ShellCallItem'
|
||||
@@ -10901,6 +10925,29 @@ components:
|
||||
required:
|
||||
- data
|
||||
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:
|
||||
example:
|
||||
data:
|
||||
@@ -16250,6 +16297,43 @@ components:
|
||||
- status
|
||||
- type
|
||||
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:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OutputItemFunctionCall'
|
||||
@@ -16702,6 +16786,7 @@ components:
|
||||
openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
|
||||
openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem'
|
||||
openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
|
||||
openrouter:files: '#/components/schemas/OutputFilesServerToolItem'
|
||||
openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem'
|
||||
openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
|
||||
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
|
||||
@@ -16753,6 +16838,7 @@ components:
|
||||
- $ref: '#/components/schemas/OutputFusionServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputAdvisorServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputSubagentServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputFilesServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputCustomToolCallItem'
|
||||
OutputItemWebSearchCall:
|
||||
example:
|
||||
@@ -19873,6 +19959,7 @@ components:
|
||||
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/DatetimeServerTool'
|
||||
- $ref: '#/components/schemas/FilesServerTool'
|
||||
- $ref: '#/components/schemas/FusionServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
|
||||
@@ -33959,6 +34046,112 @@ paths:
|
||||
tags:
|
||||
- Workspaces
|
||||
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:
|
||||
post:
|
||||
description: >-
|
||||
|
||||
@@ -4532,6 +4532,7 @@ components:
|
||||
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/BashServerTool'
|
||||
- $ref: '#/components/schemas/DatetimeServerTool'
|
||||
- $ref: '#/components/schemas/FilesServerTool'
|
||||
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
|
||||
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
|
||||
@@ -7555,6 +7556,27 @@ components:
|
||||
- type
|
||||
- vector_store_ids
|
||||
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:
|
||||
description: Forbidden - Authentication successful but insufficient permissions
|
||||
example:
|
||||
@@ -10277,6 +10299,7 @@ components:
|
||||
- $ref: '#/components/schemas/OutputFusionServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputAdvisorServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputSubagentServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputFilesServerToolItem'
|
||||
- $ref: '#/components/schemas/LocalShellCallItem'
|
||||
- $ref: '#/components/schemas/LocalShellCallOutputItem'
|
||||
- $ref: '#/components/schemas/ShellCallItem'
|
||||
@@ -10850,6 +10873,29 @@ components:
|
||||
required:
|
||||
- data
|
||||
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:
|
||||
example:
|
||||
data:
|
||||
@@ -16169,6 +16215,43 @@ components:
|
||||
- status
|
||||
- type
|
||||
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:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OutputItemFunctionCall'
|
||||
@@ -16617,6 +16700,7 @@ components:
|
||||
openrouter:datetime: '#/components/schemas/OutputDatetimeItem'
|
||||
openrouter:experimental__search_models: '#/components/schemas/OutputSearchModelsServerToolItem'
|
||||
openrouter:file_search: '#/components/schemas/OutputFileSearchServerToolItem'
|
||||
openrouter:files: '#/components/schemas/OutputFilesServerToolItem'
|
||||
openrouter:fusion: '#/components/schemas/OutputFusionServerToolItem'
|
||||
openrouter:image_generation: '#/components/schemas/OutputImageGenerationServerToolItem'
|
||||
openrouter:mcp: '#/components/schemas/OutputMcpServerToolItem'
|
||||
@@ -16668,6 +16752,7 @@ components:
|
||||
- $ref: '#/components/schemas/OutputFusionServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputAdvisorServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputSubagentServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputFilesServerToolItem'
|
||||
- $ref: '#/components/schemas/OutputCustomToolCallItem'
|
||||
OutputItemWebSearchCall:
|
||||
example:
|
||||
@@ -19755,6 +19840,7 @@ components:
|
||||
- $ref: '#/components/schemas/AdvisorServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/SubagentServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/DatetimeServerTool'
|
||||
- $ref: '#/components/schemas/FilesServerTool'
|
||||
- $ref: '#/components/schemas/FusionServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
|
||||
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
|
||||
@@ -33884,6 +33970,115 @@ paths:
|
||||
- $ref: "#/components/parameters/AppIdentifier"
|
||||
- $ref: "#/components/parameters/AppDisplayName"
|
||||
- $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:
|
||||
post:
|
||||
description: >-
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
speakeasyVersion: 1.680.0
|
||||
speakeasyVersion: 1.787.0
|
||||
sources:
|
||||
OpenRouter API:
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:ed6981b24a0f8df827afac0f83d7dae4d8f7df331ae6e72664e03800cb7a0244
|
||||
sourceBlobDigest: sha256:5961e537bd3160eb3f541232a5e7cb43704fed5e9ce76b342c08f6c52d4fefe9
|
||||
sourceRevisionDigest: sha256:5381277309ba2f3a4a3e0719b00425be3f93c3103717316e6625bd5caf15b277
|
||||
sourceBlobDigest: sha256:def8d29511aca594e11c3367b7013a64c8733cc8050e23deae98d9cc5df55c93
|
||||
tags:
|
||||
- latest
|
||||
- speakeasy-sdk-regen-1782660460
|
||||
- 1.0.0
|
||||
targets:
|
||||
open-router:
|
||||
source: OpenRouter API
|
||||
sourceNamespace: open-router-chat-completions-api
|
||||
sourceRevisionDigest: sha256:ed6981b24a0f8df827afac0f83d7dae4d8f7df331ae6e72664e03800cb7a0244
|
||||
sourceBlobDigest: sha256:5961e537bd3160eb3f541232a5e7cb43704fed5e9ce76b342c08f6c52d4fefe9
|
||||
sourceRevisionDigest: sha256:5381277309ba2f3a4a3e0719b00425be3f93c3103717316e6625bd5caf15b277
|
||||
sourceBlobDigest: sha256:def8d29511aca594e11c3367b7013a64c8733cc8050e23deae98d9cc5df55c93
|
||||
codeSamplesNamespace: open-router-python-code-samples
|
||||
codeSamplesRevisionDigest: sha256:d3f20480ea1c0bcb8d872ae696b7a8b2c16d1469ee95b6df12b03b7004ce1c9c
|
||||
codeSamplesRevisionDigest: sha256:18d6fc594c9338480cbc65842c3f276ad0a58f2ceda311aff3d70ea33dbd6e6d
|
||||
workflow:
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
speakeasyVersion: 1.787.0
|
||||
sources:
|
||||
OpenRouter API:
|
||||
inputs:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
workflowVersion: 1.0.0
|
||||
speakeasyVersion: 1.680.0
|
||||
speakeasyVersion: 1.787.0
|
||||
sources:
|
||||
OpenRouter API:
|
||||
inputs:
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ It's also possible to write a standalone Python script without needing to set up
|
||||
```python
|
||||
#!/usr/bin/env -S uv run --script
|
||||
# /// script
|
||||
# requires-python = ">=3.9"
|
||||
# requires-python = ">=3.10"
|
||||
# dependencies = [
|
||||
# "openrouter",
|
||||
# ]
|
||||
|
||||
@@ -55,7 +55,7 @@ It's also possible to write a standalone Python script without needing to set up
|
||||
```python
|
||||
#!/usr/bin/env -S uv run --script
|
||||
# /// script
|
||||
# requires-python = ">=3.9"
|
||||
# requires-python = ">=3.10"
|
||||
# dependencies = [
|
||||
# "openrouter",
|
||||
# ]
|
||||
|
||||
+31
-1
@@ -108,4 +108,34 @@ Based on:
|
||||
### Generated
|
||||
- [python v0.10.8] .
|
||||
### Releases
|
||||
- [PyPI v0.10.8] https://pypi.org/project/openrouter/0.10.8 - .
|
||||
- [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 - .
|
||||
@@ -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 |
|
||||
@@ -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 */
|
||||
```
|
||||
|
||||
@@ -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"`
|
||||
@@ -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 |
|
||||
@@ -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 |
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
|
||||
@@ -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/>} |
|
||||
@@ -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; 1–64 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"`
|
||||
@@ -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 |
|
||||
@@ -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 */
|
||||
```
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: "Always"
|
||||
---
|
||||
|
||||
## Fields
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `tool_names` | List[*str*] | :heavy_minus_sign: | N/A |
|
||||
@@ -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"`
|
||||
@@ -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"`
|
||||
@@ -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"`
|
||||
@@ -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"`
|
||||
@@ -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"`
|
||||
@@ -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
Reference in New Issue
Block a user