GET

/v1/schemas/openrouter/chat/responses

kind inputactivity chathash c20c301f…extracted Nov 13, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
0d19a8453874651361f64fbd51045d9d1d4868b39f7eb85b9866fee302c50de2
{
  "fetchedAt": 1794547804,
  "extractorVersion": "2",
  "verifiedAt": null
}

Request body

43 properties · 0 required · 237 $defs
propertytypedescriptionconstraints
access_programsobjectOpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any …
backgroundany
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_penaltyanyformat: 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.
includeany
inputstring | ReasoningItem | EasyInputMessage | InputMessageItem[]Input for a response request - can be a string or array of items
instructionsany
max_output_tokensany
max_tool_callsanyMaximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set.
metadataRequestMetadataMetadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
modalitiesOutputModalityEnum[]Output modalities for the response. Supported values are "text" and "image".
modelstring
modelsstring[]
parallel_tool_callsany
pluginsAutoRouterPlugin | AutoBetaRouterPlugin | ModerationPlugin[]Plugins you want to enable for this request, including their settings.
presence_penaltyanyformat: double
previous_response_idanyNot supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead.
promptStoredPromptTemplate
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.
reasoningany | objectConfiguration for reasoning mode in the responsenullable
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
safety_identifieranyRecommended per-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-le…
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 · default: "auto"
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
storeconstfalse · default: false
streambooleandefault: false
temperatureanyformat: double
textobject | objectText output configuration including format and verbosity
tool_choiceenum | enum | enum | …
toolsany | Preview_WebSearchServerTool | Preview_20250311_WebSearchServerTool[]
top_kinteger
top_logprobsany
top_panyformat: 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.
truncationenumauto | disabled | null
userstringA unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual u…length ≤ 256

Types

237 $defs

AdditionalToolsItemobject

Additional tools made available to the model at this point in the input

idany
role*enumunknown | user | assistant | system | critic | discriminator · +2 more
tools*any | Preview_WebSearchServerTool | Preview_20250311_WebSearchServerTool[]
type*enumadditional_tools

AdvisorReasoningobject

Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.

effortenumReasoning effort level for the advisor call.max | xhigh | high | medium | low | minimal · +1 more
max_tokensintegerMaximum number of reasoning tokens the advisor may use.

AdvisorServerTool_OpenRouterobject

OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the…

parametersAdvisorServerToolConfigConfiguration for one openrouter:advisor server tool entry.
type*enumopenrouter:advisor

AdvisorServerToolConfigobject

Configuration for one openrouter:advisor server tool entry.

forward_transcriptbooleanWhen true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the execut…
instructionsstringSystem instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own.
max_completion_tokensintegerMaximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies.
modelstringSlug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used.
namestringOptional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars.length ≥ 1 · length ≤ 64
reasoningAdvisorReasoningReasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking.
streambooleanWhen true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Ch…
temperaturenumberSampling temperature forwarded to the advisor call. When omitted, the provider's default applies.format: double

AgentMessageItemobject

A message routed between agents in a multi-agent session

agentobject
author*string
content*InputText | any | object[]
idany
recipient*string
type*enumagent_message

AlignmentPluginobject

Beta. States the listed rules to the model and evaluates every turn against them; the configuration, metadata, and error shapes may change.

id*enumalignment
instructbooleanWhether the rules are stated to the model in a system message on every provider call. Default true.
max_retriesintegerProvider calls made again after a blocked turn, in enforce mode. Default 1.
modeenum`enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `audit`.enforce | audit
rules*AlignmentRule[]Rules the reply must follow. Each rule is evaluated on its own.items ≥ 1 · items ≤ 128
thresholdnumberProbability at or above which a rule is broken, from 0.01 to 1. Default 0.7.format: double

AlignmentRuleobject

rule*stringText that states what the reply must do or must not do.length ≥ 1 · length ≤ 200
watch*enum[]Fields of the assistant message the rule applies to. The rule is evaluated on a message that has at least one of them and is not applicable to any other message.items ≥ 1 · items ≤ 5

AnthropicCacheControlDirectiveobject

Enable 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 …

ttlenum5m | 1h
type*enumephemeral

AnthropicCacheControlTtlenum

5m | 1h

ApplyPatchCallItemobject

A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn.

call_id*string
idany
operation*object | object | objectThe patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.
status*enumLifecycle state of an `apply_patch_call` output item.in_progress | completed
type*enumapply_patch_call

ApplyPatchCallOperationobject | object | object

The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.

ApplyPatchCallOutputItemobject

The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise.

call_id*string
idany
outputany
status*enumcompleted | failed
type*enumapply_patch_call_output

ApplyPatchCallStatusenum

Lifecycle state of an `apply_patch_call` output item.

in_progress | completed

ApplyPatchCreateFileOperationobject

The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents.

diff*string
path*string
type*enumcreate_file

ApplyPatchDeleteFileOperationobject

The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required.

path*string
type*enumdelete_file

ApplyPatchEngineEnumenum

Which apply_patch engine to use. "auto" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. "native" forces native passthrough — when the endpoint does not support nati…

auto | native | openrouter

ApplyPatchServerToolobject

Apply patch tool configuration

type*enumapply_patch

ApplyPatchServerTool_OpenRouterobject

OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API.

parametersApplyPatchServerToolConfigConfiguration for the openrouter:apply_patch server tool
type*enumopenrouter:apply_patch

ApplyPatchServerToolConfigobject

Configuration for the openrouter:apply_patch server tool

engineenumWhich apply_patch engine to use. "auto" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. "native" forces native passthrough — when the endpoint does not support nati…auto | native | openrouter

ApplyPatchUpdateFileOperationobject

The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file.

diff*string
path*string
type*enumupdate_file

ArmorAutoModeobject

allowstring | ArmorRule[]
environmentstring | ArmorEnvironmentEntry[]
hard_denystring | ArmorRule[]
soft_denystring | ArmorRule[]

ArmorContextobject

The Armor context: Claude Code's `classifier_context` (v1), with `auto_mode.{hard_deny,soft_deny,allow}` rules as strings or `{ id, instructions, threshold? }` objects and `auto_mode.environment` entries as `"Name: value"` strings or `{ name, value }` objects.…

auto_modeArmorAutoMode
v*enum1

ArmorEnvironmentEntryobject

name*stringlength ≥ 1 · length ≤ 120
value*stringlength ≤ 4000

ArmorPluginobject

Evaluates every client tool call the model emits against a rule stack (hard-deny, soft-deny, allow) before it reaches the caller. The stack merges the workspace guardrail, this plugin, and any Anthropic `safeguards`; on endpoints that support Anthropic's `dang…

classifier_contextArmorContextThe Armor context: Claude Code's `classifier_context` (v1), with `auto_mode.{hard_deny,soft_deny,allow}` rules as strings or `{ id, instructions, threshold? }` objects and `auto_mode.environment` entries as `"Name: value"` strings or `{ name, value }` objects.…
enabledbooleanSet to false to disable Armor for this request. Defaults to true.
evaluate_native_toolsbooleanRun provider-native server tools (web search, code execution, ...) through the agent loop so Armor evaluates them too. Defaults to false: native passthrough stands and such calls are reported `skipped`.
id*enumarmor
modeenum`enforce` withholds blocked calls; `audit` evaluates and reports the same verdicts without withholding any calls, regardless of `on_error`. Default `enforce`.enforce | audit
on_errorenumWhen the classifier cannot answer (timeout, upstream error, context too long) the call is reported `unavailable`; `block` rejects it and `log` releases it. Default `block`.log | block
output_modeenumHow a blocked call reaches the caller. `text` (the default): the call is withheld and an `<openrouter_armor_blocked>` marker stands in assistant text. `custom_item` (Responses API only): the call is withheld and an `openrouter:armor_blocked` output item carrie…text | custom_item | claude_code_compatibility
use_cc_style_default_rulesbooleanPrepend Claude Code's built-in auto-mode rule set (1 hard-deny, 72 soft-deny, 17 allow, 21 environment slots) ahead of every configured rule. Defaults to true on the Anthropic Messages API and false elsewhere.

ArmorRuleobject

id*stringStable id, unique within its source; reported as the deciding rule when it fires.length ≥ 1 · length ≤ 64
instructions*stringWhat the rule matches, written for the classifier.length ≥ 1 · length ≤ 8000
namestringDisplay name shown in verdict explanations; defaults to the id.length ≥ 1 · length ≤ 120
thresholdnumberProbability at or above which the rule counts as matched. Defaults to 0.6 for hard-deny and soft-deny rules and 0.7 for allow rules (an exception needs stronger evidence to clear a matched soft deny).format: double

AutoBetaRouterPluginobject

allowed_modelsstring[]List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Whe…items ≤ 1024
cost_quality_tradeoffintegerDeprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. H…0 ≤ n ≤ 10 · deprecated
cost_tierenumNamed cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are pro…low | medium | high | xhigh | max
enabledbooleanSet to false to disable the auto-beta-router plugin for this request. Defaults to true.
excluded_modelsstring[]List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after allowed_mo…items ≤ 1024
id*enumauto-beta-router

AutoRouterPluginobject

allowed_modelsstring[]List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When not…items ≤ 1024
cost_quality_tradeoffintegerDeprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher…0 ≤ n ≤ 10 · deprecated
cost_tierenumNamed cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided.low | medium | high | xhigh | max
enabledbooleanSet to false to disable the auto-router plugin for this request. Defaults to true.
excluded_modelsstring[]List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after allowed_models,…items ≤ 1024
id*enumauto-router
pin_modelbooleanWhen true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false.

BaseReasoningConfigobject

contextenumControls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.auto | all_turns | current_turn | null
effortenummax | xhigh | high | medium | low | minimal · +2 more
modeenumSelects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer.standard | pro | null
summaryenumauto | concise | detailed | null

BashServerToolobject

OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container

parametersBashServerToolConfigConfiguration for the openrouter:bash server tool
type*enumopenrouter:bash

BashServerToolConfigobject

Configuration for the openrouter:bash server tool

engineenumWhich bash engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) and "native" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands.auto | native | openrouter
environmentobject | objectExecution environment for the bash server tool.

BashServerToolEngineenum

Which bash engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) and "native" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands.

auto | native | openrouter

BashServerToolEnvironmentobject | object

Execution environment for the bash server tool.

ChatDebugOptionsobject

Debug options for inspecting request transformations (streaming only)

echo_upstream_bodybooleanIf true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode.

CodeInterpreterCallItemobject | object

A code interpreter execution call with outputs

CodeInterpreterFileOutputobject

download_urlstringProvider-issued download URL for the generated file. Typically signed and time-limited (see `expires_at`); fetch promptly rather than persisting the URL.
error_codeanyProvider error code when generating or persisting the file failed; null or absent on success.
expires_atstringWhen the `download_url` stops working, as an ISO 8601 timestamp. After this time the file must be regenerated.
filenamestring
idstring
media_typestring
sha256string
size_bytesinteger
statusstringProvider-reported readiness of the generated file (e.g. `ready`). Values other than `ready` indicate the artifact may not be downloadable.
type*enumfile

CodeInterpreterImageOutputobject

type*enumimage
url*string

CodeInterpreterLogsOutputobject

logs*string
type*enumlogs

CodeInterpreterServerToolobject

Code interpreter tool configuration. An existing container id or `container.file_ids` requires BYOK (your own OpenAI key); requests on OpenRouter credits must use `auto` with no `file_ids`.

container*string | object
type*enumcode_interpreter

CodexLocalShellToolobject

Local shell tool configuration

type*enumlocal_shell

CompactionItemobject

A context compaction marker with encrypted summary

encrypted_content*string
idany
type*enumcompaction

CompactionTriggerItemobject

Asks the model to compact the preceding input into a compaction item

type*enumcompaction_trigger

CompoundFilterobject

A compound filter that combines multiple comparison or compound filters

filters*object[]
type*enumand | or

ComputerUseServerToolobject

Computer use preview tool configuration

display_height*integer
display_width*integer
environment*enumwindows | mac | linux | ubuntu | browser
type*enumcomputer_use_preview

ConfigurationUpdateItemobject

Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding items. Place it before the user message it should apply to; it stays in effect until another configuration update. Two adjacent configur…

idany
reasoning*ConfigurationUpdateReasoningReasoning settings applied from this point in the conversation onward
type*enumconfiguration_update

ConfigurationUpdateReasoningobject

Reasoning settings applied from this point in the conversation onward

effort*enumReasoning effort to apply from this point in the conversation onwardmax | xhigh | high | medium | low | minimal · +1 more

ContainerAutoEnvironmentobject

An OpenRouter-managed, auto-provisioned ephemeral container.

file_idsstring[]Workspace file ids (or_file_…) to attach into the container before the first command runs. Each file is copied to the container home as a writable copy named {last 8 characters of the file id}-{base filename} (a file stored as data/report.csv with id or_file_……items ≤ 20
network_policyobject | objectNetwork egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending…
type*enumcontainer_auto

ContainerFileIdsstring[]

Workspace file ids (or_file_…) to attach into the container before the first command runs. Each file is copied to the container home as a writable copy named {last 8 characters of the file id}-{base filename} (a file stored as data/report.csv with id or_file_……

items ≤ 20

ContainerNetworkPolicyobject | object

Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending…

ContainerReferenceEnvironmentobject

Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container.

container_id*stringCanonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) an…length ≥ 1 · length ≤ 40
file_idsstring[]Workspace file ids (or_file_…) to attach into the container before the first command runs. Each file is copied to the container home as a writable copy named {last 8 characters of the file id}-{base filename} (a file stored as data/report.csv with id or_file_……items ≤ 20
network_policyobject | objectNetwork egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending…
type*enumcontainer_reference

ContextCompactionItemobject

A context compaction marker with an optional encrypted summary

encrypted_contentany
idany
type*enumcontext_compaction

ContextCompressionEngineenum

The compression engine to use. Defaults to "middle-out".

middle-out

ContextCompressionPluginobject

enabledbooleanSet to false to disable the context-compression plugin for this request. Defaults to true.
engineenumThe compression engine to use. Defaults to "middle-out".middle-out
id*enumcontext-compression

CustomToolobject

Custom tool configuration

asyncbooleanLets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Respo…
defer_loadingboolean
descriptionstring
formatobject | object
name*string
type*enumcustom

CustomToolCallItemobject

A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments.

asyncanyTrue when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.
call_id*string
idany
input*string
name*string
namespaceanyNamespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
statusenumin_progress | completed | incomplete · nullable
type*enumcustom_tool_call

CustomToolCallOutputItemobject | object

The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`.

DatetimeServerToolobject

OpenRouter built-in server tool: returns the current date and time

parametersDatetimeServerToolConfigConfiguration for the openrouter:datetime server tool
type*enumopenrouter:datetime

DatetimeServerToolConfigobject

Configuration for the openrouter:datetime server tool

timezonestringIANA timezone name (e.g. "America/New_York"). Defaults to UTC.

DeferredBm25Searchobject

Deterministic BM25 retrieval over supplied tool definitions.

max_resultsinteger
miss_sourcesbooleanUniversal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names …
siblingsbooleanUniversal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match…
spreadbooleanUniversal profile only, for keyword searches the router answers through the `tool_search` wrapper. When true, a result spreads across sources: of the 3 x limit best-scoring candidates, those scoring at least 60% of the best match take at most 2 slots per sourc…
type*enumbm25

DeferredCustomSearchobject

Caller-executed search returning existing tool identities under result_key.

max_resultsinteger
result_key*stringlength ≥ 1
tool_id*stringlength ≥ 1
type*enumcustom

DeferredRegexSearchobject

Versioned safe-regex retrieval over supplied tool definitions.

max_resultsinteger
miss_sourcesbooleanUniversal profile only, for searches the router answers through the `tool_search` wrapper. Unless false, a search that matches nothing also names the deferred sources this search covers (namespaces, MCP servers, and shared `<server>_` prefixes; up to 40 names …
siblingsbooleanUniversal profile only, for searches the router answers through the `tool_search` wrapper; code-mode `search()` and a client-owned tool search list the matched tools alone. When true, each result also names up to 16 other deferred tools of every source a match…
type*enumregex

DeferredToolsControlobject

Opt-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…

announce_catalog_changesbooleanUniversal profile only. When true, a catalog whose deferred tools changed between two of the model's own turns (a client that connects MCP servers while the model works) is re-announced before the next model turn, with the sources added, changed and removed si…
cascade_modeenumHow a universal `tool_search` query reaches the client's own tool search. Absent or `keywords`: a `select:` query becomes the words of the selected names and the limit is always filled. `native`: a `select:` query passes through verbatim when the client search…keywords | native
hintstringUniversal profile only. Caller text announced to the model with the deferred catalog before its first turn, for example which sources the task needs. Repeated only when it changes. Trimmed before the length bounds apply. Recorded in the `catalog_index` discove…length ≥ 1 · length ≤ 2000
interfaceenumHow the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so s…wrappers | code_mode
min_deferred_toolsintegerUniversal profile only. When fewer tools than this would be deferred, the universal profile defers none of them and sends the client tools unchanged, so a harness with a handful of non-core tools and no MCP servers pays no search turn for them. Counted after t…
profile*enumLoading profile. `portable` serves the `defer_loading` tools with router-built search and call wrappers on any model and keeps the catalog fixed. `universal` defers every wrappable tool behind the same wrappers so the provider-facing tool list never changes (u…portable | universal
protocol*enumv1
scopeenumWhich tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Ex…all | mcp
search*object | object | objectRouter-local regex/BM25 or caller-owned custom search.
validation*enumWhere tool-call arguments are checked against the original schema. Only `runtime` (in OpenRouter) is available in this release.runtime

DeferredToolsSearchStrategyobject | object | object

Router-local regex/BM25 or caller-owned custom search.

DeprecatedRouteenum

**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

EasyInputMessageobject

contentInputText | any | InputFile[] | stringnullable
phaseenum | enumThe 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…nullable
role*enum | enum | enum | …
typeenummessage

FailableToolCallStatusenum

in_progress | completed | incomplete | failed

FileCitationobject

file_id*string
filename*string
index*integer
type*enumfile_citation

FileParserPluginobject

enabledbooleanSet to false to disable the file-parser plugin for this request. Defaults to true.
id*enumfile-parser
pdfPDFParserOptionsOptions for PDF parsing.

FilePathobject

file_id*string
index*integer
type*enumfile_path

FileSearchServerToolobject

File search tool configuration. `vector_store_ids` names OpenAI vector stores, so it requires BYOK (your own OpenAI key); requests on OpenRouter credits get a 400.

filtersobject | objectnullable
max_num_resultsinteger
ranking_optionsobject
type*enumfile_search
vector_store_ids*string[]

FilesServerToolobject

OpenRouter built-in server tool: read, write, edit, and list workspace files via the Files API. Requires an authenticated request; files come from the API key's workspace (or the default workspace for keys without one).

parametersFilesServerToolConfigConfiguration for the openrouter:files server tool
type*enumopenrouter:files

FilesServerToolConfigobject

Configuration for the openrouter:files server tool

FormatJsonObjectConfigobject

JSON object response format

type*enumjson_object

FormatJsonSchemaConfigobject

JSON schema constrained response format

descriptionstring
name*string
schema*object
strictany
type*enumjson_schema

Formatsobject | object | object

Text response format configuration

FormatTextConfigobject

Plain text response format

type*enumtext

FunctionCallItemobject

A function call initiated by the model

arguments*string
asyncanyTrue when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`.
call_id*string
idany
name*string
namespaceanyNamespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server)
statusenumin_progress | completed | incomplete · nullable
subagent_idanyEXPERIMENTAL — subject to change without notice. String id that matches the `call_id` of the `openrouter:subagent` server tool call that spawned the subagent. Present on every `function_call` item the subagent projects; absent on ordinary function calls.
subagent_itemsanyEXPERIMENTAL — subject to change without notice. The subagent's output items produced on this turn. Treat this as an opaque object; you must replay it in the request so that the subagent can continue execution of the tool with the same context. If a subagent c…
type*enumfunction_call

FunctionCallOutputItemobject | object

The output from a function call execution

FunctionToolobject

Function tool definition

descriptionany
name*string
parameters*any
strictany
type*enumfunction

FusionAnalysisResultobject

Structured analysis produced by the fusion analyst model.

blind_spots*string[]
consensus*string[]
contradictions*object[]
partial_coverage*object[]
unique_insights*object[]

FusionPluginobject

analysis_modelsstring[]For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capp…items ≥ 1 · items ≤ 8
enabledbooleanSet to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true.
id*enumfusion
max_tool_callsintegerFor a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_se…1 ≤ n ≤ 16
modelstringFor a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the…
presetenumConfiguration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and an…general-high | general-budget | general-fast
toolsobject[]For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. Whe…items ≤ 8

FusionServerTool_OpenRouterobject

OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from.

parametersFusionServerToolConfigConfiguration for the openrouter:fusion server tool.
type*enumopenrouter:fusion

FusionServerToolConfigobject

Configuration for the openrouter:fusion server tool.

analysis_modelsstring[]Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models …items ≥ 1 · items ≤ 8
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 …
max_completion_tokensintegerMaximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible t…
max_tool_callsintegerMaximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. C…1 ≤ n ≤ 16
modelstringSlug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request.
reasoningobjectReasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.
temperaturenumberTemperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.format: double
toolsobject[]Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pas…items ≤ 8

FusionSourceobject

A web page retrieved via web search during a fusion run.

title*stringTitle of the retrieved web page.
url*stringURL of the web page a panel or the analyst retrieved during the run.

ImageConfigobject

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.

ImageGenerationServerToolobject

Image generation tool configuration

backgroundenumtransparent | opaque | auto
input_fidelityenumhigh | low | null
input_image_maskobject
modelstring
moderationenumauto | low
output_compressioninteger
output_formatenumpng | webp | jpeg
partial_imagesinteger
qualityenumlow | medium | high | auto
sizestring
type*enumimage_generation

ImageGenerationServerTool_OpenRouterobject

OpenRouter built-in server tool: generates images from text prompts using an image generation model

parametersImageGenerationServerToolConfigConfiguration 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.
type*enumopenrouter:image_generation

ImageGenerationServerToolConfigobject

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.

modelstringWhich image generation model to use (e.g. "openai/gpt-image-2.6-flare"). Defaults to "openai/gpt-image-2.6-flare".

ImageGenerationStatusenum

in_progress | completed | generating | failed

InputAudioobject

Audio input content item

input_audio*object
type*enuminput_audio

InputFileobject

File input content item

file_datastring
file_idany
file_urlstring
filenamestring
type*enuminput_file

InputImageobject

Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image.

detail*enumauto | high | low | original
file_idany
image_urlany
type*enuminput_image

InputMessageItemobject

contentany
idstring
role*enum | enum | enum
typeenummessage

Inputsstring | ReasoningItem | EasyInputMessage | InputMessageItem[]

Input for a response request - can be a string or array of items

InputTextobject

Text input content item

prompt_cache_breakpointPromptCacheBreakpointMarks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache…
text*string
type*enuminput_text

InputVideoobject

Video input content item

processingenumVideo processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini).agentic | static
type*enuminput_video
video_url*stringA base64 data URL or remote URL that resolves to a video file

ItemReferenceItemobject

A reference to a previous response item by ID

id*string
type*enumitem_reference

JevRouterPluginobject

allowed_modelsstring[]Alias of `models`, matching the auto-router field name. Entries from both fields are combined.items ≤ 1024
cost_tierstringSelect low, medium, high, or a cost tier configured by the operator. Overrides the live-config tier and replaces the shared routing policy with that tier. Omit to use the live configuration. Model exclusions and the router kill switch still apply.
excluded_modelsstring[]Remove these models from the router. Each entry is a model slug or a wildcard pattern (e.g. "xiaomi/*"). A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters acros…items ≤ 1024
id*enumjev-router
modelsstring[]Restrict the router to these models. Each entry is a model slug or a wildcard pattern (e.g. "anthropic/*"), matched against the current pool; models outside the pool are ignored. A `~author/family-latest` alias matches every revision of that family. Up to 1024…items ≤ 1024

Legacy_WebSearchServerToolobject

Web search tool configuration

engineenumWhich search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search…native | exa | parallel | firecrawl | perplexity | auto
filtersWebSearchDomainFilter
max_resultsintegerMaximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped.
max_usesintegerMaximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded on…
modeenumEngine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more
search_context_sizeenumSize of the search context for web search toolslow | medium | high
type*enumweb_search
user_locationWebSearchUserLocationUser location information for web search
x_searchXSearchOptionsEnable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

LocalShellCallItemobject

A local shell command execution call

action*object
call_id*string
id*string
status*enumin_progress | completed | incomplete
type*enumlocal_shell_call

LocalShellCallOutputItemobject

Output from a local shell command execution

id*string
output*string
statusenumin_progress | completed | incomplete · nullable
type*enumlocal_shell_call_output

McpApprovalRequestItemobject

Request for approval to execute an MCP tool

arguments*string
id*string
name*string
server_label*string
type*enummcp_approval_request

McpApprovalResponseItemobject

User response to an MCP tool approval request

approval_request_id*string
approve*boolean
idany
reasonany
type*enummcp_approval_response

McpCallItemobject

An MCP tool call with its output or error

approval_request_idany
arguments*string
errorstring | object | object | …Error from an MCP tool call, either a plain message or a structured errornullable
id*string
name*string
outputany
server_label*string
statusenumin_progress | completed | incomplete | calling | failed
type*enummcp_call

McpHttpErrorobject

The MCP server request failed at the HTTP layer

code*integer
message*string
type*enumhttp_error

McpListToolsItemobject

List of available MCP tools from a server

errorany
id*string
server_label*string
tools*object[]
type*enummcp_list_tools

McpProtocolErrorobject

The MCP server returned a protocol-level error

code*integer
message*string
type*enummcp_protocol_error

McpServerToolobject

MCP (Model Context Protocol) tool configuration

allowed_toolsstring[] | objectnullable
authorizationstring
connector_idstring
headersany
require_approvalobject | enum | enumnullable
server_descriptionstring
server_label*string
server_urlstring
type*enummcp

McpServerTool_OpenRouterobject

OpenRouter built-in server tool: connects the model to a remote MCP server and runs its tools during the response

parameters*McpServerToolParametersConfiguration for a remote MCP server tool.
type*enumopenrouter:mcp

McpServerToolParametersobject

Configuration for a remote MCP server tool.

allowed_toolsstring[] | objectRestrict the tools exposed to the model to this list or filter.nullable
authorizationstringOAuth access token sent as the Authorization bearer to the server.
connector_idstringProvider-defined connector identifier, forwarded as written to providers that run MCP themselves.
headersanyExtra headers sent on every request to the server.
require_approvalobject | enum | enumApproval policy for tool calls. Defaults to always: a call that needs approval ends the response with an mcp_approval_request item, answered with an mcp_approval_response on the next request.nullable
server_descriptionstringExtra context about the server, shown to the model.
server_label*stringLabel for this MCP server, used in mcp_list_tools and mcp_call items.
server_urlstringURL of the remote MCP server (streamable HTTP).

McpToolCallErrorstring | object | object | …

Error from an MCP tool call, either a plain message or a structured error

nullable

McpToolExecutionErrorobject

The MCP tool ran but reported a failure

contentany
type*enummcp_tool_execution_error

ModerationPluginobject

id*enummoderation

NamespaceFunctionToolobject

A function tool grouped inside a namespace tool

allowed_callersany
asyncbooleanLets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Respo…
defer_loadingboolean
descriptionany
name*string
output_schemaany
parametersany
strictany
type*enumfunction

NamespaceToolobject

Groups function/custom tools under a shared namespace

description*string
name*string
tools*NamespaceFunctionTool | CustomTool[]
type*enumnamespace

OpenAIResponseCustomToolCallOutputobject

call_id*string
idstring
output*string | InputText | InputImage | InputFile[]
type*enumcustom_tool_call_output

OpenAIResponseFunctionToolCallOutputobject

call_id*string
idany
output*string | InputText | InputImage | InputFile[]
statusenumin_progress | completed | incomplete · nullable
type*enumfunction_call_output

OpenAIResponsesAnnotationobject | object | object

OpenAIResponsesRefusalContentobject

refusal*string
type*enumrefusal

OpenAIResponsesToolChoiceenum | enum | enum | …

OpenAIResponsesTruncationenum

auto | disabled | null

OutputAdvisorServerToolItemobject

An openrouter:advisor server tool output item

advicestringThe advisor model's response (the advice text returned to the executor).
errorstringError message when the advisor call did not produce advice. Set together with `status: 'failed'` on the terminal item.
idstring
instance_namestringProvider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advis…
modelstringSlug of the advisor model that was consulted.
promptstringThe prompt the executor sent to the advisor.
status*enumin_progress | completed | incomplete | failed
type*enumopenrouter:advisor

OutputApplyPatchServerToolItemobject

An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn.

call_idstring
errorstringThe error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
idstring
operationobject | object | objectThe patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it.
status*enumin_progress | completed | incomplete | failed
type*enumopenrouter:apply_patch

OutputArmorBlockedItemobject

A client tool call that OpenRouter Armor blocked. Emitted in place of the call when `plugins[armor].output_mode` is `custom_item`.

arguments*stringThe arguments exactly as the model wrote them.
call_id*stringThe call id the model chose. Use it to find this call in `safeguard_results`.
explanation*stringThe rule that blocked the call, in the same `[Rule Name]` form as `safeguard_results`.
id*string
name*stringThe name of the tool the model called.
namespacestringThe namespace the tool belongs to, for namespaced tools such as MCP. Absent for a plain function tool.
reason*stringThe error text the model received as the result of this call. Sending this item back replays that text to the model.
status*enumcompleted
type*enumopenrouter:armor_blocked

OutputBashServerToolItemobject

An openrouter:bash server tool output item

argumentsanyThe raw tool-call arguments string as emitted by the model.
call_idanyThe model-generated tool call id from the originating turn.
commandstring
container_idstringThe canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
errorstringThe error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. A non-zero `exitCode` is a command failure, not a tool failure.
exitCodeinteger
filesobject[]Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
idstring
status*enumin_progress | completed | incomplete | failed
stderrstring
stdoutstring
type*enumopenrouter:bash

OutputBrowserUseServerToolItemobject

An openrouter:browser_use server tool output item

actionstring
idstring
screenshotB64string
status*enumin_progress | completed | incomplete
type*enumopenrouter:browser_use

OutputCodeInterpreterCallItemany | object

A code interpreter execution call with outputs

OutputCodeInterpreterServerToolItemobject

An openrouter:code_interpreter server tool output item

codestring
exitCodeinteger
idstring
languagestring
status*enumin_progress | completed | incomplete
stderrstring
stdoutstring
type*enumopenrouter:code_interpreter

OutputComputerCallItemobject

actionany
call_id*string
idstring
pending_safety_checks*object[]
status*enumcompleted | incomplete | in_progress
type*enumcomputer_call

OutputDatetimeItemobject

An openrouter:datetime server tool output item

datetime*stringISO 8601 datetime string
errorstringThe error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
idstring
status*enumin_progress | completed | incomplete | failed
timezone*stringIANA timezone name
type*enumopenrouter:datetime

OutputFileSearchCallItemobject | object

OutputFileSearchServerToolItemobject

An openrouter:file_search server tool output item

idstring
queriesstring[]
status*enumin_progress | completed | incomplete
type*enumopenrouter:file_search

OutputFilesServerToolItemobject

An openrouter:files server tool output item

argumentsanyThe raw tool-call arguments string as emitted by the model.
call_idanyThe model-generated tool call id from the originating turn.
errorstringError message when the file operation failed.
file_idstringThe target file id supplied in the tool-call arguments.
filenamestringThe target filename supplied in the tool-call arguments.
idstring
operationstringThe file operation performed (list, read, write, or edit).
resultstringJSON-serialized result of the file operation.
status*enumin_progress | completed | incomplete
type*enumopenrouter:files

OutputFusionServerToolItemobject

An openrouter:fusion server tool output item

analysisFusionAnalysisResultStructured analysis produced by the fusion analyst model.
errorstringError message when the fusion run did not produce an analysis result.
failed_modelsobject[]Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. On a completed item the fusion result is still usable but was produced from a degraded panel; on a failed item i…
failure_reasonstringTyped failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, invalid_model, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage c…
idstring
responsesobject[]Analysis models that produced a response in this fusion run, with each model's full panel content.
sourcesFusionSource[]Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.
status*enumin_progress | completed | incomplete
type*enumopenrouter:fusion

OutputImageGenerationCallItemobject | object

OutputImageGenerationServerToolItemobject

An openrouter:image_generation server tool output item

errorstringThe error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
idstring
imageB64string
imageUrlstring
promptstringThe prompt (possibly rewritten) that the image was generated from.
resultanyThe generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format
revisedPromptstring
status*enumin_progress | completed | incomplete | failed
type*enumopenrouter:image_generation

OutputItemCodeInterpreterCallobject

codeany
container_idstring
id*string
outputsany
status*enumin_progress | completed | incomplete | interpreting | failed
type*enumcode_interpreter_call

OutputItemFileSearchCallobject

id*string
queries*string[]
status*enumcompleted | searching | in_progress | failed | incomplete
type*enumfile_search_call

OutputItemImageGenerationCallobject

id*string
resultanydefault: null
status*enumin_progress | completed | generating | failed
type*enumimage_generation_call

OutputItemReasoningobject

contentReasoningTextContent[]
encrypted_contentany
id*string
statusenum | enum | enum
summary*ReasoningSummaryText[]
type*enumreasoning

OutputItemWebSearchCallobject

actionobject | object | object
id*string
status*enumcompleted | searching | in_progress | failed | incomplete
type*enumweb_search_call

OutputMemoryServerToolItemobject

An openrouter:memory server tool output item

actionenumread | write | delete
idstring
keystring
status*enumin_progress | completed | incomplete
type*enumopenrouter:memory
valueany

OutputMessageobject

content*ResponseOutputText | OpenAIResponsesRefusalContent[]
id*string
phaseenum | enumThe 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…nullable
role*enumassistant
statusenum | enum | enum
type*enummessage

OutputMessageItemobject | object

An output message item

OutputModalityEnumenum

text | image

OutputReasoningItemobject | object

An output item containing reasoning

OutputSearchModelsServerToolItemobject

An openrouter:experimental__search_models server tool output item

argumentsstringThe JSON arguments submitted to the search tool (e.g. {"query":"Claude"})
errorstringThe error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
idstring
querystring
status*enumin_progress | completed | incomplete | failed
type*enumopenrouter:experimental__search…

OutputShellServerToolItemobject

An openrouter:shell server tool output item

actionobject
argumentsanyThe raw tool-call arguments string as emitted by the model.
call_idanyThe model-generated tool call id from the originating turn.
container_idstringThe canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
errorstringThe error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. `output` is omitted when `error` is set.
filesobject[]Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
idstring
outputShellCallOutputContent[]
status*enumin_progress | completed | incomplete | failed
type*enumopenrouter:shell

OutputSubagentServerToolItemobject

An openrouter:subagent server tool output item

call_idstringEXPERIMENTAL — subject to change without notice. The `call_id` of the tool call that spawned this subagent. This id will also be included as the `subagent_id` on any `function_call` items created by the subagent. This must be returned in the request so the `fu…
errorstringError message when the subagent task did not produce an outcome. Set together with `status: 'failed'` on the terminal item.
idstring
instance_namestringProvider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) in…
modelstringSlug of the worker model that executed the task.
namestringConfigured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent.
outcomestringThe worker model's result (the outcome text returned to the delegating model).
status*enumin_progress | completed | incomplete | failed
task_descriptionstringThe task description the delegating model sent to the worker.
task_namestringThe short task identifier the delegating model supplied.
type*enumopenrouter:subagent

OutputTextEditorServerToolItemobject

An openrouter:text_editor server tool output item

commandenumview | create | str_replace | insert
filePathstring
idstring
status*enumin_progress | completed | incomplete
type*enumopenrouter:text_editor

OutputToolSearchServerToolItemobject

An openrouter:tool_search server tool output item

argumentsstringThe JSON arguments of the model call, verbatim. Replaying the item reuses them.
call_idstringThe ID of the model call that ran the search. Replaying the item reuses it.
catalog_changesstringWhat the announced index added and removed since the previous one, when the request opted into `announce_catalog_changes` and the catalog changed between model turns. Replaying the item shows the same lines.
catalog_indexstringThe deferred-tool index the router showed the model with a pre-search, listing tool sources and names. Replaying the item shows the same index.
errorstringThe error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
formatenumHow the model saw the matches. `compact` means each tool by name, description, and input shape, plus a call example. Replaying the item renders the same result.compact
hintstringThe guidance the model got when the search matched no tools.
idstring
matchesobject[]
querystring
sourcesobjectThe other deferred tools of each source a match came from, by name, when the search listed siblings. Replaying the item shows the same names.
status*enumin_progress | completed | incomplete | failed
turn_call_idsstring[]The IDs of every tool call in the model response that ran the search, in order. Replaying the item keeps those calls in one turn.
type*enumopenrouter:tool_search

OutputWebFetchServerToolItemobject

An openrouter:web_fetch server tool output item

contentstring
errorstringThe error message if the fetch failed.
httpStatusintegerThe HTTP status code returned by the upstream URL fetch.
idstring
status*enumin_progress | completed | incomplete
titlestring
type*enumopenrouter:web_fetch
urlstring

OutputWebSearchCallItemobject | object

OutputWebSearchServerToolItemobject

An openrouter:web_search server tool output item

actionobjectThe search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.
errorstringThe error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
idstring
status*enumin_progress | completed | incomplete | failed
type*enumopenrouter:web_search

ParetoRouterPluginobject

enabledbooleanSet to false to disable the pareto-router plugin for this request. Defaults to true.
id*enumpareto-router
max_pricenumberMaximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, fallin…n ≥ 0 · format: double
min_coding_scorenumberMinimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= …0 ≤ n ≤ 1 · format: double
price_sourceenumPrice source for the Pareto frontier cost axis and for enforcing max_price. "prompt" uses catalog list price (endpoint.pricing.prompt). "weighted_avg" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without …prompt | weighted_avg

PDFParserEngineenum | enum

The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai".

PDFParserOptionsobject

Options for PDF parsing.

engineenum | enumThe engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai".

PercentileLatencyCutoffsobject

Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred.

p50anyMaximum p50 latency (seconds)format: double
p75anyMaximum p75 latency (seconds)format: double
p90anyMaximum p90 latency (seconds)format: double
p99anyMaximum p99 latency (seconds)format: double

PercentileThroughputCutoffsobject

Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred.

p50anyMinimum p50 throughput (tokens/sec)format: double
p75anyMinimum p75 throughput (tokens/sec)format: double
p90anyMinimum p90 throughput (tokens/sec)format: double
p99anyMinimum p99 throughput (tokens/sec)format: double

PreferredMaxLatencynumber | object

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 …

nullable

PreferredMinThroughputnumber | object

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 caus…

nullable

Preview_20250311_WebSearchServerToolobject

Web search preview tool configuration (2025-03-11 version)

engineenumWhich search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search…native | exa | parallel | firecrawl | perplexity | auto
filtersWebSearchDomainFilter
max_resultsintegerMaximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped.
max_usesintegerMaximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded on…
modeenumEngine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more
search_context_sizeenumSize of the search context for web search toolslow | medium | high
type*enumweb_search_preview_2025_03_11
user_locationPreview_WebSearchUserLocation
x_searchXSearchOptionsEnable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

Preview_WebSearchServerToolobject

Web search preview tool configuration

engineenumWhich search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search…native | exa | parallel | firecrawl | perplexity | auto
filtersWebSearchDomainFilter
max_resultsintegerMaximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped.
max_usesintegerMaximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded on…
modeenumEngine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more
search_context_sizeenumSize of the search context for web search toolslow | medium | high
type*enumweb_search_preview
user_locationPreview_WebSearchUserLocation
x_searchXSearchOptionsEnable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

Preview_WebSearchUserLocationobject

cityany
countryany
regionany
timezoneany
type*enumapproximate

PromptCacheBreakpointobject

Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache…

mode*enumexplicit
ttlany

PromptCacheOptionsobject

Request-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"…

mode*enumexplicit
ttlany

ProviderNameenum

Modal | AkashML | AI21 | AionLabs | Alibaba | Ambient · +118 more

ProviderOptionsobject

Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silentl…

01aiobject
ai21object
aion-labsobject
akashmlobject
alibabaobject
amazon-bedrockobject
amazon-bedrock/claude-on-awsobject
amazon-novaobject
ambientobject
antdigitalobject
anthropicobject
anthropic/2object
anyscaleobject
arcee-aiobject
assemblyaiobject
atlas-cloudobject
atomaobject
avianobject
azureobject
baiduobject
basetenobject
black-forest-labsobject
byteplusobject
centmlobject
cerebrasobject
chutesobject
cirrascaleobject
clarifaiobject
claude-on-awsobject
cloudflareobject
cohereobject
coreweaveobject
cosineobject
crofaiobject
crucibleobject
crusoeobject
darkbloomobject
databricksobject
decartobject
deepgramobject
deepinfraobject
deepseekobject
dekallmobject
digitaloceanobject
elevenlabsobject
enferobject
fake-providerobject
featherlessobject
fireworksobject
fish-audioobject
friendliobject
gmicloudobject
google-ai-studioobject
google-vertexobject
gopomeloobject
groqobject
heygenobject
huggingfaceobject
hyperbolicobject
hyperbolic-quantizedobject
inceptionobject
inceptronobject
inferact-vllmobject
inference-netobject
infermaticobject
inflectionobject
inocloudobject
io-netobject
ionstreamobject
klusteraiobject
kreaobject
ktobject
lambdaobject
leptonobject
liquidobject
lynnobject
lynn-privateobject
makoraobject
mancerobject
mancer-oldobject
maraobject
metaobject
minimaxobject
mistralobject
modalobject
modelrunobject
modularobject
moonshotaiobject
morphobject
ncompassobject
near-aiobject
nebiusobject
nex-agiobject
nextbitobject
nineteenobject
novitaobject
nvidiaobject
octoaiobject
ollamaobject
open-inferenceobject
openaiobject
parallelobject
parasailobject
pareto-alphaobject
particle-aiobject
pearl-researchobject
perceptronobject
perplexityobject
phalaobject
poolsideobject
primalabsobject
primeintellectobject
quiverobject
recraftobject
recursalobject
recursiveobject
reflectionobject
rekaobject
relaceobject
replicateobject
respanobject
riverobject
runwayobject
sail-researchobject
sakanaobject
sakana-aiobject
sambanovaobject
sambanova-cloakedobject
scaledownobject
seedobject
sf-computeobject
siliconflowobject
sourcefulobject
speechifyobject
stealthobject
stepfunobject
streamlakeobject
switchpointobject
targonobject
tencentobject
tenstorrentobject
thinkingmachinesobject
togetherobject
together-liteobject
typesafeobject
ubicloudobject
unbiasedobject
upstageobject
veniceobject
voyageaiobject
waferobject
wandbobject
wandb-legacyobject
xaiobject
xiaomiobject
z-aiobject

ProviderPreferencesobject

When multiple model providers are available, optionally indicate your routing preference.

allow_fallbacksanyWhether 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…
data_collectionenumData 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 itdeny | allow | null
enforce_distillable_textanyWhether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
ignoreanyList of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
max_priceobjectThe object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
onlyanyList of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
optionsProviderOptionsProvider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silentl…
orderanyAn 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 err…
preferred_max_latencynumber | objectPreferred 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 …nullable
preferred_min_throughputnumber | objectPreferred 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 caus…nullable
quantizationsanyA list of quantization levels to filter the provider by.
require_parametersanyWhether 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.
sortenum | objectThe sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.nullable
zdranyWhether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.

ProviderSortenum

The provider sorting strategy (price, throughput, latency)

price | throughput | latency | exacto

ProviderSortConfigobject

The provider sorting strategy (price, throughput, latency)

byenumThe provider sorting strategy (price, throughput, latency)price | throughput | latency | exacto | null
partitionenumPartitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.model | none | null

Quantizationenum

int4 | int8 | fp4 | mxfp4 | nvfp4 | fp6 · +6 more

ReasoningConfigany | object

Configuration for reasoning mode in the response

nullable

ReasoningContextenum

Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer.

auto | all_turns | current_turn | null

ReasoningEffortenum

max | xhigh | high | medium | low | minimal · +2 more

ReasoningFormatenum

unknown | openai-responses-v1 | azure-openai-responses-v1 | bedrock-openai-responses-v1 | bedrock-xai-responses-v1 | xai-responses-v1 · +6 more

ReasoningItemobject | object

Reasoning output item with signature and format extensions

ReasoningModeenum

Selects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer.

standard | pro | null

ReasoningSummaryTextobject

text*string
type*enumsummary_text

ReasoningSummaryVerbosityenum

auto | concise | detailed | null

ReasoningTextContentobject

text*string
type*enumreasoning_text

RequestMetadataany

Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.

ResponseHealingPluginobject

enabledbooleanSet to false to disable the response-healing plugin for this request. Defaults to true.
id*enumresponse-healing

ResponseIncludesEnumenum

file_search_call.results | message.input_image.image_url | computer_call_output.output.ima… | reasoning.encrypted_content | output.encrypted_content | code_interpreter_call.outputs

ResponseOutputTextobject

annotationsOpenAIResponsesAnnotation[]
logprobsobject[]
text*string
type*enumoutput_text

SearchContextSizeEnumenum

Size of the search context for web search tools

low | medium | high

SearchModelsServerTool_OpenRouterobject

OpenRouter built-in server tool: searches and filters AI models available on OpenRouter

parametersSearchModelsServerToolConfigConfiguration for the openrouter:experimental__search_models server tool
type*enumopenrouter:experimental__search…

SearchModelsServerToolConfigobject

Configuration for the openrouter:experimental__search_models server tool

max_resultsintegerMaximum number of models to return. Defaults to 5, max 20.

SearchQualityLevelenum

How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an ada…

low | medium | high

ShellCallItemobject

A shell command execution call (newer variant)

action*object
argumentsanyThe raw tool-call arguments string as emitted by the model. Echo back unchanged when replaying history; used verbatim to preserve provider prompt-cache prefixes.
call_id*string
environmentany
idany
statusenumin_progress | completed | incomplete · nullable
type*enumshell_call

ShellCallOutputContentobject

Captured stdout and stderr for one command of a shell call, with its exit or timeout outcome.

outcome*object | object
stderr*string
stdout*string

ShellCallOutputItemobject

Output from a shell command execution (newer variant)

call_id*string
container_idstringThe canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
errorstringThe error message when the sandbox call failed before producing a result, as echoed from a failed `shell_call_output` emission.
filesobject[]Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
idany
max_output_lengthany
output*ShellCallOutputContent[]
statusenumin_progress | completed | incomplete · nullable
type*enumshell_call_output

ShellServerToolobject

Shell tool configuration

type*enumshell

ShellServerTool_OpenRouterobject

OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool)

parametersShellServerToolConfigConfiguration for the openrouter:shell server tool
type*enumopenrouter:shell

ShellServerToolConfigobject

Configuration for the openrouter:shell server tool

engineenumWhich shell engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox.auto | openrouter
environmentobject | objectServer-side execution environment for the shell tool. Only container-backed environments are supported; "local" shells are not.

ShellServerToolEngineenum

Which shell engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox.

auto | openrouter

ShellServerToolEnvironmentobject | object

Server-side execution environment for the shell tool. Only container-backed environments are supported; "local" shells are not.

StopServerToolsWhenStopServerToolsWhenCondition[]

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

StopServerToolsWhenConditionobject | object | object | …

A single condition that, when met, halts the server-tool agent loop.

StopServerToolsWhenFinishReasonIsobject

Stop when the upstream model emits this finish reason (e.g. `length`).

reason*stringlength ≥ 1
type*enumfinish_reason_is

StopServerToolsWhenHasToolCallobject

Stop after a tool with this name has been called.

tool_name*stringlength ≥ 1
type*enumhas_tool_call

StopServerToolsWhenMaxCostobject

Stop once cumulative cost across the loop exceeds this dollar threshold.

max_cost_in_dollars*numberformat: double
type*enummax_cost

StopServerToolsWhenMaxTokensUsedobject

Stop once cumulative token usage across the loop exceeds this threshold.

max_tokens*integer
type*enummax_tokens_used

StopServerToolsWhenStepCountIsobject

Stop after the agent loop has executed this many steps.

step_count*integer
type*enumstep_count_is

StoredPromptTemplateobject

id*string
variablesany

SubagentNestedToolobject

A tool made available to the subagent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the worker has no way to execute them. The subagent tool may not list itself.

parametersobject
type*string

SubagentReasoningobject

Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking.

effortenumReasoning effort level for the subagent call.max | xhigh | high | medium | low | minimal · +1 more
max_tokensintegerMaximum number of reasoning tokens the subagent may use. Forwarded to the subagent call as `reasoning.max_tokens`.

SubagentServerTool_OpenRouterobject

OpenRouter built-in server tool: delegates self-contained tasks to a smaller, cheaper, faster worker model (any OpenRouter model) mid-generation and returns its outcome. The worker may run as a sub-agent with its own tools.

parametersSubagentServerToolConfigConfiguration for one openrouter:subagent server tool entry.
type*enumopenrouter:subagent

SubagentServerToolConfigobject

Configuration for one openrouter:subagent server tool entry.

inherit_functionsbooleanEXPERIMENTAL — subject to change without notice. When true, the subagent inherits every client function defined in the request's top-level `tools` list. Supported on the Responses API (`/api/v1/responses`) only; other APIs reject it with a `400`.
inherited_function_namesstring[]EXPERIMENTAL — subject to change without notice. Names of the top-level function tools that the subagent will inherit. Any tool that matches by name will be copied fully into the tools array of the subagent. When `inherit_functions` is `true`, this list does n…
instructionsstringSystem instructions for the subagent. When omitted, the subagent responds with no system prompt of its own.
max_completion_tokensintegerMaximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies.
max_tool_callsintegerMaximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Forwarded to the subagent call as `max_tool_calls`.1 ≤ n ≤ 25
modelstringSlug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model.
namestringOptional name for this subagent. The model sees one tool per named subagent (and one default for an unnamed entry). Names must be unique across subagent entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars.length ≥ 1 · length ≤ 64
reasoningSubagentReasoningReasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking.
temperaturenumberSampling temperature forwarded to the subagent call. When omitted, the provider's default applies.format: double
toolsSubagentNestedTool[]Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the suba…

SwitchyardRouterPluginobject

algorithmenumRouting algorithm for this request. "capability" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. "stage" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge on…capability | stage | auto | random | composite | passthrough
id*enumswitchyard-router
judge_modelstringThe model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform de…length ≥ 1

TextConfigobject

Text output configuration including format and verbosity

formatobject | object | objectText response format configuration
verbosityenumhigh | low | medium | null

TextExtendedConfigobject | object

Text output configuration including format and verbosity

ToolCallStatusenum

in_progress | completed | incomplete

ToolChoiceAllowedobject

Constrains the model to a pre-defined set of allowed tools

mode*enum | enum
tools*object[]
type*enumallowed_tools

ToolChoiceMcpobject

Forces a call to the named MCP server; `name` narrows it to one of its tools

nameany
server_label*string
type*enummcp

ToolSearchCallItemobject

A tool search call the client executed

argumentsany
call_id*string
execution*enumserver | client
idany
statusenumin_progress | completed | incomplete | null
type*enumtool_search_call

ToolSearchOutputItemobject

The tools a client-executed tool search loaded

call_id*string
execution*enumserver | client
idany
statusenumin_progress | completed | incomplete | null
tools*any | Preview_WebSearchServerTool | Preview_20250311_WebSearchServerTool[]
type*enumtool_search_output

ToolSearchServerToolobject

OpenRouter built-in server tool: finds tools marked `defer_loading` and makes them callable

parametersToolSearchServerToolConfigConfiguration for the openrouter:tool_search server tool
type*enumopenrouter:tool_search

ToolSearchServerToolConfigobject

Configuration for the openrouter:tool_search server tool

max_resultsintegerMaximum tools returned by one search. Defaults to 5.

TraceConfigobject

Metadata 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.

generation_namestring
parent_span_idstring
span_namestring
trace_idstring
trace_namestring

URLCitationobject

contentstring
end_index*integer
start_index*integer
title*string
type*enumurl_citation
url*string

WebFetchEngineEnumenum

Which fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape. "parallel" u…

auto | native | openrouter | exa | parallel | firecrawl

WebFetchPluginobject

allowed_domainsstring[]Only fetch from these domains.
blocked_domainsstring[]Never fetch from these domains.
id*enumweb-fetch
max_content_tokensintegerMaximum content length in approximate tokens. Content exceeding this limit is truncated.
max_usesintegerMaximum number of web fetches per request. Once exceeded, the tool returns an error.

WebFetchServerToolobject

OpenRouter built-in server tool: fetches full content from a URL (web page or PDF)

parametersWebFetchServerToolConfigConfiguration for the openrouter:web_fetch server tool
type*enumopenrouter:web_fetch

WebFetchServerToolConfigobject

Configuration for the openrouter:web_fetch server tool

allowed_domainsstring[]Only fetch from these domains.
blocked_domainsstring[]Never fetch from these domains.
engineenumWhich fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape. "parallel" u…auto | native | openrouter | exa | parallel | firecrawl
max_content_tokensintegerMaximum content length in approximate tokens. Content exceeding this limit is truncated.
max_usesintegerMaximum number of web fetches per request. Once exceeded, the tool returns an error.

WebSearchDomainFilterobject

allowed_domainsany
blocked_domainsany
excluded_domainsany

WebSearchEngineenum

The search engine to use for web search.

native | exa | firecrawl | parallel | perplexity

WebSearchEngineEnumenum

Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search…

native | exa | parallel | firecrawl | perplexity | auto

WebSearchModeenum

Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.

instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more

WebSearchPluginobject

enabledbooleanSet to false to disable the web-search plugin for this request. Defaults to true.
engineenumThe search engine to use for web search.native | exa | firecrawl | parallel | perplexity
exclude_domainsstring[]A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
id*enumweb
include_domainsstring[]A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog").
max_resultsinteger
max_usesintegerMaximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic).
modeenumEngine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more
search_promptstring
user_locationany | any
x_searchXSearchOptionsEnable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

WebSearchServerToolobject

Web search tool configuration (2025-08-26 version)

engineenumWhich search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search…native | exa | parallel | firecrawl | perplexity | auto
filtersWebSearchDomainFilter
max_resultsintegerMaximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped.
max_usesintegerMaximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded on…
modeenumEngine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more
search_context_sizeenumSize of the search context for web search toolslow | medium | high
type*enumweb_search_2025_08_26
user_locationWebSearchUserLocationUser location information for web search
x_searchXSearchOptionsEnable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

WebSearchServerTool_OpenRouterobject

OpenRouter built-in server tool: searches the web for current information

parametersWebSearchServerToolConfigConfiguration for the openrouter:web_search server tool
type*enumopenrouter:web_search

WebSearchServerToolConfigobject

Configuration for the openrouter:web_search server tool

allowed_domainsstring[]Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXAI). Cannot be used with excluded_domains.
engineenumWhich search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search…native | exa | parallel | firecrawl | perplexity | auto
excluded_domainsstring[]Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXAI. Cannot be used with allowed_domains.
max_charactersintegerExact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result …
max_resultsintegerMaximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped.
max_total_resultsintegerMaximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified.
max_usesintegerMaximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded on…
modeenumEngine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored.instant | fast | auto | deep-lite | deep | deep-reasoning · +3 more
search_context_sizeenumHow much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an ada…low | medium | high
user_locationWebSearchUserLocationServerToolApproximate user location for location-biased results.
x_searchXSearchOptionsEnable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

WebSearchSourceobject

type*enumurl
url*string

WebSearchStatusenum

completed | searching | in_progress | failed | incomplete

WebSearchUserLocationobject

User location information for web search

cityany
countryany
regionany
timezoneany
typeenumapproximate

WebSearchUserLocationServerToolobject

Approximate user location for location-biased results.

cityany
countryany
regionany
timezoneany
typeenumapproximate

XSearchOptionsobject

Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched.

allowed_x_handlesstring[]Only include posts from these X handles (max 20). Cannot be used with excluded_x_handles.items ≤ 20
enable_image_understandingbooleanAnalyze images attached to matching posts.
enable_video_understandingbooleanAnalyze videos attached to matching posts.
excluded_x_handlesstring[]Exclude posts from these X handles (max 20). Cannot be used with allowed_x_handles.items ≤ 20
from_datestringStart of the post date range (ISO 8601 date, e.g. "2025-01-01").format: date
to_datestringEnd of the post date range (ISO 8601 date, e.g. "2025-12-31").format: date

Validate a payload

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