GET

/v1/schemas/openrouter/chat/messages

kind inputactivity chathash 98b4a75b…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

29 properties · 2 required · 123 $defs
propertytypedescriptionconstraints
messages*any
model*string
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 …
context_managementobject
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…
fallbacksanyFallback models to try if the primary model fails or refuses, in order. Handled by OpenRouter multi-model routing rather than Anthropic server-side fallbacks; cannot be combined with `models`. Each entry accepts only `model`. Maximum of 3 entries.
max_tokensinteger
metadataobject
modelsstring[]
output_configMessagesOutputConfigConfiguration for controlling output behavior. Supports the effort parameter and structured output format.
pluginsAutoRouterPlugin | AutoBetaRouterPlugin | ModerationPlugin[]Plugins you want to enable for this request, including their settings.
providerProviderPreferencesWhen multiple model providers are available, optionally indicate your routing preference.
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
safeguardsany
service_tierstring
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
speedenum | any
stop_sequencesstring[]
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
streamboolean
systemstring | AnthropicTextBlockParam[]
temperaturenumberformat: double
thinkingobject | object | object | …
tool_choiceobject | object | object | …
toolsobject | object | object[]
top_kinteger
top_pnumberformat: 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.
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

123 $defs

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

AnthropicAllowedCallersenum[]

AnthropicBase64ImageSourceobject

data*string
media_type*enumimage/jpeg | image/png | image/gif | image/webp
type*enumbase64

AnthropicBase64PdfSourceobject

data*string
media_type*enumapplication/pdf
type*enumbase64

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

AnthropicCitationCharLocationParamobject

cited_text*string
document_index*integer
document_title*any
end_char_index*integer
start_char_index*integer
type*enumchar_location

AnthropicCitationContentBlockLocationParamobject

cited_text*string
document_index*integer
document_title*any
end_block_index*integer
start_block_index*integer
type*enumcontent_block_location

AnthropicCitationPageLocationParamobject

cited_text*string
document_index*integer
document_title*any
end_page_number*integer
start_page_number*integer
type*enumpage_location

AnthropicCitationSearchResultLocationParamobject

cited_text*string
end_block_index*integer
search_result_index*integer
source*string
start_block_index*integer
title*any
type*enumsearch_result_location

AnthropicCitationWebSearchResultLocationParamobject

cited_text*string
encrypted_index*string
title*any
type*enumweb_search_result_location
url*string

AnthropicDocumentBlockParamobject

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 …
citationsobject
contextany
source*object | object | object | …
titleany
type*enumdocument

AnthropicFileDocumentSourceobject

file_id*string
type*enumfile

AnthropicImageBlockParamobject

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 …
source*object | object | object
type*enumimage

AnthropicImageMimeTypeenum

image/jpeg | image/png | image/gif | image/webp

AnthropicInputTokensClearAtLeastobject

type*enuminput_tokens
value*integer

AnthropicInputTokensTriggerobject

type*enuminput_tokens
value*integer

AnthropicMessageOutputConfigobject

effortenumlow | medium | high | xhigh | max | null

AnthropicOutputEffortenum

low | medium | high | xhigh | max | null

AnthropicPlainTextSourceobject

data*string
media_type*enumtext/plain
type*enumtext

AnthropicSafeguardobject

A server-side safeguard Anthropic evaluates alongside the completion

classifier_contextobject
type*string

AnthropicSearchResultBlockParamobject

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 …
citationsobject
content*AnthropicTextBlockParam[]
source*string
title*string
type*enumsearch_result

AnthropicSpeedenum

fast | standard | null

AnthropicSystemClearAtenum

next_user_message | never | null

AnthropicTextBlockParamobject

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 …
citationsany
text*string
type*enumtext

AnthropicThinkingBlockBindingobject

mismatch_behaviorenumDeprecated: legacy alias of prefix_mismatch_behavior. Send only one of the two.error | drop_block | null · deprecated
prefix_mismatch_behaviorenumerror | drop_block | null

AnthropicThinkingDisplayenum

summarized | omitted | updates | null

AnthropicThinkingTurnsobject

type*enumthinking_turns
value*integer

AnthropicToolSearchToolBm25object

allowed_callersenum[]
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 …
defer_loadingboolean
name*enumtool_search_tool_bm25
strictboolean
type*enumtool_search_tool_bm25_20251119 | tool_search_tool_bm25

AnthropicToolSearchToolRegexobject

allowed_callersenum[]
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 …
defer_loadingboolean
name*enumtool_search_tool_regex
strictboolean
type*enumtool_search_tool_regex_20251119… | tool_search_tool_regex

AnthropicToolUnionobject | object | object | …

An Anthropic tool definition: a client-defined tool with a JSON Schema `input_schema`, or a server tool (bash, text editor, web search).

AnthropicToolUsesKeepobject

type*enumtool_uses
value*integer

AnthropicToolUsesTriggerobject

type*enumtool_uses
value*integer

AnthropicUrlImageSourceobject

type*enumurl
url*string

AnthropicUrlPdfSourceobject

type*enumurl
url*string

AnthropicWebSearchResultBlockParamobject

encrypted_content*string
page_ageany
title*string
type*enumweb_search_result
url*string

AnthropicWebSearchToolUserLocationobject

cityany
countryany
regionany
timezoneany
type*enumapproximate

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.

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.

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

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

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

FileParserPluginobject

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

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

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

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

MessagesAdvisorToolResultBlockobject

Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block Anthropic returns in assistant content when the `advisor_20260301` tool runs.

content*object
tool_use_id*string
type*enumadvisor_tool_result

MessagesBashToolResultBlockobject

Output of a sandbox-executed `openrouter:bash` call from a prior assistant turn. Accepted on replay and dropped before the provider request — Anthropic has no equivalent block.

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.
content*object
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.
tool_use_id*string
type*enumopenrouter_bash_tool_result

MessagesFallbackParamobject

Fallback model to try when the primary model fails or refuses. Only the `model` field is supported; per-attempt overrides are rejected.

model*string

MessagesMessageParamobject

Anthropic message with OpenRouter extensions

clear_atenumnext_user_message | never | null
content*string | AnthropicTextBlockParam | AnthropicImageBlockParam | AnthropicDocumentBlockParam[]
output_configAnthropicMessageOutputConfig
role*enumuser | assistant | system

MessagesOutputConfigobject

Configuration for controlling output behavior. Supports the effort parameter and structured output format.

effortenumHow much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`.low | medium | high | xhigh | max | null
formatobjectA schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).
task_budgetobjectTask budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap.

MessagesSearchModelsServerToolobject

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…

MessagesShellToolResultBlockobject

Output of an `openrouter:shell` call from a prior assistant turn. Accepted on replay and dropped before the provider request — Anthropic has no equivalent block.

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.
content*object
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.
tool_use_id*string
type*enumopenrouter_shell_tool_result

MessagesToolAdditionBlockobject

Adds a tool mid-conversation without invalidating the prompt cache: either a previously deferred tool (declared in `tools` with `defer_loading: true`, referenced by name) or a full inline `tool_definition`. Only valid in `role: "system"` messages. Not supporte…

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 …
tool*object | object | object | …
type*enumtool_addition

MessagesToolRemovalBlockobject

Removes a tool from the conversation mid-conversation without invalidating the prompt cache. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.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 …
tool*object | object | object
type*enumtool_removal

ModerationPluginobject

id*enummoderation

OpenRouterWebSearchServerToolobject

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

parametersWebSearchConfig
type*enumopenrouter:web_search

ORAnthropicToolSearchResultParamobject

Router-owned deferred discovery result for continuation.

content*object
tool_use_id*string
type*enumopenrouter_tool_search_result

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

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

ResponseHealingPluginobject

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

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

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

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

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

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.

WebSearchConfigobject

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.

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.

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":"messages","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}