GET

/v1/schemas/openrouter/chat/chat%2Fcompletions

kind inputactivity chathash 9f5525cc…extracted Nov 22, 2026version currentsource upstream spec ↗

Request body

43 properties · 1 required · 137 $defs
propertytypedescriptionconstraints
messages*ChatMessages[]List of messages for the conversationitems ≥ 1
cache_controlAnthropicCacheControlDirectiveEnable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also …
debugChatDebugOptionsDebug options for inspecting request transformations (streaming only)
deferred_toolsDeferredToolsControlOpt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation. The portable profile needs the catalog unchanged across a continuation; the universal profile accepts a changed catalog and, with `announce_catalog_chan…
frequency_penaltyanyFrequency penalty (-2.0 to 2.0)format: double
image_configImageConfigProvider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
logit_biasanyToken logit bias adjustments
logprobsanyReturn log probabilities
max_completion_tokensanyMaximum tokens in completion
max_tokensanyMaximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16.
metadataobjectKey-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
min_panyMinimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter.format: double
modalitiesenum[]Output modalities for the response. Supported values are "text", "image", and "audio".
modelstringModel to use for completion
modelsany[]Models to use for completion
parallel_tool_callsanyWhether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response.
pluginsAutoRouterPlugin | AutoBetaRouterPlugin | ModerationPlugin[]Plugins you want to enable for this request, including their settings.
predictionPredictionStatic predicted output content. Supported models can use this to reduce latency when much of the response is known in advance.
presence_penaltyanyPresence penalty (-2.0 to 2.0)format: double
prompt_cache_keyany
prompt_cache_optionsPromptCacheOptionsRequest-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h"…
providerProviderPreferencesWhen multiple model providers are available, optionally indicate your routing preference.
reasoningobjectConfiguration options for reasoning models
reasoning_effortenumShorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ.max | xhigh | high | medium | low | minimal · +2 more
repetition_penaltyanyPenalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter.format: double
response_formatobject | object | object | …Response format configuration
routeenum**DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none").fallback | sort | null · deprecated
seedanyRandom seed for deterministic outputs
service_tierenumThe service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints.auto | default | fast | flex | priority | scale · +2 more
session_idstringA unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for obser…length ≤ 256
stopstring | string[]Stop sequences (up to 4)nullable
stop_server_tools_whenStopServerToolsWhenCondition[]Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final tu…items ≥ 1
streambooleanEnable streaming responsedefault: false
stream_optionsChatStreamOptionsStreaming configuration options
temperatureanySampling temperature (0-2)format: double
tool_choiceenum | enum | enum | …Tool choice configuration
toolsChatFunctionTool[]Available tools for function calling
top_aanyConsider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter.format: double
top_kanyLimits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter.
top_logprobsanyNumber of top log probabilities to return (0-20)
top_panyNucleus sampling parameter (0-1)format: double
traceTraceConfigMetadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
userstringPer-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity…

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"openrouter","endpointId":"chat/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}