Отправить запрос на создание эмбеддингов
Отправляет запрос на создание эмбеддингов в маршрутизатор эмбеддингов
OpenAPI
yaml
/openapi/openapi.yaml post /embeddings
openapi: 3.1.0
info:
contact:
email: support@openrouter.ai
name: OpenRouter Support
url: https://openrouter.ai/docs
description: OpenAI-compatible API with additional OpenRouter features
license:
name: MIT
url: https://opensource.org/licenses/MIT
title: OpenRouter API
version: 1.0.0
servers:
- description: Production server
url: https://openrouter.ai/api/v1
x-speakeasy-server-id: production
security:
- apiKey: []
tags:
- description: API key management endpoints
name: API Keys
- description: Analytics and usage endpoints
name: Analytics
- description: Anthropic Messages endpoints
name: Anthropic Messages
- description: BYOK endpoints
name: BYOK
- description: Benchmarks endpoints
name: Benchmarks
- description: Chat completion endpoints
name: Chat
- description: Task classification market-share endpoints
name: Classifications
- description: Credit management endpoints
name: Credits
- description: >-
Public OpenRouter usage datasets. Data returned by these endpoints is
licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/):
reuse and republish it, including commercially, with attribution to
OpenRouter.
name: Datasets
- description: Text embedding endpoints
name: Embeddings
- description: Endpoint information
name: Endpoints
- description: Files endpoints
name: Files
- description: Generation history endpoints
name: Generations
- description: Guardrails endpoints
name: Guardrails
- description: Images endpoints
name: Images
- description: Model information endpoints
name: Models
- description: OAuth authentication endpoints
name: OAuth
- description: Observability endpoints
name: Observability
- description: Organization endpoints
name: Organization
- description: Presets endpoints
name: Presets
- description: Provider information endpoints
name: Providers
- description: Rerank endpoints
name: Rerank
- description: OpenAI-compatible Responses API endpoints
name: Responses
- description: SCIM endpoints
name: SCIM
- description: Speech-to-text endpoints
name: STT
x-displayName: Transcriptions
- description: Text-to-speech endpoints
name: TTS
x-displayName: Speech
- description: Video Generation endpoints
name: Video Generation
- description: Workspaces endpoints
name: Workspaces
- description: beta.Analytics endpoints
name: beta.Analytics
externalDocs:
description: OpenRouter Documentation
url: https://openrouter.ai/docs
paths:
/embeddings:
post:
tags:
- Embeddings
summary: Submit an embedding request
description: Submits an embedding request to the embeddings router
operationId: createEmbeddings
requestBody:
content:
application/json:
schema:
description: Embeddings request input
example:
dimensions: 1536
input: The quick brown fox jumps over the lazy dog
model: openai/text-embedding-3-small
properties:
dimensions:
description: The number of dimensions for the output embeddings
example: 1536
minimum: 1
type: integer
encoding_format:
description: The format of the output embeddings
enum:
- float
- base64
example: float
type: string
input:
anyOf:
- minLength: 1
type: string
- items:
minLength: 1
type: string
type: array
- items:
type: number
type: array
- items:
items:
type: number
type: array
type: array
- items:
properties:
content:
items:
oneOf:
- properties:
text:
minLength: 1
type: string
type:
enum:
- text
type: string
required:
- type
- text
type: object
- properties:
image_url:
properties:
url:
type: string
required:
- url
type: object
type:
enum:
- image_url
type: string
required:
- type
- image_url
type: object
- $ref: '#/components/schemas/ContentPartInputAudio'
- $ref: '#/components/schemas/ContentPartInputVideo'
- $ref: '#/components/schemas/ContentPartInputFile'
minItems: 1
type: array
required:
- content
type: object
type: array
description: Text, token, or multimodal input(s) to embed
example: The quick brown fox jumps over the lazy dog
input_type:
description: The type of input (e.g. search_query, search_document)
example: search_query
type: string
model:
description: The model to use for embeddings
example: openai/text-embedding-3-small
type: string
provider:
allOf:
- $ref: '#/components/schemas/ProviderPreferences'
- description: Provider routing preferences for the request.
user:
description: A unique identifier for the end-user
example: user-1234
type: string
required:
- input
- model
type: object
required: true
responses:
'200':
content:
application/json:
schema:
description: Embeddings response containing embedding vectors
example:
data:
- embedding:
- 0.0023064255
- -0.009327292
- 0.015797347
index: 0
object: embedding
model: openai/text-embedding-3-small
object: list
usage:
prompt_tokens: 8
total_tokens: 8
properties:
data:
description: List of embedding objects
example:
- embedding:
- 0.0023064255
- -0.009327292
- 0.015797347
index: 0
object: embedding
items:
description: A single embedding object
example:
embedding:
- 0.0023064255
- -0.009327292
- 0.015797347
index: 0
object: embedding
properties:
embedding:
anyOf:
- items:
type: number
type: array
- type: string
description: >-
Embedding vector as an array of floats or a base64
string
example:
- 0.0023064255
- -0.009327292
- 0.015797347
index:
description: Index of the embedding in the input list
example: 0
type: integer
object:
enum:
- embedding
type: string
required:
- object
- embedding
type: object
type: array
id:
description: Unique identifier for the embeddings response
example: embd-1234567890
type: string
model:
description: The model used for embeddings
example: openai/text-embedding-3-small
type: string
object:
enum:
- list
type: string
usage:
description: Token usage statistics
example:
prompt_tokens: 8
total_tokens: 8
properties:
cost:
description: Cost of the request in credits
example: 0.0001
format: double
type: number
cost_details:
$ref: '#/components/schemas/CostDetails'
is_byok:
description: >-
Whether a request was made using a Bring Your Own Key
configuration
type: boolean
prompt_tokens:
description: Number of tokens in the input
example: 8
type: integer
prompt_tokens_details:
description: >-
Per-modality token breakdown. Only present when the
input contains 2+ modalities (e.g. text + image) and
the upstream provider returns modality-level usage
data. Only non-zero modality counts are included.
properties:
audio_tokens:
description: Number of audio tokens in the input
type: integer
file_tokens:
description: Number of file/document tokens in the input
type: integer
image_tokens:
description: Number of image tokens in the input
example: 258
type: integer
text_tokens:
description: Number of text tokens in the input
example: 8
type: integer
video_tokens:
description: Number of video tokens in the input
type: integer
type: object
total_tokens:
description: Total number of tokens used
example: 8
type: integer
required:
- prompt_tokens
- total_tokens
type: object
required:
- object
- data
- model
type: object
text/event-stream:
example: 'data: [DONE]'
schema:
description: Not used for embeddings - embeddings do not support streaming
type: string
x-speakeasy-sse-sentinel: '[DONE]'
description: Embedding response
'400':
content:
application/json:
example:
error:
code: 400
message: Invalid request parameters
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: Bad Request - Invalid request parameters or malformed input
'401':
content:
application/json:
example:
error:
code: 401
message: Missing Authentication header
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: Unauthorized - Authentication required or invalid credentials
'402':
content:
application/json:
example:
error:
code: 402
message: >-
Insufficient credits. Add more using
https://openrouter.ai/credits
schema:
$ref: '#/components/schemas/PaymentRequiredResponse'
description: Payment Required - Insufficient credits or quota to complete request
'404':
content:
application/json:
example:
error:
code: 404
message: Resource not found
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: Not Found - Resource does not exist
'429':
content:
application/json:
example:
error:
code: 429
message: Rate limit exceeded
schema:
$ref: '#/components/schemas/TooManyRequestsResponse'
description: Too Many Requests - Rate limit exceeded
'500':
content:
application/json:
example:
error:
code: 500
message: Internal Server Error
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: Internal Server Error - Unexpected server error
'502':
content:
application/json:
example:
error:
code: 502
message: Provider returned error
schema:
$ref: '#/components/schemas/BadGatewayResponse'
description: Bad Gateway - Provider/upstream API failure
'503':
content:
application/json:
example:
error:
code: 503
message: Service temporarily unavailable
schema:
$ref: '#/components/schemas/ServiceUnavailableResponse'
description: Service Unavailable - Service temporarily unavailable
'524':
content:
application/json:
example:
error:
code: 524
message: Request timed out. Please try again later.
schema:
$ref: '#/components/schemas/EdgeNetworkTimeoutResponse'
description: Infrastructure Timeout - Provider request timed out at edge network
'529':
content:
application/json:
example:
error:
code: 529
message: Provider returned error
schema:
$ref: '#/components/schemas/ProviderOverloadedResponse'
description: Provider Overloaded - Provider is temporarily overloaded
components:
schemas:
ContentPartInputAudio:
example:
input_audio:
data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...
format: wav
type: input_audio
properties:
input_audio:
$ref: '#/components/schemas/MultimodalMedia'
type:
enum:
- input_audio
type: string
required:
- type
- input_audio
type: object
ContentPartInputVideo:
example:
input_video:
data: data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQy...
format: mp4
type: input_video
properties:
input_video:
$ref: '#/components/schemas/MultimodalMedia'
type:
enum:
- input_video
type: string
required:
- type
- input_video
type: object
ContentPartInputFile:
example:
input_file:
data: data:application/pdf;base64,JVBERi0xLjQKJeLjz9MKMyAw...
format: pdf
type: input_file
properties:
input_file:
$ref: '#/components/schemas/MultimodalMedia'
type:
enum:
- input_file
type: string
required:
- type
- input_file
type: object
ProviderPreferences:
additionalProperties: false
description: >-
When multiple model providers are available, optionally indicate your
routing preference.
example:
allow_fallbacks: true
properties:
allow_fallbacks:
description: >
Whether to allow backup providers to serve requests
- true: (default) when the primary provider (or your custom
providers in "order") is unavailable, use the next best provider.
- false: use only the primary/custom provider, and return the
upstream error if it's unavailable.
type:
- boolean
- 'null'
data_collection:
description: >-
Data collection setting. If no available model provider meets the
requirement, your request will return an error.
- allow: (default) allow providers which store user data
non-transiently and may train on it
- deny: use only providers which do not collect user data.
enum:
- deny
- allow
- null
example: allow
type:
- string
- 'null'
enforce_distillable_text:
description: >-
Whether to restrict routing to only models that allow text
distillation. When true, only models where the author has allowed
distillation will be used.
example: true
type:
- boolean
- 'null'
ignore:
description: >-
List of provider slugs to ignore. If provided, this list is merged
with your account-wide ignored provider settings for this request.
example:
- openai
- anthropic
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
type:
- array
- 'null'
max_price:
description: >-
The object specifying the maximum price you want to pay for this
request. USD price per million tokens, for prompt and completion.
properties:
audio:
description: Maximum price in USD per audio unit
type: string
completion:
description: Maximum price in USD per million completion tokens
type: string
image:
description: Maximum price in USD per image
type: string
prompt:
description: Maximum price in USD per million prompt tokens
type: string
request:
description: Maximum price in USD per request
type: string
type: object
only:
description: >-
List of provider slugs to allow. If provided, this list is merged
with your account-wide allowed provider settings for this request.
example:
- openai
- anthropic
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
type:
- array
- 'null'
order:
description: >-
An ordered list of provider slugs. The router will attempt to use
the first provider in the subset of this list that supports your
requested model, and fall back to the next if it is unavailable. If
no providers are available, the request will fail with an error
message.
example:
- openai
- anthropic
items:
anyOf:
- $ref: '#/components/schemas/ProviderName'
- type: string
type:
- array
- 'null'
preferred_max_latency:
$ref: '#/components/schemas/PreferredMaxLatency'
preferred_min_throughput:
$ref: '#/components/schemas/PreferredMinThroughput'
quantizations:
description: A list of quantization levels to filter the provider by.
items:
$ref: '#/components/schemas/Quantization'
type:
- array
- 'null'
require_parameters:
description: >-
Whether to filter providers to only those that support the
parameters you've provided. If this setting is omitted or set to
false, then providers will receive only the parameters they support,
and ignore the rest.
type:
- boolean
- 'null'
sort:
anyOf:
- $ref: '#/components/schemas/ProviderSort'
- $ref: '#/components/schemas/ProviderSortConfig'
- type: 'null'
description: >-
The sorting strategy to use for this request, if "order" is not
specified. When set, no load balancing is performed.
example: price
zdr:
description: >-
Whether to restrict routing to only ZDR (Zero Data Retention)
endpoints. When true, only endpoints that do not retain prompts will
be used.
example: true
type:
- boolean
- 'null'
type:
- object
- 'null'
CostDetails:
description: Breakdown of upstream inference costs
example:
upstream_inference_completions_cost: 0.0004
upstream_inference_cost: null
upstream_inference_prompt_cost: 0.0008
properties:
upstream_inference_completions_cost:
format: double
type: number
upstream_inference_cost:
format: double
type:
- number
- 'null'
upstream_inference_prompt_cost:
format: double
type: number
required:
- upstream_inference_prompt_cost
- upstream_inference_completions_cost
type:
- object
- 'null'
BadRequestResponse:
description: Bad Request - Invalid request parameters or malformed input
example:
error:
code: 400
message: Invalid request parameters
properties:
error:
$ref: '#/components/schemas/BadRequestResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
UnauthorizedResponse:
description: Unauthorized - Authentication required or invalid credentials
example:
error:
code: 401
message: Missing Authentication header
properties:
error:
$ref: '#/components/schemas/UnauthorizedResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
PaymentRequiredResponse:
description: Payment Required - Insufficient credits or quota to complete request
example:
error:
code: 402
message: Insufficient credits. Add more using https://openrouter.ai/credits
properties:
error:
$ref: '#/components/schemas/PaymentRequiredResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
NotFoundResponse:
description: Not Found - Resource does not exist
example:
error:
code: 404
message: Resource not found
properties:
error:
$ref: '#/components/schemas/NotFoundResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
TooManyRequestsResponse:
description: Too Many Requests - Rate limit exceeded
example:
error:
code: 429
message: Rate limit exceeded
properties:
error:
$ref: '#/components/schemas/TooManyRequestsResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
InternalServerResponse:
description: Internal Server Error - Unexpected server error
example:
error:
code: 500
message: Internal Server Error
properties:
error:
$ref: '#/components/schemas/InternalServerResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
BadGatewayResponse:
description: Bad Gateway - Provider/upstream API failure
example:
error:
code: 502
message: Provider returned error
properties:
error:
$ref: '#/components/schemas/BadGatewayResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
ServiceUnavailableResponse:
description: Service Unavailable - Service temporarily unavailable
example:
error:
code: 503
message: Service temporarily unavailable
properties:
error:
$ref: '#/components/schemas/ServiceUnavailableResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
EdgeNetworkTimeoutResponse:
description: Infrastructure Timeout - Provider request timed out at edge network
example:
error:
code: 524
message: Request timed out. Please try again later.
properties:
error:
$ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
ProviderOverloadedResponse:
description: Provider Overloaded - Provider is temporarily overloaded
example:
error:
code: 529
message: Provider returned error
properties:
error:
$ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
MultimodalMedia:
example:
data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...
format: wav
properties:
data:
type: string
format:
type: string
required:
- data
type: object
ProviderName:
enum:
- Modal
- AkashML
- AI21
- AionLabs
- Alibaba
- Ambient
- Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
- Arcee AI
- AtlasCloud
- Avian
- Azure
- BaseTen
- BytePlus
- Black Forest Labs
- Cerebras
- Chutes
- Cirrascale
- Claude Platform on AWS
- Clarifai
- Cloudflare
- Cohere
- CoreWeave
- Crucible
- Crusoe
- Darkbloom
- Databricks
- Decart
- Deepgram
- DeepInfra
- DeepSeek
- DekaLLM
- DigitalOcean
- Featherless
- Fireworks
- Fish Audio
- Friendli
- GMICloud
- Google
- Google AI Studio
- Groq
- HeyGen
- Inception
- Inceptron
- InferenceNet
- Ionstream
- Infermatic
- Io Net
- Inferact vLLM
- Inflection
- Liquid
- Mara
- Mancer 2
- Meta
- Minimax
- ModelRun
- Mistral
- Modular
- Moonshot AI
- Morph
- VoyageAI by MongoDB
- NCompass
- Nebius
- Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
- Poolside
- Perceptron
- Perplexity
- Phala
- Recraft
- Reka
- Relace
- Sail Research
- Sakana AI
- SambaNova
- Seed
- SiliconFlow
- Sourceful
- StepFun
- Stealth
- StreamLake
- Switchpoint
- Tencent
- Tenstorrent
- Thinking Machines
- Together
- Upstage
- Venice
- Wafer
- WandB
- Quiver
- Krea
- Runway
- Xiaomi
- xAI
- Z.AI
- FakeProvider
example: OpenAI
type: string
PreferredMaxLatency:
anyOf:
- format: double
type: number
- $ref: '#/components/schemas/PercentileLatencyCutoffs'
- type: 'null'
description: >-
Preferred maximum latency (in seconds). Can be a number (applies to p50)
or an object with percentile-specific cutoffs. Endpoints above the
threshold(s) may still be used, but are deprioritized in routing. When
using fallback models, this may cause a fallback model to be used
instead of the primary model if it meets the threshold.
example: 5
PreferredMinThroughput:
anyOf:
- format: double
type: number
- $ref: '#/components/schemas/PercentileThroughputCutoffs'
- type: 'null'
description: >-
Preferred minimum throughput (in tokens per second). Can be a number
(applies to p50) or an object with percentile-specific cutoffs.
Endpoints below the threshold(s) may still be used, but are
deprioritized in routing. When using fallback models, this may cause a
fallback model to be used instead of the primary model if it meets the
threshold.
example: 100
Quantization:
enum:
- int4
- int8
- fp4
- mxfp4
- nvfp4
- fp6
- fp8
- mxfp8
- fp16
- bf16
- fp32
- unknown
example: fp16
type: string
ProviderSort:
description: The provider sorting strategy (price, throughput, latency)
enum:
- price
- throughput
- latency
- exacto
example: price
type: string
ProviderSortConfig:
description: The provider sorting strategy (price, throughput, latency)
example:
by: price
partition: model
properties:
by:
description: The provider sorting strategy (price, throughput, latency)
enum:
- price
- throughput
- latency
- exacto
- null
example: price
type:
- string
- 'null'
partition:
description: >-
Partitioning strategy for sorting: "model" (default) groups
endpoints by model before sorting (fallback models remain
fallbacks), "none" sorts all endpoints together regardless of model.
enum:
- model
- none
- null
example: model
type:
- string
- 'null'
type: object
BadRequestResponseErrorData:
description: Error data for BadRequestResponse
example:
code: 400
message: Invalid request parameters
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
UnauthorizedResponseErrorData:
description: Error data for UnauthorizedResponse
example:
code: 401
message: Missing Authentication header
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
PaymentRequiredResponseErrorData:
description: Error data for PaymentRequiredResponse
example:
code: 402
message: Insufficient credits. Add more using https://openrouter.ai/credits
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
NotFoundResponseErrorData:
description: Error data for NotFoundResponse
example:
code: 404
message: Resource not found
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
TooManyRequestsResponseErrorData:
description: Error data for TooManyRequestsResponse
example:
code: 429
message: Rate limit exceeded
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
InternalServerResponseErrorData:
description: Error data for InternalServerResponse
example:
code: 500
message: Internal Server Error
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
BadGatewayResponseErrorData:
description: Error data for BadGatewayResponse
example:
code: 502
message: Provider returned error
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
ServiceUnavailableResponseErrorData:
description: Error data for ServiceUnavailableResponse
example:
code: 503
message: Service temporarily unavailable
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
EdgeNetworkTimeoutResponseErrorData:
description: Error data for EdgeNetworkTimeoutResponse
example:
code: 524
message: Request timed out. Please try again later.
properties:
error:
$ref: '#/components/schemas/EdgeNetworkTimeoutResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
ProviderOverloadedResponse:
description: Provider Overloaded - Provider is temporarily overloaded
example:
error:
code: 529
message: Provider returned error
properties:
error:
$ref: '#/components/schemas/ProviderOverloadedResponseErrorData'
openrouter_metadata:
additionalProperties: {}
type:
- object
- 'null'
user_id:
type:
- string
- 'null'
required:
- error
type: object
MultimodalMedia:
example:
data: data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...
format: wav
properties:
data:
type: string
format:
type: string
required:
- data
type: object
ProviderName:
enum:
- Modal
- AkashML
- AI21
- AionLabs
- Alibaba
- Ambient
- Baidu
- Amazon Bedrock
- Amazon Nova
- Anthropic
- Arcee AI
- AtlasCloud
- Avian
- Azure
- BaseTen
- BytePlus
- Black Forest Labs
- Cerebras
- Chutes
- Cirrascale
- Claude Platform on AWS
- Clarifai
- Cloudflare
- Cohere
- CoreWeave
- Crucible
- Crusoe
- Darkbloom
- Databricks
- Decart
- Deepgram
- DeepInfra
- DeepSeek
- DekaLLM
- DigitalOcean
- Featherless
- Fireworks
- Fish Audio
- Friendli
- GMICloud
- Google
- Google AI Studio
- Groq
- HeyGen
- Inception
- Inceptron
- InferenceNet
- Ionstream
- Infermatic
- Io Net
- Inferact vLLM
- Inflection
- Liquid
- Mara
- Mancer 2
- Meta
- Minimax
- ModelRun
- Mistral
- Modular
- Moonshot AI
- Morph
- VoyageAI by MongoDB
- NCompass
- Nebius
- Nex AGI
- NextBit
- Novita
- Nvidia
- OpenAI
- OpenInference
- Parasail
- Poolside
- Perceptron
- Perplexity
- Phala
- Recraft
- Reka
- Relace
- Sail Research
- Sakana AI
- SambaNova
- Seed
- SiliconFlow
- Sourceful
- StepFun
- Stealth
- StreamLake
- Switchpoint
- Tencent
- Tenstorrent
- Thinking Machines
- Together
- Upstage
- Venice
- Wafer
- WandB
- Quiver
- Krea
- Runway
- Xiaomi
- xAI
- Z.AI
- FakeProvider
example: OpenAI
type: string
PreferredMaxLatency:
anyOf:
- format: double
type: number
- $ref: '#/components/schemas/PercentileLatencyCutoffs'
- type: 'null'
description: >-
Preferred maximum latency (in seconds). Can be a number (applies to p50)
or an object with percentile-specific cutoffs. Endpoints above the
threshold(s) may still be used, but are deprioritized in routing. When
using fallback models, this may cause a fallback model to be used
instead of the primary model if it meets the threshold.
example: 5
PreferredMinThroughput:
anyOf:
- format: double
type: number
- $ref: '#/components/schemas/PercentileThroughputCutoffs'
- type: 'null'
description: >-
Preferred minimum throughput (in tokens per second). Can be a number
(applies to p50) or an object with percentile-specific cutoffs.
Endpoints below the threshold(s) may still be used, but are
deprioritized in routing. When using fallback models, this may cause a
fallback model to be used instead of the primary model if it meets the
threshold.
example: 100
Quantization:
enum:
- int4
- int8
- fp4
- mxfp4
- nvfp4
- fp6
- fp8
- mxfp8
- fp16
- bf16
- fp32
- unknown
example: fp16
type: string
ProviderSort:
description: The provider sorting strategy (price, throughput, latency)
enum:
- price
- throughput
- latency
- exacto
example: price
type: string
ProviderSortConfig:
description: The provider sorting strategy (price, throughput, latency)
example:
by: price
partition: model
properties:
by:
description: The provider sorting strategy (price, throughput, latency)
enum:
- price
- throughput
- latency
- exacto
- null
example: price
type:
- string
- 'null'
partition:
description: >-
Partitioning strategy for sorting: "model" (default) groups
endpoints by model before sorting (fallback models remain
fallbacks), "none" sorts all endpoints together regardless of model.
enum:
- model
- none
- null
example: model
type:
- string
- 'null'
type: object
BadRequestResponseErrorData:
description: Error data for BadRequestResponse
example:
code: 400
message: Invalid request parameters
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
UnauthorizedResponseErrorData:
description: Error data for UnauthorizedResponse
example:
code: 401
message: Missing Authentication header
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
PaymentRequiredResponseErrorData:
description: Error data for PaymentRequiredResponse
example:
code: 402
message: Insufficient credits. Add more using https://openrouter.ai/credits
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
NotFoundResponseErrorData:
description: Error data for NotFoundResponse
example:
code: 404
message: Resource not found
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
TooManyRequestsResponseErrorData:
description: Error data for TooManyRequestsResponse
example:
code: 429
message: Rate limit exceeded
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
InternalServerResponseErrorData:
description: Error data for InternalServerResponse
example:
code: 500
message: Internal Server Error
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
BadGatewayResponseErrorData:
description: Error data for BadGatewayResponse
example:
code: 502
message: Provider returned error
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
ServiceUnavailableResponseErrorData:
description: Error data for ServiceUnavailableResponse
example:
code: 503
message: Service temporarily unavailable
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
EdgeNetworkTimeoutResponseErrorData:
description: Error data for EdgeNetworkTimeoutResponse
example:
code: 524
message: Request timed out. Please try again later.
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
ProviderOverloadedResponseErrorData:
description: Error data for ProviderOverloadedResponse
example:
code: 529
message: Provider returned error
properties:
code:
type: integer
message:
type: string
metadata:
additionalProperties: {}
type:
- object
- 'null'
required:
- code
- message
type: object
PercentileLatencyCutoffs:
description: >-
Percentile-based latency cutoffs. All specified cutoffs must be met for
an endpoint to be preferred.
example:
p50: 5
p90: 10
properties:
p50:
description: Maximum p50 latency (seconds)
format: double
type:
- number
- 'null'
p75:
description: Maximum p75 latency (seconds)
format: double
type:
- number
- 'null'
p90:
description: Maximum p90 latency (seconds)
format: double
type:
- number
- 'null'
p99:
description: Maximum p99 latency (seconds)
format: double
type:
- number
- 'null'
type: object
PercentileThroughputCutoffs:
description: >-
Percentile-based throughput cutoffs. All specified cutoffs must be met
for an endpoint to be preferred.
example:
p50: 100
p90: 50
properties:
p50:
description: Minimum p50 throughput (tokens/sec)
format: double
type:
- number
- 'null'
p75:
description: Minimum p75 throughput (tokens/sec)
format: double
type:
- number
- 'null'
p90:
description: Minimum p90 throughput (tokens/sec)
format: double
type:
- number
- 'null'
p99:
description: Minimum p99 throughput (tokens/sec)
format: double
type:
- number
- 'null'
type: object
securitySchemes:
apiKey:
description: API key as bearer token in Authorization header
scheme: bearer
type: http