Compare commits

..
Author SHA1 Message Date
OpenRouter SDK Bot 8277baf0d6 chore: update OpenAPI spec [sdk-bot] 2026-04-13 02:48:52 +00:00
440 changed files with 31885 additions and 36009 deletions
+1593 -2122
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -32,7 +32,7 @@ generation:
skipResponseBodyAssertions: false skipResponseBodyAssertions: false
preApplyUnionDiscriminators: true preApplyUnionDiscriminators: true
python: python:
version: 0.9.1 version: 0.8.1
additionalDependencies: additionalDependencies:
dev: {} dev: {}
main: {} main: {}
@@ -59,7 +59,7 @@ python:
flattenGlobalSecurity: true flattenGlobalSecurity: true
flattenRequests: true flattenRequests: true
flatteningOrder: parameters-first flatteningOrder: parameters-first
forwardCompatibleUnionsByDefault: tagged-only forwardCompatibleUnionsByDefault: "tagged-only"
imports: imports:
option: openapi option: openapi
paths: paths:
+32 -210
View File
@@ -1326,16 +1326,12 @@ components:
nullable: true nullable: true
type: array type: array
new_lines: new_lines:
nullable: true
type: integer type: integer
new_start: new_start:
nullable: true
type: integer type: integer
old_lines: old_lines:
nullable: true
type: integer type: integer
old_start: old_start:
nullable: true
type: integer type: integer
type: type:
enum: enum:
@@ -1418,13 +1414,10 @@ components:
- pdf - pdf
type: string type: string
num_lines: num_lines:
nullable: true
type: integer type: integer
start_line: start_line:
nullable: true
type: integer type: integer
total_lines: total_lines:
nullable: true
type: integer type: integer
type: type:
enum: enum:
@@ -1681,10 +1674,8 @@ components:
cache_creation: cache_creation:
$ref: '#/components/schemas/AnthropicCacheCreation' $ref: '#/components/schemas/AnthropicCacheCreation'
cache_creation_input_tokens: cache_creation_input_tokens:
nullable: true
type: integer type: integer
cache_read_input_tokens: cache_read_input_tokens:
nullable: true
type: integer type: integer
inference_geo: inference_geo:
nullable: true nullable: true
@@ -2713,7 +2704,6 @@ components:
nullable: true nullable: true
type: boolean type: boolean
completed_at: completed_at:
nullable: true
type: integer type: integer
created_at: created_at:
type: integer type: integer
@@ -2721,7 +2711,6 @@ components:
$ref: '#/components/schemas/ResponsesErrorField' $ref: '#/components/schemas/ResponsesErrorField'
frequency_penalty: frequency_penalty:
format: double format: double
nullable: true
type: number type: number
id: id:
type: string type: string
@@ -2730,10 +2719,8 @@ components:
instructions: instructions:
$ref: '#/components/schemas/BaseInputs' $ref: '#/components/schemas/BaseInputs'
max_output_tokens: max_output_tokens:
nullable: true
type: integer type: integer
max_tool_calls: max_tool_calls:
nullable: true
type: integer type: integer
metadata: metadata:
$ref: '#/components/schemas/RequestMetadata' $ref: '#/components/schemas/RequestMetadata'
@@ -2768,7 +2755,6 @@ components:
type: boolean type: boolean
presence_penalty: presence_penalty:
format: double format: double
nullable: true
type: number type: number
previous_response_id: previous_response_id:
nullable: true nullable: true
@@ -2791,7 +2777,6 @@ components:
type: boolean type: boolean
temperature: temperature:
format: double format: double
nullable: true
type: number type: number
text: text:
$ref: '#/components/schemas/TextConfig' $ref: '#/components/schemas/TextConfig'
@@ -2840,7 +2825,6 @@ components:
type: integer type: integer
top_p: top_p:
format: double format: double
nullable: true
type: number type: number
truncation: truncation:
$ref: '#/components/schemas/Truncation' $ref: '#/components/schemas/Truncation'
@@ -3511,8 +3495,6 @@ components:
- function - function
type: object type: object
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/OpenRouterWebSearchServerTool' - $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
- $ref: '#/components/schemas/ChatWebSearchShorthand' - $ref: '#/components/schemas/ChatWebSearchShorthand'
description: Tool definition for function calling (regular function or OpenRouter built-in server tool) description: Tool definition for function calling (regular function or OpenRouter built-in server tool)
@@ -3671,10 +3653,22 @@ components:
description: Frequency penalty (-2.0 to 2.0) description: Frequency penalty (-2.0 to 2.0)
example: 0 example: 0
format: double format: double
nullable: true
type: number type: number
image_config: image_config:
$ref: '#/components/schemas/ImageConfig' additionalProperties:
anyOf:
- type: string
- format: double
type: number
- items:
nullable: true
type: array
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See
https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
type: object
logit_bias: logit_bias:
additionalProperties: additionalProperties:
format: double format: double
@@ -3692,12 +3686,10 @@ components:
max_completion_tokens: max_completion_tokens:
description: Maximum tokens in completion description: Maximum tokens in completion
example: 100 example: 100
nullable: true
type: integer type: integer
max_tokens: max_tokens:
description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.' description: 'Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.'
example: 100 example: 100
nullable: true
type: integer type: integer
messages: messages:
description: List of messages for the conversation description: List of messages for the conversation
@@ -3763,7 +3755,6 @@ components:
description: Presence penalty (-2.0 to 2.0) description: Presence penalty (-2.0 to 2.0)
example: 0 example: 0
format: double format: double
nullable: true
type: number type: number
provider: provider:
$ref: '#/components/schemas/ProviderPreferences' $ref: '#/components/schemas/ProviderPreferences'
@@ -3812,7 +3803,6 @@ components:
seed: seed:
description: Random seed for deterministic outputs description: Random seed for deterministic outputs
example: 42 example: 42
nullable: true
type: integer type: integer
service_tier: service_tier:
description: The service tier to use for processing this request. description: The service tier to use for processing this request.
@@ -3856,7 +3846,6 @@ components:
description: Sampling temperature (0-2) description: Sampling temperature (0-2)
example: 0.7 example: 0.7
format: double format: double
nullable: true
type: number type: number
tool_choice: tool_choice:
$ref: '#/components/schemas/ChatToolChoice' $ref: '#/components/schemas/ChatToolChoice'
@@ -3873,13 +3862,11 @@ components:
top_logprobs: top_logprobs:
description: Number of top log probabilities to return (0-20) description: Number of top log probabilities to return (0-20)
example: 5 example: 5
nullable: true
type: integer type: integer
top_p: top_p:
description: Nucleus sampling parameter (0-1) description: Nucleus sampling parameter (0-1)
example: 1 example: 1
format: double format: double
nullable: true
type: number type: number
trace: trace:
$ref: '#/components/schemas/TraceConfig' $ref: '#/components/schemas/TraceConfig'
@@ -3949,22 +3936,6 @@ components:
- object - object
- system_fingerprint - system_fingerprint
type: object type: object
ChatSearchModelsServerTool:
description: 'OpenRouter built-in server tool: searches and filters AI models available on OpenRouter'
example:
parameters:
max_results: 5
type: openrouter:experimental__search_models
properties:
parameters:
$ref: '#/components/schemas/SearchModelsServerToolConfig'
type:
enum:
- openrouter:experimental__search_models
type: string
required:
- type
type: object
ChatStreamChoice: ChatStreamChoice:
description: Streaming completion choice chunk description: Streaming completion choice chunk
example: example:
@@ -4358,19 +4329,15 @@ components:
properties: properties:
accepted_prediction_tokens: accepted_prediction_tokens:
description: Accepted prediction tokens description: Accepted prediction tokens
nullable: true
type: integer type: integer
audio_tokens: audio_tokens:
description: Tokens used for audio output description: Tokens used for audio output
nullable: true
type: integer type: integer
reasoning_tokens: reasoning_tokens:
description: Tokens used for reasoning description: Tokens used for reasoning
nullable: true
type: integer type: integer
rejected_prediction_tokens: rejected_prediction_tokens:
description: Rejected prediction tokens description: Rejected prediction tokens
nullable: true
type: integer type: integer
type: object type: object
prompt_tokens: prompt_tokens:
@@ -4912,7 +4879,6 @@ components:
description: Spending limit in USD description: Spending limit in USD
example: 50 example: 50
format: double format: double
nullable: true
type: number type: number
name: name:
description: Name for the new guardrail description: Name for the new guardrail
@@ -5036,26 +5002,22 @@ components:
properties: properties:
frequency_penalty: frequency_penalty:
format: double format: double
nullable: true
type: number type: number
presence_penalty: presence_penalty:
format: double format: double
nullable: true
type: number type: number
repetition_penalty: repetition_penalty:
format: double format: double
nullable: true
type: number type: number
temperature: temperature:
format: double format: double
nullable: true
type: number type: number
top_k: top_k:
minimum: 0
nullable: true nullable: true
type: integer type: integer
top_p: top_p:
format: double format: double
nullable: true
type: number type: number
type: object type: object
DeleteGuardrailResponse: DeleteGuardrailResponse:
@@ -5735,7 +5697,6 @@ components:
description: Spending limit in USD description: Spending limit in USD
example: 100 example: 100
format: double format: double
nullable: true
type: number type: number
name: name:
description: Name of the guardrail description: Name of the guardrail
@@ -5763,22 +5724,6 @@ components:
example: monthly example: monthly
nullable: true nullable: true
type: string type: string
ImageConfig:
additionalProperties:
anyOf:
- type: string
- format: double
type: number
- items:
nullable: true
type: array
description: >-
Provider-specific image configuration options. Keys and values vary by model/provider. See
https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
example:
aspect_ratio: '16:9'
quality: high
type: object
ImageGenCallCompletedEvent: ImageGenCallCompletedEvent:
allOf: allOf:
- $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted' - $ref: '#/components/schemas/OpenAIResponsesImageGenCallCompleted'
@@ -5892,46 +5837,6 @@ components:
required: required:
- type - type
type: object type: object
ImageGenerationServerTool_OpenRouter:
description: 'OpenRouter built-in server tool: generates images from text prompts using an image generation model'
example:
parameters:
model: openai/gpt-image-1
quality: high
size: 1024x1024
type: openrouter:image_generation
properties:
parameters:
$ref: '#/components/schemas/ImageGenerationServerToolConfig'
type:
enum:
- openrouter:image_generation
type: string
required:
- type
type: object
ImageGenerationServerToolConfig:
additionalProperties:
anyOf:
- type: string
- format: double
type: number
- items:
nullable: true
type: array
description: >-
Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio,
quality, size, background, output_format, output_compression, moderation, etc.) plus a model field.
example:
aspect_ratio: '16:9'
model: openai/gpt-image-1
quality: high
properties:
model:
description: Which image generation model to use (e.g. "openai/gpt-image-1"). Defaults to "openai/gpt-image-1".
example: openai/gpt-image-1
type: string
type: object
ImageGenerationStatus: ImageGenerationStatus:
enum: enum:
- in_progress - in_progress
@@ -7573,7 +7478,6 @@ components:
cache_control: cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective' $ref: '#/components/schemas/AnthropicCacheControlDirective'
max_uses: max_uses:
nullable: true
type: integer type: integer
name: name:
enum: enum:
@@ -7611,7 +7515,6 @@ components:
cache_control: cache_control:
$ref: '#/components/schemas/AnthropicCacheControlDirective' $ref: '#/components/schemas/AnthropicCacheControlDirective'
max_uses: max_uses:
nullable: true
type: integer type: integer
name: name:
enum: enum:
@@ -7628,8 +7531,6 @@ components:
- name - name
type: object type: object
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/OpenRouterWebSearchServerTool' - $ref: '#/components/schemas/OpenRouterWebSearchServerTool'
type: array type: array
top_k: top_k:
@@ -7662,7 +7563,6 @@ components:
- properties: - properties:
cost: cost:
format: double format: double
nullable: true
type: number type: number
cost_details: cost_details:
nullable: true nullable: true
@@ -7672,7 +7572,6 @@ components:
type: number type: number
upstream_inference_cost: upstream_inference_cost:
format: double format: double
nullable: true
type: number type: number
upstream_inference_prompt_cost: upstream_inference_prompt_cost:
format: double format: double
@@ -7809,7 +7708,6 @@ components:
- Crusoe - Crusoe
- DeepInfra - DeepInfra
- DeepSeek - DeepSeek
- DekaLLM
- Featherless - Featherless
- Fireworks - Fireworks
- Friendli - Friendli
@@ -7844,7 +7742,6 @@ components:
- Parasail - Parasail
- Perplexity - Perplexity
- Phala - Phala
- Recraft
- Reka - Reka
- Relace - Relace
- SambaNova - SambaNova
@@ -8004,7 +7901,6 @@ components:
context_length: context_length:
description: Maximum context length in tokens description: Maximum context length in tokens
example: 8192 example: 8192
nullable: true
type: integer type: integer
created: created:
description: Unix timestamp of when the model was created description: Unix timestamp of when the model was created
@@ -9970,22 +9866,18 @@ components:
p50: p50:
description: Maximum p50 latency (seconds) description: Maximum p50 latency (seconds)
format: double format: double
nullable: true
type: number type: number
p75: p75:
description: Maximum p75 latency (seconds) description: Maximum p75 latency (seconds)
format: double format: double
nullable: true
type: number type: number
p90: p90:
description: Maximum p90 latency (seconds) description: Maximum p90 latency (seconds)
format: double format: double
nullable: true
type: number type: number
p99: p99:
description: Maximum p99 latency (seconds) description: Maximum p99 latency (seconds)
format: double format: double
nullable: true
type: number type: number
type: object type: object
PercentileStats: PercentileStats:
@@ -10034,22 +9926,18 @@ components:
p50: p50:
description: Minimum p50 throughput (tokens/sec) description: Minimum p50 throughput (tokens/sec)
format: double format: double
nullable: true
type: number type: number
p75: p75:
description: Minimum p75 throughput (tokens/sec) description: Minimum p75 throughput (tokens/sec)
format: double format: double
nullable: true
type: number type: number
p90: p90:
description: Minimum p90 throughput (tokens/sec) description: Minimum p90 throughput (tokens/sec)
format: double format: double
nullable: true
type: number type: number
p99: p99:
description: Minimum p99 throughput (tokens/sec) description: Minimum p99 throughput (tokens/sec)
format: double format: double
nullable: true
type: number type: number
type: object type: object
PerRequestLimits: PerRequestLimits:
@@ -10201,7 +10089,6 @@ components:
- Crusoe - Crusoe
- DeepInfra - DeepInfra
- DeepSeek - DeepSeek
- DekaLLM
- Featherless - Featherless
- Fireworks - Fireworks
- Friendli - Friendli
@@ -10236,7 +10123,6 @@ components:
- Parasail - Parasail
- Perplexity - Perplexity
- Phala - Phala
- Recraft
- Reka - Reka
- Relace - Relace
- SambaNova - SambaNova
@@ -10514,7 +10400,6 @@ components:
- Crusoe - Crusoe
- DeepInfra - DeepInfra
- DeepSeek - DeepSeek
- DekaLLM
- Featherless - Featherless
- Fireworks - Fireworks
- Friendli - Friendli
@@ -10549,7 +10434,6 @@ components:
- Parasail - Parasail
- Perplexity - Perplexity
- Phala - Phala
- Recraft
- Reka - Reka
- Relace - Relace
- SambaNova - SambaNova
@@ -10658,10 +10542,8 @@ components:
latency_last_30m: latency_last_30m:
$ref: '#/components/schemas/PercentileStats' $ref: '#/components/schemas/PercentileStats'
max_completion_tokens: max_completion_tokens:
nullable: true
type: integer type: integer
max_prompt_tokens: max_prompt_tokens:
nullable: true
type: integer type: integer
model_id: model_id:
description: The unique identifier for the model (permaslug) description: The unique identifier for the model (permaslug)
@@ -10759,18 +10641,15 @@ components:
Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) *
100. Rate-limited requests are excluded. Returns null if insufficient data. 100. Rate-limited requests are excluded. Returns null if insufficient data.
format: double format: double
nullable: true
type: number type: number
uptime_last_30m: uptime_last_30m:
format: double format: double
nullable: true
type: number type: number
uptime_last_5m: uptime_last_5m:
description: >- description: >-
Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests)
* 100. Rate-limited requests are excluded. Returns null if insufficient data. * 100. Rate-limited requests are excluded. Returns null if insufficient data.
format: double format: double
nullable: true
type: number type: number
required: required:
- name - name
@@ -10879,7 +10758,6 @@ components:
nullable: true nullable: true
type: boolean type: boolean
max_tokens: max_tokens:
nullable: true
type: integer type: integer
type: object type: object
description: Configuration for reasoning mode in the response description: Configuration for reasoning mode in the response
@@ -11358,10 +11236,19 @@ components:
type: boolean type: boolean
frequency_penalty: frequency_penalty:
format: double format: double
nullable: true
type: number type: number
image_config: image_config:
$ref: '#/components/schemas/ImageConfig' additionalProperties:
anyOf:
- type: string
- format: double
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'
type: object
include: include:
items: items:
$ref: '#/components/schemas/ResponseIncludesEnum' $ref: '#/components/schemas/ResponseIncludesEnum'
@@ -11373,10 +11260,8 @@ components:
nullable: true nullable: true
type: string type: string
max_output_tokens: max_output_tokens:
nullable: true
type: integer type: integer
max_tool_calls: max_tool_calls:
nullable: true
type: integer type: integer
metadata: metadata:
$ref: '#/components/schemas/RequestMetadata' $ref: '#/components/schemas/RequestMetadata'
@@ -11419,7 +11304,6 @@ components:
type: array type: array
presence_penalty: presence_penalty:
format: double format: double
nullable: true
type: number type: number
previous_response_id: previous_response_id:
nullable: true nullable: true
@@ -11465,7 +11349,6 @@ components:
type: boolean type: boolean
temperature: temperature:
format: double format: double
nullable: true
type: number type: number
text: text:
$ref: '#/components/schemas/TextExtendedConfig' $ref: '#/components/schemas/TextExtendedConfig'
@@ -11510,18 +11393,14 @@ components:
- $ref: '#/components/schemas/ApplyPatchServerTool' - $ref: '#/components/schemas/ApplyPatchServerTool'
- $ref: '#/components/schemas/CustomTool' - $ref: '#/components/schemas/CustomTool'
- $ref: '#/components/schemas/DatetimeServerTool' - $ref: '#/components/schemas/DatetimeServerTool'
- $ref: '#/components/schemas/ImageGenerationServerTool_OpenRouter'
- $ref: '#/components/schemas/ChatSearchModelsServerTool'
- $ref: '#/components/schemas/WebSearchServerTool_OpenRouter' - $ref: '#/components/schemas/WebSearchServerTool_OpenRouter'
type: array type: array
top_k: top_k:
type: integer type: integer
top_logprobs: top_logprobs:
nullable: true
type: integer type: integer
top_p: top_p:
format: double format: double
nullable: true
type: number type: number
trace: trace:
$ref: '#/components/schemas/TraceConfig' $ref: '#/components/schemas/TraceConfig'
@@ -11543,16 +11422,6 @@ components:
- high - high
example: medium example: medium
type: string type: string
SearchModelsServerToolConfig:
description: Configuration for the openrouter:experimental__search_models server tool
example:
max_results: 5
properties:
max_results:
description: Maximum number of models to return. Defaults to 5, max 20.
example: 5
type: integer
type: object
SearchQualityLevel: SearchQualityLevel:
description: >- description: >-
How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa How much context to retrieve per result. Defaults to medium (15000 chars). Only applies when using the Exa
@@ -12031,7 +11900,6 @@ components:
context_length: context_length:
description: Context length from the top provider description: Context length from the top provider
example: 8192 example: 8192
nullable: true
type: integer type: integer
is_moderated: is_moderated:
description: Whether the top provider moderates content description: Whether the top provider moderates content
@@ -12040,7 +11908,6 @@ components:
max_completion_tokens: max_completion_tokens:
description: Maximum completion tokens from the top provider description: Maximum completion tokens from the top provider
example: 4096 example: 4096
nullable: true
type: integer type: integer
required: required:
- is_moderated - is_moderated
@@ -12203,7 +12070,6 @@ components:
description: New spending limit in USD description: New spending limit in USD
example: 75 example: 75
format: double format: double
nullable: true
type: number type: number
name: name:
description: New name for the guardrail description: New name for the guardrail
@@ -12273,13 +12139,11 @@ components:
cost: cost:
description: Cost of the completion description: Cost of the completion
format: double format: double
nullable: true
type: number type: number
cost_details: cost_details:
properties: properties:
upstream_inference_cost: upstream_inference_cost:
format: double format: double
nullable: true
type: number type: number
upstream_inference_input_cost: upstream_inference_input_cost:
format: double format: double
@@ -12332,7 +12196,8 @@ components:
duration: duration:
description: Duration of the generated video in seconds description: Duration of the generated video in seconds
example: 8 example: 8
minimum: 1 exclusiveMinimum: true
minimum: 0
type: integer type: integer
frame_images: frame_images:
description: >- description: >-
@@ -12484,10 +12349,6 @@ components:
additionalProperties: additionalProperties:
nullable: true nullable: true
type: object type: object
dekallm:
additionalProperties:
nullable: true
type: object
enfer: enfer:
additionalProperties: additionalProperties:
nullable: true nullable: true
@@ -12688,10 +12549,6 @@ components:
additionalProperties: additionalProperties:
nullable: true nullable: true
type: object type: object
recraft:
additionalProperties:
nullable: true
type: object
recursal: recursal:
additionalProperties: additionalProperties:
nullable: true nullable: true
@@ -12865,7 +12722,6 @@ components:
cost: cost:
description: The cost of the video generation in USD. description: The cost of the video generation in USD.
format: double format: double
nullable: true
type: number type: number
is_byok: is_byok:
description: Whether the request was made using a Bring Your Own Key configuration. description: Whether the request was made using a Bring Your Own Key configuration.
@@ -14063,7 +13919,8 @@ paths:
dimensions: dimensions:
description: The number of dimensions for the output embeddings description: The number of dimensions for the output embeddings
example: 1536 example: 1536
minimum: 1 exclusiveMinimum: 0
minimum: 0
type: integer type: integer
encoding_format: encoding_format:
description: The format of the output embeddings description: The format of the output embeddings
@@ -14603,13 +14460,11 @@ paths:
app_id: app_id:
description: ID of the app that made the request description: ID of the app that made the request
example: 12345 example: 12345
nullable: true
type: integer type: integer
cache_discount: cache_discount:
description: Discount applied due to caching description: Discount applied due to caching
example: 0.0002 example: 0.0002
format: double format: double
nullable: true
type: number type: number
cancelled: cancelled:
description: Whether the generation was cancelled description: Whether the generation was cancelled
@@ -14634,7 +14489,6 @@ paths:
description: Time taken for generation in milliseconds description: Time taken for generation in milliseconds
example: 1200 example: 1200
format: double format: double
nullable: true
type: number type: number
http_referer: http_referer:
description: Referer header from the request description: Referer header from the request
@@ -14652,7 +14506,6 @@ paths:
description: Total latency in milliseconds description: Total latency in milliseconds
example: 1250 example: 1250
format: double format: double
nullable: true
type: number type: number
model: model:
description: Model used for the generation description: Model used for the generation
@@ -14662,7 +14515,6 @@ paths:
description: Moderation latency in milliseconds description: Moderation latency in milliseconds
example: 50 example: 50
format: double format: double
nullable: true
type: number type: number
native_finish_reason: native_finish_reason:
description: Native finish reason as reported by provider description: Native finish reason as reported by provider
@@ -14672,47 +14524,38 @@ paths:
native_tokens_cached: native_tokens_cached:
description: Native cached tokens as reported by provider description: Native cached tokens as reported by provider
example: 3 example: 3
nullable: true
type: integer type: integer
native_tokens_completion: native_tokens_completion:
description: Native completion tokens as reported by provider description: Native completion tokens as reported by provider
example: 25 example: 25
nullable: true
type: integer type: integer
native_tokens_completion_images: native_tokens_completion_images:
description: Native completion image tokens as reported by provider description: Native completion image tokens as reported by provider
example: 0 example: 0
nullable: true
type: integer type: integer
native_tokens_prompt: native_tokens_prompt:
description: Native prompt tokens as reported by provider description: Native prompt tokens as reported by provider
example: 10 example: 10
nullable: true
type: integer type: integer
native_tokens_reasoning: native_tokens_reasoning:
description: Native reasoning tokens as reported by provider description: Native reasoning tokens as reported by provider
example: 5 example: 5
nullable: true
type: integer type: integer
num_input_audio_prompt: num_input_audio_prompt:
description: Number of audio inputs in the prompt description: Number of audio inputs in the prompt
example: 0 example: 0
nullable: true
type: integer type: integer
num_media_completion: num_media_completion:
description: Number of media items in the completion description: Number of media items in the completion
example: 0 example: 0
nullable: true
type: integer type: integer
num_media_prompt: num_media_prompt:
description: Number of media items in the prompt description: Number of media items in the prompt
example: 1 example: 1
nullable: true
type: integer type: integer
num_search_results: num_search_results:
description: Number of search results included description: Number of search results included
example: 5 example: 5
nullable: true
type: integer type: integer
origin: origin:
description: Origin URL of the request description: Origin URL of the request
@@ -14751,12 +14594,10 @@ paths:
tokens_completion: tokens_completion:
description: Number of tokens in the completion description: Number of tokens in the completion
example: 25 example: 25
nullable: true
type: integer type: integer
tokens_prompt: tokens_prompt:
description: Number of tokens in the prompt description: Number of tokens in the prompt
example: 10 example: 10
nullable: true
type: integer type: integer
total_cost: total_cost:
description: Total cost of the generation in USD description: Total cost of the generation in USD
@@ -14772,7 +14613,6 @@ paths:
description: Cost charged by the upstream provider description: Cost charged by the upstream provider
example: 0.0012 example: 0.0012
format: double format: double
nullable: true
type: number type: number
usage: usage:
description: Usage amount in USD description: Usage amount in USD
@@ -14923,7 +14763,6 @@ paths:
description: Number of records to skip for pagination description: Number of records to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
- description: Maximum number of records to return (max 100) - description: Maximum number of records to return (max 100)
in: query in: query
@@ -15319,7 +15158,6 @@ paths:
description: Number of records to skip for pagination description: Number of records to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
- description: Maximum number of records to return (max 100) - description: Maximum number of records to return (max 100)
in: query in: query
@@ -15572,7 +15410,6 @@ paths:
description: Number of records to skip for pagination description: Number of records to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
- description: Maximum number of records to return (max 100) - description: Maximum number of records to return (max 100)
in: query in: query
@@ -15817,7 +15654,6 @@ paths:
description: Number of records to skip for pagination description: Number of records to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
- description: Maximum number of records to return (max 100) - description: Maximum number of records to return (max 100)
in: query in: query
@@ -15896,7 +15732,6 @@ paths:
description: Number of records to skip for pagination description: Number of records to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
- description: Maximum number of records to return (max 100) - description: Maximum number of records to return (max 100)
in: query in: query
@@ -16101,13 +15936,11 @@ paths:
description: Spending limit for the API key in USD description: Spending limit for the API key in USD
example: 100 example: 100
format: double format: double
nullable: true
type: number type: number
limit_remaining: limit_remaining:
description: Remaining spending limit in USD description: Remaining spending limit in USD
example: 74.5 example: 74.5
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: Type of limit reset for the API key description: Type of limit reset for the API key
@@ -16231,7 +16064,6 @@ paths:
description: Number of API keys to skip for pagination description: Number of API keys to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
responses: responses:
'200': '200':
@@ -16365,13 +16197,11 @@ paths:
description: Spending limit for the API key in USD description: Spending limit for the API key in USD
example: 100 example: 100
format: double format: double
nullable: true
type: number type: number
limit_remaining: limit_remaining:
description: Remaining spending limit in USD description: Remaining spending limit in USD
example: 74.5 example: 74.5
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: Type of limit reset for the API key description: Type of limit reset for the API key
@@ -16513,7 +16343,6 @@ paths:
description: Optional spending limit for the API key in USD description: Optional spending limit for the API key in USD
example: 50 example: 50
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: >- description: >-
@@ -16669,13 +16498,11 @@ paths:
description: Spending limit for the API key in USD description: Spending limit for the API key in USD
example: 100 example: 100
format: double format: double
nullable: true
type: number type: number
limit_remaining: limit_remaining:
description: Remaining spending limit in USD description: Remaining spending limit in USD
example: 74.5 example: 74.5
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: Type of limit reset for the API key description: Type of limit reset for the API key
@@ -17004,13 +16831,11 @@ paths:
description: Spending limit for the API key in USD description: Spending limit for the API key in USD
example: 100 example: 100
format: double format: double
nullable: true
type: number type: number
limit_remaining: limit_remaining:
description: Remaining spending limit in USD description: Remaining spending limit in USD
example: 74.5 example: 74.5
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: Type of limit reset for the API key description: Type of limit reset for the API key
@@ -17156,7 +16981,6 @@ paths:
description: New spending limit for the API key in USD description: New spending limit for the API key in USD
example: 75 example: 75
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: >- description: >-
@@ -17307,13 +17131,11 @@ paths:
description: Spending limit for the API key in USD description: Spending limit for the API key in USD
example: 100 example: 100
format: double format: double
nullable: true
type: number type: number
limit_remaining: limit_remaining:
description: Remaining spending limit in USD description: Remaining spending limit in USD
example: 74.5 example: 74.5
format: double format: double
nullable: true
type: number type: number
limit_reset: limit_reset:
description: Type of limit reset for the API key description: Type of limit reset for the API key
@@ -17983,7 +17805,6 @@ paths:
description: Number of records to skip for pagination description: Number of records to skip for pagination
example: 0 example: 0
minimum: 0 minimum: 0
nullable: true
type: integer type: integer
- description: Maximum number of records to return (max 100) - description: Maximum number of records to return (max 100)
in: query in: query
@@ -18746,7 +18567,8 @@ paths:
top_n: top_n:
description: Number of most relevant documents to return description: Number of most relevant documents to return
example: 3 example: 3
minimum: 1 exclusiveMinimum: 0
minimum: 0
type: integer type: integer
required: required:
- model - model
+17643 -17800
View File
File diff suppressed because it is too large Load Diff
@@ -1,10 +0,0 @@
overlay: 1.0.0
x-speakeasy-jsonpath: rfc9535
info:
title: Fix nullable pagination params
version: 0.0.0
actions:
- target: $..parameters[?@.name == "offset" && @.in == "query"].schema
description: Remove nullable from offset query params to fix mypy errors in pagination helpers
update:
nullable: false
+5 -8
View File
@@ -2,8 +2,8 @@ speakeasyVersion: 1.680.0
sources: sources:
OpenRouter API: OpenRouter API:
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9 sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
tags: tags:
- latest - latest
- 1.0.0 - 1.0.0
@@ -11,10 +11,10 @@ targets:
open-router: open-router:
source: OpenRouter API source: OpenRouter API
sourceNamespace: open-router-chat-completions-api sourceNamespace: open-router-chat-completions-api
sourceRevisionDigest: sha256:3982892b2b8f82bfc2a26a0f6fcc9512b665a1051dc240a9cfa29001b9453aa9 sourceRevisionDigest: sha256:0795e89fdc7634204a5e1c93c441069d7bfb349fc1c7f43a53db24f0803c72fa
sourceBlobDigest: sha256:727d3c1f7d36ffbf94c57b565536d8a16804eaef4c4043dd6c98152fc1629c8f sourceBlobDigest: sha256:bb920e0d3ed7fb2c204d06aa436d9ce9a3635727d3a6147a7a2798333458d12a
codeSamplesNamespace: open-router-python-code-samples codeSamplesNamespace: open-router-python-code-samples
codeSamplesRevisionDigest: sha256:db86aed74d199f265e2e20442ef652dac0911c8a657ccb3e6614d56a26b8b44e codeSamplesRevisionDigest: sha256:c368e0601d6b667625dd99ffcd53e69e3dc98a4b518a45444add6457dde83b22
workflow: workflow:
workflowVersion: 1.0.0 workflowVersion: 1.0.0
speakeasyVersion: 1.680.0 speakeasyVersion: 1.680.0
@@ -26,9 +26,6 @@ workflow:
- location: .speakeasy/overlays/open-enums.overlay.yaml - location: .speakeasy/overlays/open-enums.overlay.yaml
- location: .speakeasy/overlays/remove-rss-responses.overlay.yaml - location: .speakeasy/overlays/remove-rss-responses.overlay.yaml
- location: .speakeasy/overlays/add-headers.overlay.yaml - location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml output: .speakeasy/out.openapi.yaml
registry: registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
-1
View File
@@ -10,7 +10,6 @@ sources:
- location: .speakeasy/overlays/add-headers.overlay.yaml - location: .speakeasy/overlays/add-headers.overlay.yaml
- location: .speakeasy/overlays/allof-simplify.overlay.yaml - location: .speakeasy/overlays/allof-simplify.overlay.yaml
- location: .speakeasy/overlays/boolean-query-params.overlay.yaml - location: .speakeasy/overlays/boolean-query-params.overlay.yaml
- location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml
output: .speakeasy/out.openapi.yaml output: .speakeasy/out.openapi.yaml
registry: registry:
location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api
-30
View File
@@ -169,36 +169,6 @@ asyncio.run(main())
<!-- No Custom HTTP Client [http-client] --> <!-- No Custom HTTP Client [http-client] -->
<!-- Start Pagination [pagination] -->
## Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.
Here's an example of one such pagination call:
```python
from openrouter import OpenRouter
import os
with OpenRouter(
http_referer="<value>",
x_open_router_title="<value>",
x_open_router_categories="<value>",
api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router:
res = open_router.guardrails.list()
while res is not None:
# Handle items
res = res.next()
```
<!-- End Pagination [pagination] -->
<!-- Start Resource Management [resource-management] --> <!-- Start Resource Management [resource-management] -->
## Resource Management ## Resource Management
+10 -6
View File
@@ -12,10 +12,12 @@ with OpenRouter(
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
res = open_router.analytics.get_user_activity() res = open_router.beta.responses.send(service_tier="auto", stream=False)
# Handle response with res as event_stream:
print(res) for event in event_stream:
# handle event
print(event, flush=True)
``` ```
</br> </br>
@@ -37,10 +39,12 @@ async def main():
api_key=os.getenv("OPENROUTER_API_KEY", ""), api_key=os.getenv("OPENROUTER_API_KEY", ""),
) as open_router: ) as open_router:
res = await open_router.analytics.get_user_activity_async() res = await open_router.beta.responses.send_async(service_tier="auto", stream=False)
# Handle response async with res as event_stream:
print(res) async for event in event_stream:
# handle event
print(event, flush=True)
asyncio.run(main()) asyncio.run(main())
``` ```
+7 -7
View File
@@ -5,14 +5,14 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
| `completion_tokens` | *int* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `date_` | *str* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 | | `date_` | *str* | :heavy_check_mark: | Date of the activity (YYYY-MM-DD format) | 2025-08-24 |
| `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
| `model` | *str* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 | | `model` | *str* | :heavy_check_mark: | Model slug (e.g., "openai/gpt-4.1") | openai/gpt-4.1 |
| `model_permaslug` | *str* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 | | `model_permaslug` | *str* | :heavy_check_mark: | Model permaslug (e.g., "openai/gpt-4.1-2025-04-14") | openai/gpt-4.1-2025-04-14 |
| `prompt_tokens` | *int* | :heavy_check_mark: | Total prompt tokens used | 50 | | `endpoint_id` | *str* | :heavy_check_mark: | Unique identifier for the endpoint | 550e8400-e29b-41d4-a716-446655440000 |
| `provider_name` | *str* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI | | `provider_name` | *str* | :heavy_check_mark: | Name of the provider serving this endpoint | OpenAI |
| `reasoning_tokens` | *int* | :heavy_check_mark: | Total reasoning tokens used | 25 | | `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 |
| `requests` | *int* | :heavy_check_mark: | Number of requests made | 5 | | `byok_usage_inference` | *float* | :heavy_check_mark: | BYOK inference cost in USD (external credits spent) | 0.012 |
| `usage` | *float* | :heavy_check_mark: | Total cost in USD (OpenRouter credits spent) | 0.015 | | `requests` | *float* | :heavy_check_mark: | Number of requests made | 5 |
| `prompt_tokens` | *float* | :heavy_check_mark: | Total prompt tokens used | 50 |
| `completion_tokens` | *float* | :heavy_check_mark: | Total completion tokens generated | 125 |
| `reasoning_tokens` | *float* | :heavy_check_mark: | Total reasoning tokens used | 25 |
+4 -4
View File
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | | | `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT |
| `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | chatml | | `instruct_type` | [Nullable[components.InstructType]](../components/instructtype.md) | :heavy_check_mark: | Instruction format type | |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text | | `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | | | `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `tokenizer` | [Nullable[components.Tokenizer]](../components/tokenizer.md) | :heavy_check_mark: | N/A | GPT | | `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
+4 -4
View File
@@ -7,7 +7,7 @@ Detailed completion token usage
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- |
| `accepted_prediction_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Accepted prediction tokens | | `reasoning_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for reasoning |
| `audio_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Tokens used for audio output | | `audio_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Tokens used for audio output |
| `reasoning_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Tokens used for reasoning | | `accepted_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Accepted prediction tokens |
| `rejected_prediction_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Rejected prediction tokens | | `rejected_prediction_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Rejected prediction tokens |
+1 -1
View File
@@ -7,4 +7,4 @@ Model count data
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- |
| `count` | *int* | :heavy_check_mark: | Total number of available models | 150 | | `count` | *float* | :heavy_check_mark: | Total number of available models | 150 |
+4 -4
View File
@@ -7,9 +7,9 @@ Default parameters for this model
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------------- | ------------------------- | ------------------------- | ------------------------- | | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A |
+2 -2
View File
@@ -7,5 +7,5 @@ Error information
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------- | ------------------- | ------------------- | ------------------- | ------------------- | | ------------------- | ------------------- | ------------------- | ------------------- | ------------------- |
| `code` | *int* | :heavy_check_mark: | Error code | 429 | | `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded |
| `message` | *str* | :heavy_check_mark: | Error message | Rate limit exceeded | | `code` | *float* | :heavy_check_mark: | Error code | 429 |
+2 -2
View File
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A | | `file_id` | *str* | :heavy_check_mark: | N/A |
| `filename` | *str* | :heavy_check_mark: | N/A | | `filename` | *str* | :heavy_check_mark: | N/A |
| `index` | *int* | :heavy_check_mark: | N/A | | `index` | *float* | :heavy_check_mark: | N/A |
| `type` | [components.FileCitationType](../components/filecitationtype.md) | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -5,6 +5,6 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
| `file_id` | *str* | :heavy_check_mark: | N/A | | `file_id` | *str* | :heavy_check_mark: | N/A |
| `index` | *int* | :heavy_check_mark: | N/A | | `index` | *float* | :heavy_check_mark: | N/A |
| `type` | [components.FilePathType](../components/filepathtype.md) | :heavy_check_mark: | N/A |
+1 -1
View File
@@ -5,4 +5,4 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ |
| `cached_tokens` | *int* | :heavy_check_mark: | N/A | | `cached_tokens` | *float* | :heavy_check_mark: | N/A |
+5 -5
View File
@@ -7,9 +7,9 @@ List of available endpoints for a model
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `architecture` | [components.Architecture](../components/architecture.md) | :heavy_check_mark: | N/A | {<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>} |
| `created` | *int* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `description` | *str* | :heavy_check_mark: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `endpoints` | List[[components.PublicEndpoint](../components/publicendpoint.md)] | :heavy_check_mark: | List of available endpoints for this model | |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 | | `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 | | `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
| `created` | *float* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `description` | *str* | :heavy_check_mark: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `architecture` | [components.Architecture](../components/architecture.md) | :heavy_check_mark: | N/A | {<br/>"tokenizer": "GPT",<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"input_modalities": [<br/>"text"<br/>],<br/>"output_modalities": [<br/>"text"<br/>]<br/>} |
| `endpoints` | List[[components.PublicEndpoint](../components/publicendpoint.md)] | :heavy_check_mark: | List of available endpoints for this model | |
+12 -13
View File
@@ -7,19 +7,18 @@ Information about an AI model available on OpenRouter
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>} |
| `canonical_slug` | *str* | :heavy_check_mark: | Canonical slug for the model | openai/gpt-4 |
| `context_length` | *Nullable[int]* | :heavy_check_mark: | Maximum context length in tokens | 8192 |
| `created` | *int* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"frequency_penalty": 0,<br/>"presence_penalty": 0,<br/>"repetition_penalty": 1,<br/>"temperature": 0.7,<br/>"top_k": 0,<br/>"top_p": 0.9<br/>} |
| `description` | *Optional[str]* | :heavy_minus_sign: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
| `hugging_face_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 | | `id` | *str* | :heavy_check_mark: | Unique identifier for the model | openai/gpt-4 |
| `knowledge_cutoff` | *OptionalNullable[str]* | :heavy_minus_sign: | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 | | `canonical_slug` | *str* | :heavy_check_mark: | Canonical slug for the model | openai/gpt-4 |
| `links` | [components.ModelLinks](../components/modellinks.md) | :heavy_check_mark: | Related API endpoints and resources for this model. | {<br/>"details": "/api/v1/models/openai/gpt-5.4/endpoints"<br/>} | | `hugging_face_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Hugging Face model identifier, if applicable | microsoft/DialoGPT-medium |
| `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 | | `name` | *str* | :heavy_check_mark: | Display name of the model | GPT-4 |
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"completion_tokens": 1000,<br/>"prompt_tokens": 1000<br/>} | | `created` | *float* | :heavy_check_mark: | Unix timestamp of when the model was created | 1692901234 |
| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>} | | `description` | *Optional[str]* | :heavy_minus_sign: | Description of the model | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy. |
| `pricing` | [components.PublicPricing](../components/publicpricing.md) | :heavy_check_mark: | Pricing information for the model | {<br/>"prompt": "0.00003",<br/>"completion": "0.00006",<br/>"request": "0",<br/>"image": "0"<br/>} |
| `context_length` | *Nullable[float]* | :heavy_check_mark: | Maximum context length in tokens | 8192 |
| `architecture` | [components.ModelArchitecture](../components/modelarchitecture.md) | :heavy_check_mark: | Model architecture information | {<br/>"tokenizer": "GPT",<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"input_modalities": [<br/>"text"<br/>],<br/>"output_modalities": [<br/>"text"<br/>]<br/>} |
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"max_completion_tokens": 4096,<br/>"is_moderated": true<br/>} |
| `per_request_limits` | [Nullable[components.PerRequestLimits]](../components/perrequestlimits.md) | :heavy_check_mark: | Per-request token limits | {<br/>"prompt_tokens": 1000,<br/>"completion_tokens": 1000<br/>} |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | | | `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | List of supported parameters for this model | |
| `top_provider` | [components.TopProviderInfo](../components/topproviderinfo.md) | :heavy_check_mark: | Information about the top provider for this model | {<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>} | | `default_parameters` | [Nullable[components.DefaultParameters]](../components/defaultparameters.md) | :heavy_check_mark: | Default parameters for this model | {<br/>"temperature": 0.7,<br/>"top_p": 0.9,<br/>"top_k": 0,<br/>"frequency_penalty": 0,<br/>"presence_penalty": 0,<br/>"repetition_penalty": 1<br/>} |
| `knowledge_cutoff` | *OptionalNullable[str]* | :heavy_minus_sign: | The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown. | 2024-10-01 |
| `expiration_date` | *OptionalNullable[str]* | :heavy_minus_sign: | The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration. | 2025-06-01 |
+3 -3
View File
@@ -7,8 +7,8 @@ Model architecture information
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | | | `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT |
| `instruct_type` | [OptionalNullable[components.ModelArchitectureInstructType]](../components/modelarchitectureinstructtype.md) | :heavy_minus_sign: | Instruction format type | chatml | | `instruct_type` | [OptionalNullable[components.ModelArchitectureInstructType]](../components/modelarchitectureinstructtype.md) | :heavy_minus_sign: | Instruction format type | chatml |
| `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text->text | | `modality` | *Nullable[str]* | :heavy_check_mark: | Primary modality of the model | text->text |
| `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | | | `input_modalities` | List[[components.InputModality](../components/inputmodality.md)] | :heavy_check_mark: | Supported input modalities | |
| `tokenizer` | [Optional[components.ModelGroup]](../components/modelgroup.md) | :heavy_minus_sign: | Tokenizer type used by the model | GPT | | `output_modalities` | List[[components.OutputModality](../components/outputmodality.md)] | :heavy_check_mark: | Supported output modalities | |
-1
View File
@@ -13,7 +13,6 @@ Tokenizer type used by the model
| `GPT` | GPT | | `GPT` | GPT |
| `CLAUDE` | Claude | | `CLAUDE` | Claude |
| `GEMINI` | Gemini | | `GEMINI` | Gemini |
| `GEMMA` | Gemma |
| `GROK` | Grok | | `GROK` | Grok |
| `COHERE` | Cohere | | `COHERE` | Cohere |
| `NOVA` | Nova | | `NOVA` | Nova |
+3 -3
View File
@@ -5,6 +5,6 @@ List of available models
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models | [<br/>{<br/>"architecture": {<br/>"input_modalities": [<br/>"text"<br/>],<br/>"instruct_type": "chatml",<br/>"modality": "text-\u003etext",<br/>"output_modalities": [<br/>"text"<br/>],<br/>"tokenizer": "GPT"<br/>},<br/>"canonical_slug": "openai/gpt-4",<br/>"context_length": 8192,<br/>"created": 1692901234,<br/>"default_parameters": null,<br/>"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.",<br/>"expiration_date": null,<br/>"id": "openai/gpt-4",<br/>"knowledge_cutoff": null,<br/>"links": {<br/>"details": "/api/v1/models/openai/gpt-5.4/endpoints"<br/>},<br/>"name": "GPT-4",<br/>"per_request_limits": null,<br/>"pricing": {<br/>"completion": "0.00006",<br/>"image": "0",<br/>"prompt": "0.00003",<br/>"request": "0"<br/>},<br/>"supported_parameters": [<br/>"temperature",<br/>"top_p",<br/>"max_tokens"<br/>],<br/>"top_provider": {<br/>"context_length": 8192,<br/>"is_moderated": true,<br/>"max_completion_tokens": 4096<br/>}<br/>}<br/>] | | `data` | List[[components.Model](../components/model.md)] | :heavy_check_mark: | List of available models |
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `refusal` | *str* | :heavy_check_mark: | N/A | | `type` | [components.OpenAIResponsesRefusalContentType](../components/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A |
| `type` | [components.OpenAIResponsesRefusalContentType](../components/openairesponsesrefusalcontenttype.md) | :heavy_check_mark: | N/A | | `refusal` | *str* | :heavy_check_mark: | N/A |
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | N/A | | `type` | [components.OpenAIResponsesToolChoiceTypeFunction](../components/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A |
| `type` | [components.OpenAIResponsesToolChoiceTypeFunction](../components/openairesponsestoolchoicetypefunction.md) | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A |
@@ -33,9 +33,3 @@ value: components.OpenAIResponsesToolChoiceFunction = /* values here */
value: components.OpenAIResponsesToolChoice = /* values here */ value: components.OpenAIResponsesToolChoice = /* values here */
``` ```
### `components.ToolChoiceAllowed`
```python
value: components.ToolChoiceAllowed = /* values here */
```
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `type` | [components.OutputItemImageGenerationCallType](../components/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
| `id` | *str* | :heavy_check_mark: | N/A | | | `id` | *str* | :heavy_check_mark: | N/A | |
| `result` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `result` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed | | `status` | [components.ImageGenerationStatus](../components/imagegenerationstatus.md) | :heavy_check_mark: | N/A | completed |
| `type` | [components.OutputItemImageGenerationCallType](../components/outputitemimagegenerationcalltype.md) | :heavy_check_mark: | N/A | |
+3 -3
View File
@@ -5,9 +5,9 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `content` | List[[components.OutputMessageContent](../components/outputmessagecontent.md)] | :heavy_check_mark: | N/A |
| `id` | *str* | :heavy_check_mark: | N/A | | `id` | *str* | :heavy_check_mark: | N/A |
| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. |
| `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A | | `role` | [components.OutputMessageRole](../components/outputmessagerole.md) | :heavy_check_mark: | N/A |
| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A |
| `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A | | `status` | [Optional[components.OutputMessageStatusUnion]](../components/outputmessagestatusunion.md) | :heavy_minus_sign: | N/A |
| `type` | [components.OutputMessageType](../components/outputmessagetype.md) | :heavy_check_mark: | N/A | | `content` | List[[components.OutputMessageContent](../components/outputmessagecontent.md)] | :heavy_check_mark: | N/A |
| `phase` | [OptionalNullable[components.OutputMessagePhaseUnion]](../components/outputmessagephaseunion.md) | :heavy_minus_sign: | The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. |
+1 -2
View File
@@ -9,5 +9,4 @@
| `IMAGE` | image | | `IMAGE` | image |
| `EMBEDDINGS` | embeddings | | `EMBEDDINGS` | embeddings |
| `AUDIO` | audio | | `AUDIO` | audio |
| `VIDEO` | video | | `VIDEO` | video |
| `RERANK` | rerank |
+1 -1
View File
@@ -5,4 +5,4 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ |
| `reasoning_tokens` | *int* | :heavy_check_mark: | N/A | | `reasoning_tokens` | *float* | :heavy_check_mark: | N/A |
+26 -27
View File
@@ -3,30 +3,29 @@
## Values ## Values
| Name | Value | | Name | Value |
| ----------------------- | ----------------------- | | --------------------- | --------------------- |
| `TEMPERATURE` | temperature | | `TEMPERATURE` | temperature |
| `TOP_P` | top_p | | `TOP_P` | top_p |
| `TOP_K` | top_k | | `TOP_K` | top_k |
| `MIN_P` | min_p | | `MIN_P` | min_p |
| `TOP_A` | top_a | | `TOP_A` | top_a |
| `FREQUENCY_PENALTY` | frequency_penalty | | `FREQUENCY_PENALTY` | frequency_penalty |
| `PRESENCE_PENALTY` | presence_penalty | | `PRESENCE_PENALTY` | presence_penalty |
| `REPETITION_PENALTY` | repetition_penalty | | `REPETITION_PENALTY` | repetition_penalty |
| `MAX_TOKENS` | max_tokens | | `MAX_TOKENS` | max_tokens |
| `MAX_COMPLETION_TOKENS` | max_completion_tokens | | `LOGIT_BIAS` | logit_bias |
| `LOGIT_BIAS` | logit_bias | | `LOGPROBS` | logprobs |
| `LOGPROBS` | logprobs | | `TOP_LOGPROBS` | top_logprobs |
| `TOP_LOGPROBS` | top_logprobs | | `SEED` | seed |
| `SEED` | seed | | `RESPONSE_FORMAT` | response_format |
| `RESPONSE_FORMAT` | response_format | | `STRUCTURED_OUTPUTS` | structured_outputs |
| `STRUCTURED_OUTPUTS` | structured_outputs | | `STOP` | stop |
| `STOP` | stop | | `TOOLS` | tools |
| `TOOLS` | tools | | `TOOL_CHOICE` | tool_choice |
| `TOOL_CHOICE` | tool_choice | | `PARALLEL_TOOL_CALLS` | parallel_tool_calls |
| `PARALLEL_TOOL_CALLS` | parallel_tool_calls | | `INCLUDE_REASONING` | include_reasoning |
| `INCLUDE_REASONING` | include_reasoning | | `REASONING` | reasoning |
| `REASONING` | reasoning | | `REASONING_EFFORT` | reasoning_effort |
| `REASONING_EFFORT` | reasoning_effort | | `WEB_SEARCH_OPTIONS` | web_search_options |
| `WEB_SEARCH_OPTIONS` | web_search_options | | `VERBOSITY` | verbosity |
| `VERBOSITY` | verbosity |
+3 -3
View File
@@ -5,6 +5,6 @@ Options for PDF parsing.
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". | cloudflare-ai | | `engine` | [Optional[components.PDFParserEngine]](../components/pdfparserengine.md) | :heavy_minus_sign: | The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". |
+2 -2
View File
@@ -7,5 +7,5 @@ Per-request token limits
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- |
| `completion_tokens` | *float* | :heavy_check_mark: | Maximum completion tokens per request | 1000 | | `prompt_tokens` | *float* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 |
| `prompt_tokens` | *float* | :heavy_check_mark: | Maximum prompt tokens per request | 1000 | | `completion_tokens` | *float* | :heavy_check_mark: | Maximum completion tokens per request | 1000 |
+9 -9
View File
@@ -5,17 +5,17 @@
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+4 -4
View File
@@ -7,7 +7,7 @@ Detailed prompt token usage
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `audio_tokens` | *Optional[int]* | :heavy_minus_sign: | Audio input tokens | | `cached_tokens` | *Optional[float]* | :heavy_minus_sign: | Cached prompt tokens |
| `cache_write_tokens` | *Optional[int]* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. | | `cache_write_tokens` | *Optional[float]* | :heavy_minus_sign: | Tokens written to cache. Only returned for models with explicit caching and cache write pricing. |
| `cached_tokens` | *Optional[int]* | :heavy_minus_sign: | Cached prompt tokens | | `audio_tokens` | *Optional[float]* | :heavy_minus_sign: | Audio input tokens |
| `video_tokens` | *Optional[int]* | :heavy_minus_sign: | Video input tokens | | `video_tokens` | *Optional[float]* | :heavy_minus_sign: | Video input tokens |
-2
View File
@@ -29,7 +29,6 @@
| `CRUSOE` | Crusoe | | `CRUSOE` | Crusoe |
| `DEEP_INFRA` | DeepInfra | | `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek | | `DEEP_SEEK` | DeepSeek |
| `DEKA_LLM` | DekaLLM |
| `FEATHERLESS` | Featherless | | `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks | | `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli | | `FRIENDLI` | Friendli |
@@ -64,7 +63,6 @@
| `PARASAIL` | Parasail | | `PARASAIL` | Parasail |
| `PERPLEXITY` | Perplexity | | `PERPLEXITY` | Perplexity |
| `PHALA` | Phala | | `PHALA` | Phala |
| `RECRAFT` | Recraft |
| `REKA` | Reka | | `REKA` | Reka |
| `RELACE` | Relace | | `RELACE` | Relace |
| `SAMBA_NOVA` | SambaNova | | `SAMBA_NOVA` | SambaNova |
+12 -12
View File
@@ -1,6 +1,6 @@
# ProviderPreferences # ProviderPreferences
When multiple model providers are available, optionally indicate your routing preference. Provider routing preferences for the request.
## Fields ## Fields
@@ -8,15 +8,15 @@ When multiple model providers are available, optionally indicate your routing pr
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | | | `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> | |
| `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
| `ignore` | List[[components.Ignore](../components/ignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | [<br/>"openai",<br/>"anthropic"<br/>] |
| `max_price` | [Optional[components.MaxPrice]](../components/maxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. | |
| `only` | List[[components.Only](../components/only.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | [<br/>"openai",<br/>"anthropic"<br/>] |
| `order` | List[[components.Order](../components/order.md)] | :heavy_minus_sign: | 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. | [<br/>"openai",<br/>"anthropic"<br/>] |
| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | 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. | 5 |
| `preferred_min_throughput` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | 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. | 100 |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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. | | | `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | 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. | |
| `sort` | [OptionalNullable[components.Sort]](../components/sort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. | price | | `data_collection` | [OptionalNullable[components.DataCollection]](../components/datacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/><br/>- deny: use only providers which do not collect user data. | allow |
| `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true | | `zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. | true |
| `enforce_distillable_text` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. | true |
| `order` | List[[components.ProviderPreferencesOrder](../components/providerpreferencesorder.md)] | :heavy_minus_sign: | 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` | List[[components.ProviderPreferencesOnly](../components/providerpreferencesonly.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. | |
| `ignore` | List[[components.ProviderPreferencesIgnore](../components/providerpreferencesignore.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. | |
| `quantizations` | List[[components.Quantization](../components/quantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. | |
| `sort` | [OptionalNullable[components.ProviderPreferencesSortUnion]](../components/providerpreferencessortunion.md) | :heavy_minus_sign: | N/A | price |
| `max_price` | [Optional[components.ProviderPreferencesMaxPrice]](../components/providerpreferencesmaxprice.md) | :heavy_minus_sign: | 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` | [OptionalNullable[components.PreferredMinThroughput]](../components/preferredminthroughput.md) | :heavy_minus_sign: | 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. | 100 |
| `preferred_max_latency` | [OptionalNullable[components.PreferredMaxLatency]](../components/preferredmaxlatency.md) | :heavy_minus_sign: | 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. | 5 |
+13
View File
@@ -0,0 +1,13 @@
# ProviderPreferencesBy
The provider sorting strategy (price, throughput, latency)
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -0,0 +1,17 @@
# ProviderPreferencesIgnore
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,14 @@
# ProviderPreferencesMaxPrice
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- |
| `prompt` | *Optional[str]* | :heavy_minus_sign: | Price per million prompt tokens | 1000 |
| `completion` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
@@ -0,0 +1,17 @@
# ProviderPreferencesOnly
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,17 @@
# ProviderPreferencesOrder
## Supported Types
### `components.ProviderName`
```python
value: components.ProviderName = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,11 @@
# ProviderPreferencesPartition
Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
## Values
| Name | Value |
| ------- | ------- |
| `MODEL` | model |
| `NONE` | none |
@@ -0,0 +1,13 @@
# ProviderPreferencesProviderSort
The provider sorting strategy (price, throughput, latency)
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -0,0 +1,9 @@
# ProviderPreferencesProviderSortConfig
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `by` | [OptionalNullable[components.ProviderPreferencesBy]](../components/providerpreferencesby.md) | :heavy_minus_sign: | The provider sorting strategy (price, throughput, latency) | price |
| `partition` | [OptionalNullable[components.ProviderPreferencesPartition]](../components/providerpreferencespartition.md) | :heavy_minus_sign: | Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. | model |
@@ -0,0 +1,11 @@
# ProviderPreferencesProviderSortConfigEnum
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -0,0 +1,17 @@
# ProviderPreferencesProviderSortConfigUnion
## Supported Types
### `components.ProviderPreferencesProviderSortConfig`
```python
value: components.ProviderPreferencesProviderSortConfig = /* values here */
```
### `components.ProviderPreferencesProviderSortConfigEnum`
```python
value: components.ProviderPreferencesProviderSortConfigEnum = /* values here */
```
@@ -0,0 +1,11 @@
# ProviderPreferencesSortEnum
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
| `EXACTO` | exacto |
@@ -0,0 +1,25 @@
# ProviderPreferencesSortUnion
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Supported Types
### `components.ProviderPreferencesProviderSort`
```python
value: components.ProviderPreferencesProviderSort = /* values here */
```
### `components.ProviderPreferencesProviderSortConfigUnion`
```python
value: components.ProviderPreferencesProviderSortConfigUnion = /* values here */
```
### `components.ProviderPreferencesSortEnum`
```python
value: components.ProviderPreferencesSortEnum = /* values here */
```
+10 -12
View File
@@ -7,21 +7,19 @@ Information about a specific model endpoint
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `context_length` | *int* | :heavy_check_mark: | N/A | | | `name` | *str* | :heavy_check_mark: | N/A | |
| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | {<br/>"p50": 25.5,<br/>"p75": 35.2,<br/>"p90": 48.7,<br/>"p99": 85.3<br/>} |
| `max_completion_tokens` | *Nullable[int]* | :heavy_check_mark: | N/A | |
| `max_prompt_tokens` | *Nullable[int]* | :heavy_check_mark: | N/A | |
| `model_id` | *str* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 | | `model_id` | *str* | :heavy_check_mark: | The unique identifier for the model (permaslug) | openai/gpt-4 |
| `model_name` | *str* | :heavy_check_mark: | N/A | | | `model_name` | *str* | :heavy_check_mark: | N/A | |
| `name` | *str* | :heavy_check_mark: | N/A | | | `context_length` | *float* | :heavy_check_mark: | N/A | |
| `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | | | `pricing` | [components.Pricing](../components/pricing.md) | :heavy_check_mark: | N/A | |
| `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI | | `provider_name` | [components.ProviderName](../components/providername.md) | :heavy_check_mark: | N/A | OpenAI |
| `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 |
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
| `tag` | *str* | :heavy_check_mark: | N/A | | | `tag` | *str* | :heavy_check_mark: | N/A | |
| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | {<br/>"p50": 25.5,<br/>"p75": 35.2,<br/>"p90": 48.7,<br/>"p99": 85.3<br/>} | | `quantization` | [Nullable[components.PublicEndpointQuantization]](../components/publicendpointquantization.md) | :heavy_check_mark: | N/A | fp16 |
| `uptime_last_1d` | *Nullable[float]* | :heavy_check_mark: | Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. | | | `max_completion_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `max_prompt_tokens` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `supported_parameters` | List[[components.Parameter](../components/parameter.md)] | :heavy_check_mark: | N/A | |
| `status` | [Optional[components.EndpointStatus]](../components/endpointstatus.md) | :heavy_minus_sign: | N/A | 0 |
| `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | | | `uptime_last_30m` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `uptime_last_5m` | *Nullable[float]* | :heavy_check_mark: | Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data. | | | `supports_implicit_caching` | *bool* | :heavy_check_mark: | N/A | |
| `latency_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests. | |
| `throughput_last_30m` | [Nullable[components.PercentileStats]](../components/percentilestats.md) | :heavy_check_mark: | N/A | |
+9 -9
View File
@@ -7,17 +7,17 @@ Pricing information for the model
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `audio_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `completion` | *str* | :heavy_check_mark: | N/A | 1000 |
| `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `image` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_output` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `image_token` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_audio_cache` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_cache_read` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `input_cache_write` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `internal_reasoning` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 | | `discount` | *Optional[float]* | :heavy_minus_sign: | N/A | |
| `prompt` | *str* | :heavy_check_mark: | N/A | 1000 |
| `request` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
| `web_search` | *Optional[str]* | :heavy_minus_sign: | N/A | 1000 |
+4 -4
View File
@@ -5,7 +5,7 @@ Configuration options for reasoning models
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `effort` | [OptionalNullable[components.Effort]](../components/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium | | `effort` | [OptionalNullable[components.Effort]](../components/effort.md) | :heavy_minus_sign: | Constrains effort on reasoning for reasoning models | medium |
| `summary` | [OptionalNullable[components.ChatReasoningSummaryVerbosityEnum]](../components/chatreasoningsummaryverbosityenum.md) | :heavy_minus_sign: | N/A | concise | | `summary` | *OptionalNullable[Any]* | :heavy_minus_sign: | N/A | |
+7 -7
View File
@@ -5,10 +5,10 @@ Reasoning detail encrypted schema
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `data` | *str* | :heavy_check_mark: | N/A | | | `type` | [components.ReasoningDetailEncryptedType](../components/reasoningdetailencryptedtype.md) | :heavy_check_mark: | N/A |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | | `data` | *str* | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | | | `format_` | [OptionalNullable[components.ReasoningDetailEncryptedFormat]](../components/reasoningdetailencryptedformat.md) | :heavy_minus_sign: | N/A |
| `type` | [components.ReasoningDetailEncryptedType](../components/reasoningdetailencryptedtype.md) | :heavy_check_mark: | N/A | | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,13 @@
# ReasoningDetailEncryptedFormat
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+7 -7
View File
@@ -5,10 +5,10 @@ Reasoning detail summary schema
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | | `type` | [components.ReasoningDetailSummaryType](../components/reasoningdetailsummarytype.md) | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `summary` | *str* | :heavy_check_mark: | N/A |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | | | `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `summary` | *str* | :heavy_check_mark: | N/A | | | `format_` | [OptionalNullable[components.ReasoningDetailSummaryFormat]](../components/reasoningdetailsummaryformat.md) | :heavy_minus_sign: | N/A |
| `type` | [components.ReasoningDetailSummaryType](../components/reasoningdetailsummarytype.md) | :heavy_check_mark: | N/A | | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,13 @@
# ReasoningDetailSummaryFormat
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+8 -8
View File
@@ -5,11 +5,11 @@ Reasoning detail text schema
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `format_` | [OptionalNullable[components.ReasoningFormat]](../components/reasoningformat.md) | :heavy_minus_sign: | N/A | unknown | | `type` | [components.ReasoningDetailTextType](../components/reasoningdetailtexttype.md) | :heavy_check_mark: | N/A |
| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | | | `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `text` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `format_` | [OptionalNullable[components.ReasoningDetailTextFormat]](../components/reasoningdetailtextformat.md) | :heavy_minus_sign: | N/A |
| `type` | [components.ReasoningDetailTextType](../components/reasoningdetailtexttype.md) | :heavy_check_mark: | N/A | | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,13 @@
# ReasoningDetailTextFormat
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `UNKNOWN` | unknown |
| `OPENAI_RESPONSES_V1` | openai-responses-v1 |
| `AZURE_OPENAI_RESPONSES_V1` | azure-openai-responses-v1 |
| `XAI_RESPONSES_V1` | xai-responses-v1 |
| `ANTHROPIC_CLAUDE_V1` | anthropic-claude-v1 |
| `GOOGLE_GEMINI_V1` | google-gemini-v1 |
+6 -6
View File
@@ -5,18 +5,18 @@ Reasoning detail union schema
## Supported Types ## Supported Types
### `components.ReasoningDetailEncrypted`
```python
value: components.ReasoningDetailEncrypted = /* values here */
```
### `components.ReasoningDetailSummary` ### `components.ReasoningDetailSummary`
```python ```python
value: components.ReasoningDetailSummary = /* values here */ value: components.ReasoningDetailSummary = /* values here */
``` ```
### `components.ReasoningDetailEncrypted`
```python
value: components.ReasoningDetailEncrypted = /* values here */
```
### `components.ReasoningDetailText` ### `components.ReasoningDetailText`
```python ```python
+2 -2
View File
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `text` | *str* | :heavy_check_mark: | N/A | | `type` | [components.ReasoningSummaryTextType](../components/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A |
| `type` | [components.ReasoningSummaryTextType](../components/reasoningsummarytexttype.md) | :heavy_check_mark: | N/A | | `text` | *str* | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `text` | *str* | :heavy_check_mark: | N/A | | `type` | [components.ReasoningTextContentType](../components/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A |
| `type` | [components.ReasoningTextContentType](../components/reasoningtextcontenttype.md) | :heavy_check_mark: | N/A | | `text` | *str* | :heavy_check_mark: | N/A |
+8 -8
View File
@@ -5,10 +5,10 @@ Response format configuration
## Supported Types ## Supported Types
### `components.ChatFormatGrammarConfig` ### `components.ChatFormatTextConfig`
```python ```python
value: components.ChatFormatGrammarConfig = /* values here */ value: components.ChatFormatTextConfig = /* values here */
``` ```
### `components.FormatJSONObjectConfig` ### `components.FormatJSONObjectConfig`
@@ -23,15 +23,15 @@ value: components.FormatJSONObjectConfig = /* values here */
value: components.ChatFormatJSONSchemaConfig = /* values here */ value: components.ChatFormatJSONSchemaConfig = /* values here */
``` ```
### `components.ChatFormatGrammarConfig`
```python
value: components.ChatFormatGrammarConfig = /* values here */
```
### `components.ChatFormatPythonConfig` ### `components.ChatFormatPythonConfig`
```python ```python
value: components.ChatFormatPythonConfig = /* values here */ value: components.ChatFormatPythonConfig = /* values here */
``` ```
### `components.ChatFormatTextConfig`
```python
value: components.ChatFormatTextConfig = /* values here */
```
+3 -3
View File
@@ -5,7 +5,7 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A | | `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A |
| `logprobs` | List[[components.Logprob](../components/logprob.md)] | :heavy_minus_sign: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A | | `text` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.ResponseOutputTextType](../components/responseoutputtexttype.md) | :heavy_check_mark: | N/A | | `annotations` | List[[components.OpenAIResponsesAnnotation](../components/openairesponsesannotation.md)] | :heavy_minus_sign: | N/A |
| `logprobs` | List[[components.ResponseOutputTextLogprob](../components/responseoutputtextlogprob.md)] | :heavy_minus_sign: | N/A |
@@ -5,6 +5,6 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ | | ------------------ | ------------------ | ------------------ | ------------------ |
| `bytes_` | List[*int*] | :heavy_check_mark: | N/A | | `token` | *str* | :heavy_check_mark: | N/A |
| `logprob` | *float* | :heavy_check_mark: | N/A | | `bytes_` | List[*float*] | :heavy_check_mark: | N/A |
| `token` | *str* | :heavy_check_mark: | N/A | | `logprob` | *float* | :heavy_check_mark: | N/A |
-1
View File
@@ -13,7 +13,6 @@ Tokenizer type used by the model
| `GPT` | GPT | | `GPT` | GPT |
| `CLAUDE` | Claude | | `CLAUDE` | Claude |
| `GEMINI` | Gemini | | `GEMINI` | Gemini |
| `GEMMA` | Gemma |
| `GROK` | Grok | | `GROK` | Grok |
| `COHERE` | Cohere | | `COHERE` | Cohere |
| `NOVA` | Nova | | `NOVA` | Nova |
+3 -3
View File
@@ -7,6 +7,6 @@ Information about the top provider for this model
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| `context_length` | *OptionalNullable[int]* | :heavy_minus_sign: | Context length from the top provider | 8192 | | `context_length` | *OptionalNullable[float]* | :heavy_minus_sign: | Context length from the top provider | 8192 |
| `is_moderated` | *bool* | :heavy_check_mark: | Whether the top provider moderates content | true | | `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 |
| `max_completion_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum completion tokens from the top provider | 4096 | | `is_moderated` | *bool* | :heavy_check_mark: | Whether the top provider moderates content | true |
+8
View File
@@ -0,0 +1,8 @@
# TypeResponseCompleted
## Values
| Name | Value |
| -------------------- | -------------------- |
| `RESPONSE_COMPLETED` | response.completed |
+8
View File
@@ -0,0 +1,8 @@
# TypeResponseCreated
## Values
| Name | Value |
| ------------------ | ------------------ |
| `RESPONSE_CREATED` | response.created |
+8
View File
@@ -0,0 +1,8 @@
# TypeResponseFailed
## Values
| Name | Value |
| ----------------- | ----------------- |
| `RESPONSE_FAILED` | response.failed |
@@ -0,0 +1,8 @@
# TypeResponseIncomplete
## Values
| Name | Value |
| --------------------- | --------------------- |
| `RESPONSE_INCOMPLETE` | response.incomplete |
@@ -0,0 +1,8 @@
# TypeResponseInProgress
## Values
| Name | Value |
| ---------------------- | ---------------------- |
| `RESPONSE_IN_PROGRESS` | response.in_progress |
@@ -0,0 +1,8 @@
# TypeResponseOutputItemAdded
## Values
| Name | Value |
| ---------------------------- | ---------------------------- |
| `RESPONSE_OUTPUT_ITEM_ADDED` | response.output_item.added |
@@ -0,0 +1,8 @@
# TypeResponseOutputItemDone
## Values
| Name | Value |
| --------------------------- | --------------------------- |
| `RESPONSE_OUTPUT_ITEM_DONE` | response.output_item.done |
+4 -4
View File
@@ -5,8 +5,8 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `end_index` | *int* | :heavy_check_mark: | N/A |
| `start_index` | *int* | :heavy_check_mark: | N/A |
| `title` | *str* | :heavy_check_mark: | N/A |
| `type` | [components.URLCitationType](../components/urlcitationtype.md) | :heavy_check_mark: | N/A | | `type` | [components.URLCitationType](../components/urlcitationtype.md) | :heavy_check_mark: | N/A |
| `url` | *str* | :heavy_check_mark: | N/A | | `url` | *str* | :heavy_check_mark: | N/A |
| `title` | *str* | :heavy_check_mark: | N/A |
| `start_index` | *float* | :heavy_check_mark: | N/A |
| `end_index` | *float* | :heavy_check_mark: | N/A |
-1
View File
@@ -9,5 +9,4 @@ Type of API used for the generation
| ------------- | ------------- | | ------------- | ------------- |
| `COMPLETIONS` | completions | | `COMPLETIONS` | completions |
| `EMBEDDINGS` | embeddings | | `EMBEDDINGS` | embeddings |
| `RERANK` | rerank |
| `VIDEO` | video | | `VIDEO` | video |
@@ -9,4 +9,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | | | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | | | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_assign_keys_request` | [components.BulkAssignKeysRequest](../components/bulkassignkeysrequest.md) | :heavy_check_mark: | N/A | {<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} | | `request_body` | [operations.BulkAssignKeysToGuardrailRequestBody](../operations/bulkassignkeystoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,8 @@
# BulkAssignKeysToGuardrailRequestBody
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to assign to the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
@@ -0,0 +1,10 @@
# BulkAssignKeysToGuardrailResponse
Assignment result
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ |
| `assigned_count` | *float* | :heavy_check_mark: | Number of keys successfully assigned | 3 |
@@ -9,4 +9,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | | | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | | | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_assign_members_request` | [components.BulkAssignMembersRequest](../components/bulkassignmembersrequest.md) | :heavy_check_mark: | N/A | {<br/>"member_user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} | | `request_body` | [operations.BulkAssignMembersToGuardrailRequestBody](../operations/bulkassignmemberstoguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,8 @@
# BulkAssignMembersToGuardrailRequestBody
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- |
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to assign to the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
@@ -0,0 +1,10 @@
# BulkAssignMembersToGuardrailResponse
Assignment result
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- |
| `assigned_count` | *float* | :heavy_check_mark: | Number of members successfully assigned | 2 |
@@ -9,4 +9,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | | | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | | | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_unassign_keys_request` | [components.BulkUnassignKeysRequest](../components/bulkunassignkeysrequest.md) | :heavy_check_mark: | N/A | {<br/>"key_hashes": [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>]<br/>} | | `request_body` | [operations.BulkUnassignKeysFromGuardrailRequestBody](../operations/bulkunassignkeysfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,8 @@
# BulkUnassignKeysFromGuardrailRequestBody
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `key_hashes` | List[*str*] | :heavy_check_mark: | Array of API key hashes to unassign from the guardrail | [<br/>"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"<br/>] |
@@ -0,0 +1,10 @@
# BulkUnassignKeysFromGuardrailResponse
Unassignment result
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- |
| `unassigned_count` | *float* | :heavy_check_mark: | Number of keys successfully unassigned | 3 |
@@ -9,4 +9,4 @@
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | | | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | | | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 | | `id` | *str* | :heavy_check_mark: | The unique identifier of the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `bulk_unassign_members_request` | [components.BulkUnassignMembersRequest](../components/bulkunassignmembersrequest.md) | :heavy_check_mark: | N/A | {<br/>"member_user_ids": [<br/>"user_abc123",<br/>"user_def456"<br/>]<br/>} | | `request_body` | [operations.BulkUnassignMembersFromGuardrailRequestBody](../operations/bulkunassignmembersfromguardrailrequestbody.md) | :heavy_check_mark: | N/A | |
@@ -0,0 +1,8 @@
# BulkUnassignMembersFromGuardrailRequestBody
## Fields
| Field | Type | Required | Description | Example |
| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| `member_user_ids` | List[*str*] | :heavy_check_mark: | Array of member user IDs to unassign from the guardrail | [<br/>"user_abc123",<br/>"user_def456"<br/>] |
@@ -0,0 +1,10 @@
# BulkUnassignMembersFromGuardrailResponse
Unassignment result
## Fields
| Field | Type | Required | Description | Example |
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
| `unassigned_count` | *float* | :heavy_check_mark: | Number of members successfully unassigned | 2 |
+2 -2
View File
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `image_url` | [operations.ImageURL](../operations/imageurl.md) | :heavy_check_mark: | N/A | | `type` | [operations.TypeImageURL](../operations/typeimageurl.md) | :heavy_check_mark: | N/A |
| `type` | [operations.TypeImageURL](../operations/typeimageurl.md) | :heavy_check_mark: | N/A | | `image_url` | [operations.ImageURL](../operations/imageurl.md) | :heavy_check_mark: | N/A |
+2 -2
View File
@@ -5,5 +5,5 @@
| Field | Type | Required | Description | | Field | Type | Required | Description |
| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
| `text` | *str* | :heavy_check_mark: | N/A | | `type` | [operations.TypeText](../operations/typetext.md) | :heavy_check_mark: | N/A |
| `type` | [operations.TypeText](../operations/typetext.md) | :heavy_check_mark: | N/A | | `text` | *str* | :heavy_check_mark: | N/A |
+3 -3
View File
@@ -7,6 +7,6 @@ Auth code data
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `app_id` | *int* | :heavy_check_mark: | The application ID associated with this auth code | 12345 | | `id` | *str* | :heavy_check_mark: | The authorization code ID to use in the exchange request | auth_code_xyz789 |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z | | `app_id` | *float* | :heavy_check_mark: | The application ID associated with this auth code | 12345 |
| `id` | *str* | :heavy_check_mark: | The authorization code ID to use in the exchange request | auth_code_xyz789 | | `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z |
@@ -8,7 +8,7 @@
| `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | https://myapp.com/auth/callback | | `callback_url` | *str* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | https://myapp.com/auth/callback |
| `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM | | `code_challenge` | *Optional[str]* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM |
| `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | | `code_challenge_method` | [Optional[operations.CreateAuthKeysCodeCodeChallengeMethod]](../operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | 2027-12-31T23:59:59Z |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | | `limit` | *Optional[float]* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 |
| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Optional expiration time for the API key to be created | |
| `key_label` | *Optional[str]* | :heavy_minus_sign: | Optional custom label for the API key. Defaults to the app name if not provided. | My Custom Key |
| `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly | | `usage_limit_type` | [Optional[operations.UsageLimitType]](../operations/usagelimittype.md) | :heavy_minus_sign: | Optional credit limit reset interval. When set, the credit limit resets on this interval. | monthly |
@@ -7,4 +7,4 @@ Successfully created authorization code
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `data` | [operations.CreateAuthKeysCodeData](../operations/createauthkeyscodedata.md) | :heavy_check_mark: | Auth code data | {<br/>"app_id": 12345,<br/>"created_at": "2025-08-24T10:30:00Z",<br/>"id": "auth_code_xyz789"<br/>} | | `data` | [operations.CreateAuthKeysCodeData](../operations/createauthkeyscodedata.md) | :heavy_check_mark: | Auth code data | {<br/>"id": "auth_code_xyz789",<br/>"app_id": 12345,<br/>"created_at": "2025-08-24T10:30:00Z"<br/>} |
@@ -0,0 +1,10 @@
# CreateCoinbaseChargeGlobals
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
@@ -0,0 +1,10 @@
# CreateCoinbaseChargeRequest
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
+5 -7
View File
@@ -1,12 +1,10 @@
# CreateEmbeddingsData # CreateEmbeddingsData
A single embedding object
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- |
| `embedding` | [operations.Embedding](../operations/embedding.md) | :heavy_check_mark: | Embedding vector as an array of floats or a base64 string | [<br/>0.0023064255,<br/>-0.009327292,<br/>0.015797347<br/>] | | `object` | [operations.ObjectEmbedding](../operations/objectembedding.md) | :heavy_check_mark: | N/A |
| `index` | *Optional[int]* | :heavy_minus_sign: | Index of the embedding in the input list | 0 | | `embedding` | [operations.Embedding](../operations/embedding.md) | :heavy_check_mark: | N/A |
| `object` | [operations.ObjectEmbedding](../operations/objectembedding.md) | :heavy_check_mark: | N/A | | | `index` | *Optional[float]* | :heavy_minus_sign: | N/A |
+6 -6
View File
@@ -3,9 +3,9 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | | | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | | | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> |
| `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"dimensions": 1536,<br/>"input": "The quick brown fox jumps over the lazy dog",<br/>"model": "openai/text-embedding-3-small"<br/>} | | `request_body` | [operations.CreateEmbeddingsRequestBody](../operations/createembeddingsrequestbody.md) | :heavy_check_mark: | N/A |
+9 -11
View File
@@ -1,16 +1,14 @@
# CreateEmbeddingsRequestBody # CreateEmbeddingsRequestBody
Embeddings request input
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `dimensions` | *Optional[int]* | :heavy_minus_sign: | The number of dimensions for the output embeddings | 1536 | | `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | N/A |
| `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | The format of the output embeddings | float | | `model` | *str* | :heavy_check_mark: | N/A |
| `input` | [operations.InputUnion](../operations/inputunion.md) | :heavy_check_mark: | Text, token, or multimodal input(s) to embed | The quick brown fox jumps over the lazy dog | | `encoding_format` | [Optional[operations.EncodingFormat]](../operations/encodingformat.md) | :heavy_minus_sign: | N/A |
| `input_type` | *Optional[str]* | :heavy_minus_sign: | The type of input (e.g. search_query, search_document) | search_query | | `dimensions` | *Optional[int]* | :heavy_minus_sign: | N/A |
| `model` | *str* | :heavy_check_mark: | The model to use for embeddings | openai/text-embedding-3-small | | `user` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `provider` | [OptionalNullable[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | N/A | {<br/>"allow_fallbacks": true<br/>} | | `provider` | [Optional[components.ProviderPreferences]](../components/providerpreferences.md) | :heavy_minus_sign: | Provider routing preferences for the request. |
| `user` | *Optional[str]* | :heavy_minus_sign: | A unique identifier for the end-user | user-1234 | | `input_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
@@ -1,14 +1,14 @@
# CreateEmbeddingsResponseBody # CreateEmbeddingsResponseBody
Embeddings response containing embedding vectors Embedding response
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | List of embedding objects | [<br/>{<br/>"embedding": [<br/>0.0023064255,<br/>-0.009327292,<br/>0.015797347<br/>],<br/>"index": 0,<br/>"object": "embedding"<br/>}<br/>] | | `id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `id` | *Optional[str]* | :heavy_minus_sign: | Unique identifier for the embeddings response | embd-1234567890 | | `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | The model used for embeddings | openai/text-embedding-3-small | | `data` | List[[operations.CreateEmbeddingsData](../operations/createembeddingsdata.md)] | :heavy_check_mark: | N/A |
| `object` | [operations.Object](../operations/object.md) | :heavy_check_mark: | N/A | | | `model` | *str* | :heavy_check_mark: | N/A |
| `usage` | [Optional[operations.CreateEmbeddingsUsage]](../operations/createembeddingsusage.md) | :heavy_minus_sign: | Token usage statistics | {<br/>"prompt_tokens": 8,<br/>"total_tokens": 8<br/>} | | `usage` | [Optional[operations.Usage]](../operations/usage.md) | :heavy_minus_sign: | N/A |
+20
View File
@@ -0,0 +1,20 @@
# CreateGuardrailData
The created guardrail
## Fields
| Field | Type | Required | Description | Example |
| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique identifier for the guardrail | 550e8400-e29b-41d4-a716-446655440000 |
| `name` | *str* | :heavy_check_mark: | Name of the guardrail | Production Guardrail |
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the guardrail | Guardrail for production environment |
| `limit_usd` | *OptionalNullable[float]* | :heavy_minus_sign: | Spending limit in USD | 100 |
| `reset_interval` | [OptionalNullable[operations.CreateGuardrailResetIntervalResponse]](../operations/createguardrailresetintervalresponse.md) | :heavy_minus_sign: | Interval at which the limit resets (daily, weekly, monthly) | monthly |
| `allowed_providers` | List[*str*] | :heavy_minus_sign: | List of allowed provider IDs | [<br/>"openai",<br/>"anthropic",<br/>"google"<br/>] |
| `ignored_providers` | List[*str*] | :heavy_minus_sign: | List of provider IDs to exclude from routing | [<br/>"azure"<br/>] |
| `allowed_models` | List[*str*] | :heavy_minus_sign: | Array of model canonical_slugs (immutable identifiers) | [<br/>"openai/gpt-5.2-20251211",<br/>"anthropic/claude-4.5-opus-20251124",<br/>"deepseek/deepseek-r1-0528:free"<br/>] |
| `enforce_zdr` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to enforce zero data retention | false |
| `created_at` | *str* | :heavy_check_mark: | ISO 8601 timestamp of when the guardrail was created | 2025-08-24T10:30:00Z |
| `updated_at` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO 8601 timestamp of when the guardrail was last updated | 2025-08-24T15:45:00Z |
+6 -6
View File
@@ -3,9 +3,9 @@
## Fields ## Fields
| Field | Type | Required | Description | Example | | Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | | | `http_referer` | *Optional[str]* | :heavy_minus_sign: | The app identifier should be your app's URL and is used as the primary identifier for rankings.<br/>This is used to track API usage per application.<br/> | |
| `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | | | `x_open_router_title` | *Optional[str]* | :heavy_minus_sign: | The app display name allows you to customize how your app appears in OpenRouter's dashboard.<br/> | |
| `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | | | `x_open_router_categories` | *Optional[str]* | :heavy_minus_sign: | Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.<br/> | |
| `create_guardrail_request` | [components.CreateGuardrailRequest](../components/createguardrailrequest.md) | :heavy_check_mark: | N/A | {<br/>"allowed_models": null,<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>],<br/>"description": "A guardrail for limiting API usage",<br/>"enforce_zdr": false,<br/>"ignored_models": null,<br/>"ignored_providers": null,<br/>"limit_usd": 50,<br/>"name": "My New Guardrail",<br/>"reset_interval": "monthly"<br/>} | | `request_body` | [operations.CreateGuardrailRequestBody](../operations/createguardrailrequestbody.md) | :heavy_check_mark: | N/A | {<br/>"name": "My New Guardrail",<br/>"description": "A guardrail for limiting API usage",<br/>"limit_usd": 50,<br/>"reset_interval": "monthly",<br/>"allowed_providers": [<br/>"openai",<br/>"anthropic",<br/>"deepseek"<br/>],<br/>"ignored_providers": null,<br/>"allowed_models": null,<br/>"enforce_zdr": false<br/>} |

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