Project import generated by Copybara.

GitOrigin-RevId: 849282a42d3b2948d0ca0f7fd1427c31af709bbd
This commit is contained in:
OpenRouter Team
2026-01-09 19:20:21 +00:00
parent a35486030a
commit 9073d38dc1
123 changed files with 3734 additions and 1226 deletions
+507 -221
View File
@@ -269,7 +269,25 @@ components:
allOf:
- $ref: '#/components/schemas/OutputItemReasoning'
- type: object
properties: {}
properties:
signature:
type: string
nullable: true
description: A signature for the reasoning content, used for verification
example: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
format:
type: string
nullable: true
enum:
- unknown
- openai-responses-v1
- azure-openai-responses-v1
- xai-responses-v1
- anthropic-claude-v1
- google-gemini-v1
description: The format of the reasoning content
example: anthropic-claude-v1
x-speakeasy-unknown-values: allow
example:
id: reasoning-123
type: reasoning
@@ -280,6 +298,8 @@ components:
content:
- type: reasoning_text
text: First, we analyze the problem...
signature: EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...
format: anthropic-claude-v1
description: An output item containing reasoning
OutputItemFunctionCall:
type: object
@@ -3239,6 +3259,7 @@ components:
enum:
- unknown
- openai-responses-v1
- azure-openai-responses-v1
- xai-responses-v1
- anthropic-claude-v1
- google-gemini-v1
@@ -3434,6 +3455,12 @@ components:
example:
summary: auto
enabled: true
ResponsesOutputModality:
type: string
enum:
- text
- image
x-speakeasy-unknown-values: allow
OpenAIResponsesIncludable:
type: string
enum:
@@ -3487,7 +3514,6 @@ components:
- Fireworks
- Friendli
- GMICloud
- GoPomelo
- Google
- Google AI Studio
- Groq
@@ -3517,13 +3543,14 @@ components:
- Phala
- Relace
- SambaNova
- Seed
- SiliconFlow
- Sourceful
- Stealth
- StreamLake
- Switchpoint
- Targon
- Together
- Upstage
- Venice
- WandB
- Xiaomi
@@ -3548,19 +3575,113 @@ components:
x-speakeasy-unknown-values: allow
ProviderSort:
type: string
nullable: true
enum:
- price
- throughput
- latency
description: >-
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
example: price
x-speakeasy-unknown-values: allow
ProviderSortConfig:
type: object
properties:
by:
anyOf:
- $ref: '#/components/schemas/ProviderSort'
- type: 'null'
partition:
anyOf:
- type: string
enum:
- model
- none
x-speakeasy-unknown-values: allow
- type: 'null'
BigNumberUnion:
type: string
description: A value in string format that is a large number
example: 1000
PercentileThroughputCutoffs:
type: object
properties:
p50:
type: number
nullable: true
description: Minimum p50 throughput (tokens/sec)
p75:
type: number
nullable: true
description: Minimum p75 throughput (tokens/sec)
p90:
type: number
nullable: true
description: Minimum p90 throughput (tokens/sec)
p99:
type: number
nullable: true
description: Minimum p99 throughput (tokens/sec)
description: Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
example:
p50: 100
p90: 50
PreferredMinThroughput:
anyOf:
- type: number
- $ref: '#/components/schemas/PercentileThroughputCutoffs'
- nullable: true
description: >-
Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
example: 100
PercentileLatencyCutoffs:
type: object
properties:
p50:
type: number
nullable: true
description: Maximum p50 latency (seconds)
p75:
type: number
nullable: true
description: Maximum p75 latency (seconds)
p90:
type: number
nullable: true
description: Maximum p90 latency (seconds)
p99:
type: number
nullable: true
description: Maximum p99 latency (seconds)
description: Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.
example:
p50: 5
p90: 10
PreferredMaxLatency:
anyOf:
- type: number
- $ref: '#/components/schemas/PercentileLatencyCutoffs'
- nullable: true
description: >-
Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
example: 5
WebSearchEngine:
type: string
enum:
- native
- exa
description: The search engine to use for web search.
x-speakeasy-unknown-values: allow
PDFParserEngine:
type: string
enum:
- mistral-ocr
- pdf-text
- native
description: The engine to use for parsing PDF files.
x-speakeasy-unknown-values: allow
PDFParserOptions:
type: object
properties:
engine:
$ref: '#/components/schemas/PDFParserEngine'
description: Options for PDF parsing.
OpenResponsesRequest:
type: object
properties:
@@ -3631,6 +3752,24 @@ components:
minimum: 0
top_k:
type: number
image_config:
type: object
additionalProperties:
anyOf:
- type: string
- type: number
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
modalities:
type: array
items:
$ref: '#/components/schemas/ResponsesOutputModality'
description: Output modalities for the response. Supported values are "text" and "image".
example:
- text
- image
prompt_cache_key:
type: string
nullable: true
@@ -3733,7 +3872,13 @@ components:
$ref: '#/components/schemas/Quantization'
description: A list of quantization levels to filter the provider by.
sort:
$ref: '#/components/schemas/ProviderSort'
anyOf:
- $ref: '#/components/schemas/ProviderSort'
- $ref: '#/components/schemas/ProviderSortConfig'
- nullable: true
description: >-
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
example: price
max_price:
type: object
properties:
@@ -3749,24 +3894,37 @@ components:
$ref: '#/components/schemas/BigNumberUnion'
description: >-
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
min_throughput:
type: number
nullable: true
example: 100
description: >-
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
max_latency:
type: number
nullable: true
example: 5
description: >-
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
preferred_min_throughput:
$ref: '#/components/schemas/PreferredMinThroughput'
preferred_max_latency:
$ref: '#/components/schemas/PreferredMaxLatency'
additionalProperties: false
description: When multiple model providers are available, optionally indicate your routing preference.
plugins:
type: array
items:
oneOf:
- type: object
properties:
id:
type: string
enum:
- auto-router
enabled:
type: boolean
description: Set to false to disable the auto-router plugin for this request. Defaults to true.
allowed_models:
type: array
items:
type: string
description: >-
List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
example:
- anthropic/*
- openai/gpt-4o
- google/*
required:
- id
- type: object
properties:
id:
@@ -3789,11 +3947,7 @@ components:
search_prompt:
type: string
engine:
type: string
enum:
- native
- exa
x-speakeasy-unknown-values: allow
$ref: '#/components/schemas/WebSearchEngine'
required:
- id
- type: object
@@ -3806,15 +3960,7 @@ components:
type: boolean
description: Set to false to disable the file-parser plugin for this request. Defaults to true.
pdf:
type: object
properties:
engine:
type: string
enum:
- mistral-ocr
- pdf-text
- native
x-speakeasy-unknown-values: allow
$ref: '#/components/schemas/PDFParserOptions'
required:
- id
- type: object
@@ -3835,8 +3981,12 @@ components:
enum:
- fallback
- sort
deprecated: true
description: >-
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").
x-speakeasy-deprecation-message: Use providers.sort.partition instead.
x-speakeasy-ignore: true
x-fern-ignore: true
x-speakeasy-unknown-values: allow
user:
type: string
@@ -3994,6 +4144,100 @@ components:
amount: 100
sender: '0x1234567890123456789012345678901234567890'
chain_id: 1
ProviderPreferences:
type: object
properties:
allow_fallbacks:
type: boolean
nullable: true
description: >
Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
require_parameters:
type: boolean
nullable: true
description: >-
Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
data_collection:
$ref: '#/components/schemas/DataCollection'
zdr:
type: boolean
nullable: true
description: >-
Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
example: true
enforce_distillable_text:
type: boolean
nullable: true
description: >-
Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
example: true
order:
type: array
nullable: true
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
description: >-
An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
only:
type: array
nullable: true
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
description: >-
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
ignore:
type: array
nullable: true
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
description: >-
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
quantizations:
type: array
nullable: true
items:
$ref: '#/components/schemas/Quantization'
description: A list of quantization levels to filter the provider by.
sort:
allOf:
- $ref: '#/components/schemas/ProviderSort'
- anyOf:
- $ref: '#/components/schemas/ProviderSort'
- $ref: '#/components/schemas/ProviderSortConfig'
- nullable: true
description: >-
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
max_price:
type: object
properties:
prompt:
$ref: '#/components/schemas/BigNumberUnion'
completion:
$ref: '#/components/schemas/BigNumberUnion'
image:
$ref: '#/components/schemas/BigNumberUnion'
audio:
$ref: '#/components/schemas/BigNumberUnion'
request:
$ref: '#/components/schemas/BigNumberUnion'
description: >-
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
preferred_min_throughput:
$ref: '#/components/schemas/PreferredMinThroughput'
preferred_max_latency:
$ref: '#/components/schemas/PreferredMaxLatency'
description: Provider routing preferences for the request.
PublicPricing:
type: object
properties:
@@ -4205,6 +4449,7 @@ components:
- parallel_tool_calls
- include_reasoning
- reasoning
- reasoning_effort
- web_search_options
- verbosity
example: temperature
@@ -4431,6 +4676,32 @@ components:
- -10
example: 0
x-speakeasy-unknown-values: allow
PercentileStats:
type: object
nullable: true
properties:
p50:
type: number
description: Median (50th percentile)
example: 25.5
p75:
type: number
description: 75th percentile
example: 35.2
p90:
type: number
description: 90th percentile
example: 48.7
p99:
type: number
description: 99th percentile
example: 85.3
required:
- p50
- p75
- p90
- p99
description: Latency percentiles in seconds over the last 30 minutes. Latency measures time to first token.
PublicEndpoint:
type: object
properties:
@@ -4498,6 +4769,13 @@ components:
nullable: true
supports_implicit_caching:
type: boolean
latency_last_30m:
$ref: '#/components/schemas/PercentileStats'
throughput_last_30m:
allOf:
- $ref: '#/components/schemas/PercentileStats'
- description: >-
Throughput percentiles in tokens per second over the last 30 minutes. Throughput measures output token generation speed.
required:
- name
- model_name
@@ -4511,6 +4789,8 @@ components:
- supported_parameters
- uptime_last_30m
- supports_implicit_caching
- latency_last_30m
- throughput_last_30m
description: Information about a specific model endpoint
example:
name: 'OpenAI: GPT-4'
@@ -4533,6 +4813,16 @@ components:
status: 0
uptime_last_30m: 99.5
supports_implicit_caching: true
latency_last_30m:
p50: 0.25
p75: 0.35
p90: 0.48
p99: 0.85
throughput_last_30m:
p50: 45.2
p75: 38.5
p90: 28.3
p99: 15.1
ListEndpointsResponse:
type: object
properties:
@@ -4636,6 +4926,16 @@ components:
status: default
uptime_last_30m: 99.5
supports_implicit_caching: true
latency_last_30m:
p50: 0.25
p75: 0.35
p90: 0.48
p99: 0.85
throughput_last_30m:
p50: 45.2
p75: 38.5
p90: 28.3
p99: 15.1
__schema0:
type: array
items:
@@ -4668,7 +4968,6 @@ components:
- Fireworks
- Friendli
- GMICloud
- GoPomelo
- Google
- Google AI Studio
- Groq
@@ -4698,13 +4997,14 @@ components:
- Phala
- Relace
- SambaNova
- Seed
- SiliconFlow
- Sourceful
- Stealth
- StreamLake
- Switchpoint
- Targon
- Together
- Upstage
- Venice
- WandB
- Xiaomi
@@ -4722,6 +5022,80 @@ components:
anyOf:
- $ref: '#/components/schemas/ChatCompletionFinishReason'
- type: 'null'
__schema3:
oneOf:
- type: object
properties:
type:
type: string
const: reasoning.summary
summary:
type: string
id:
$ref: '#/components/schemas/__schema4'
format:
$ref: '#/components/schemas/__schema5'
index:
$ref: '#/components/schemas/__schema6'
required:
- type
- summary
- type: object
properties:
type:
type: string
const: reasoning.encrypted
data:
type: string
id:
$ref: '#/components/schemas/__schema4'
format:
$ref: '#/components/schemas/__schema5'
index:
$ref: '#/components/schemas/__schema6'
required:
- type
- data
- type: object
properties:
type:
type: string
const: reasoning.text
text:
anyOf:
- type: string
- type: 'null'
signature:
anyOf:
- type: string
- type: 'null'
id:
$ref: '#/components/schemas/__schema4'
format:
$ref: '#/components/schemas/__schema5'
index:
$ref: '#/components/schemas/__schema6'
required:
- type
type: object
__schema4:
anyOf:
- type: string
- type: 'null'
__schema5:
anyOf:
- type: string
enum:
- unknown
- openai-responses-v1
- azure-openai-responses-v1
- xai-responses-v1
- anthropic-claude-v1
- google-gemini-v1
x-speakeasy-unknown-values: allow
- type: 'null'
__schema6:
type: number
ModelName:
type: string
ChatMessageContentItemText:
@@ -4940,6 +5314,8 @@ components:
properties:
cached_tokens:
type: number
cache_write_tokens:
type: number
audio_tokens:
type: number
video_tokens:
@@ -5264,12 +5640,7 @@ components:
description: >-
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
anyOf:
- type: string
enum:
- price
- throughput
- latency
x-speakeasy-unknown-values: allow
- $ref: '#/components/schemas/ProviderSortUnion'
- type: 'null'
max_price:
description: >-
@@ -5286,17 +5657,55 @@ components:
$ref: '#/components/schemas/__schema1'
request:
$ref: '#/components/schemas/__schema1'
min_throughput:
preferred_min_throughput:
description: >-
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
anyOf:
- type: number
- anyOf:
- type: number
- type: object
properties:
p50:
anyOf:
- type: number
- type: 'null'
p75:
anyOf:
- type: number
- type: 'null'
p90:
anyOf:
- type: number
- type: 'null'
p99:
anyOf:
- type: number
- type: 'null'
- type: 'null'
max_latency:
preferred_max_latency:
description: >-
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
anyOf:
- type: number
- anyOf:
- type: number
- type: object
properties:
p50:
anyOf:
- type: number
- type: 'null'
p75:
anyOf:
- type: number
- type: 'null'
p90:
anyOf:
- type: number
- type: 'null'
p99:
anyOf:
- type: number
- type: 'null'
- type: 'null'
additionalProperties: false
- type: 'null'
@@ -5305,6 +5714,19 @@ components:
type: array
items:
oneOf:
- type: object
properties:
id:
type: string
const: auto-router
enabled:
type: boolean
allowed_models:
type: array
items:
type: string
required:
- id
- type: object
properties:
id:
@@ -5361,8 +5783,6 @@ components:
- id
type: object
route:
description: >-
Routing strategy for multiple models: "fallback" (default) uses secondary models as backups, "sort" sorts all endpoints together by routing criteria.
anyOf:
- type: string
enum:
@@ -5441,12 +5861,12 @@ components:
anyOf:
- type: string
enum:
- none
- minimal
- low
- medium
- high
- xhigh
- high
- medium
- low
- minimal
- none
x-speakeasy-unknown-values: allow
- type: 'null'
summary:
@@ -5526,8 +5946,28 @@ components:
properties:
echo_upstream_body:
type: boolean
image_config:
type: object
propertyNames:
type: string
additionalProperties:
anyOf:
- type: string
- type: number
modalities:
type: array
items:
type: string
enum:
- text
- image
x-speakeasy-unknown-values: allow
required:
- messages
ProviderSortUnion:
anyOf:
- $ref: '#/components/schemas/ProviderSort'
- $ref: '#/components/schemas/ProviderSortConfig'
ChatResponseChoice:
type: object
properties:
@@ -5537,6 +5977,10 @@ components:
type: number
message:
$ref: '#/components/schemas/AssistantMessage'
reasoning_details:
type: array
items:
$ref: '#/components/schemas/__schema3'
logprobs:
anyOf:
- $ref: '#/components/schemas/ChatMessageTokenLogprobs'
@@ -5587,6 +6031,10 @@ components:
type: array
items:
$ref: '#/components/schemas/ChatStreamingMessageToolCall'
reasoning_details:
type: array
items:
$ref: '#/components/schemas/__schema3'
ChatStreamingChoice:
type: object
properties:
@@ -6413,99 +6861,7 @@ paths:
user:
type: string
provider:
type: object
properties:
allow_fallbacks:
type: boolean
nullable: true
description: >
Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the upstream error if it's unavailable.
require_parameters:
type: boolean
nullable: true
description: >-
Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest.
data_collection:
$ref: '#/components/schemas/DataCollection'
zdr:
type: boolean
nullable: true
description: >-
Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
example: true
enforce_distillable_text:
type: boolean
nullable: true
description: >-
Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
example: true
order:
type: array
nullable: true
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
description: >-
An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
only:
type: array
nullable: true
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
description: >-
List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
ignore:
type: array
nullable: true
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
description: >-
List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
quantizations:
type: array
nullable: true
items:
$ref: '#/components/schemas/Quantization'
description: A list of quantization levels to filter the provider by.
sort:
$ref: '#/components/schemas/ProviderSort'
max_price:
type: object
properties:
prompt:
$ref: '#/components/schemas/BigNumberUnion'
completion:
$ref: '#/components/schemas/BigNumberUnion'
image:
$ref: '#/components/schemas/BigNumberUnion'
audio:
$ref: '#/components/schemas/BigNumberUnion'
request:
$ref: '#/components/schemas/BigNumberUnion'
description: >-
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
min_throughput:
type: number
nullable: true
example: 100
description: >-
The minimum throughput (in tokens per second) required for this request. Only providers serving the model with at least this throughput will be used.
max_latency:
type: number
nullable: true
example: 5
description: >-
The maximum latency (in seconds) allowed for this request. Only providers serving the model with better than this latency will be used.
$ref: '#/components/schemas/ProviderPreferences'
input_type:
type: string
required:
@@ -7095,78 +7451,7 @@ paths:
name: slug
in: path
- schema:
type: string
enum:
- AI21
- AionLabs
- Alibaba
- Amazon Bedrock
- Amazon Nova
- Anthropic
- Arcee AI
- AtlasCloud
- Avian
- Azure
- BaseTen
- BytePlus
- Black Forest Labs
- Cerebras
- Chutes
- Cirrascale
- Clarifai
- Cloudflare
- Cohere
- Crusoe
- DeepInfra
- DeepSeek
- Featherless
- Fireworks
- Friendli
- GMICloud
- GoPomelo
- Google
- Google AI Studio
- Groq
- Hyperbolic
- Inception
- InferenceNet
- Infermatic
- Inflection
- Liquid
- Mara
- Mancer 2
- Minimax
- ModelRun
- Mistral
- Modular
- Moonshot AI
- Morph
- NCompass
- Nebius
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
- Perplexity
- Phala
- Relace
- SambaNova
- SiliconFlow
- Sourceful
- Stealth
- StreamLake
- Switchpoint
- Targon
- Together
- Venice
- WandB
- Xiaomi
- xAI
- Z.AI
- FakeProvider
x-speakeasy-unknown-values: allow
$ref: '#/components/schemas/ProviderName'
required: false
name: provider
in: query
@@ -7211,6 +7496,7 @@ paths:
- parallel_tool_calls
- include_reasoning
- reasoning
- reasoning_effort
- web_search_options
- verbosity
x-speakeasy-unknown-values: allow