GET
/v1/schemas/fal/chat/openrouter/router
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source tracee968e6cdad5ec3fd491af621293a819676235f69f65677e27018044124df938e{
"fetchedAt": 1795237201,
"extractorVersion": "2",
"verifiedAt": null
} |
Request body
9 properties · 2 required · 2 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | Name of the model to use. Charged based on actual token usage. | |
| prompt* | string | Prompt to be used for the chat completion | |
| reasoning | boolean | Should reasoning be the part of the final answer. | default: false |
| web_search_options | WebSearchOptions | Options for the OpenRouter ``openrouter:web_search`` server tool. | nullable |
| max_tokens | integer | This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length. | n ≥ 1 · nullable |
| enable_safety_checker | boolean | Authorized callers may set false to request relaxed screening. | default: true |
| enable_web_search | boolean | Give the model access to real-time web information via OpenRouter's web search server tool. When enabled, the model decides when to search and may search multiple times per request. Search costs are charged in addition to token usage. | default: false |
| system_prompt | string | System prompt to provide context or instructions to the model | nullable |
| temperature | number | This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input. | 0 ≤ n ≤ 2 · default: 1 |
Types
2 $defsWebSearchOptionsobject
Options for the OpenRouter ``openrouter:web_search`` server tool.
| max_characters | integer | Exact maximum characters of content per result (1-100,000). Applies to the Exa engine; ignored with native provider search. Takes precedence over search_context_size when both are set. | 1 ≤ n ≤ 100000 · nullable |
| allowed_domains | string[] | Limit results to these domains. Supported by Exa and most native providers (not Google native search). | nullable |
| max_total_results | integer | Maximum total results across all search calls in a single request. Useful for controlling cost and context size in agentic loops. | n ≥ 1 · nullable |
| user_location | WebSearchUserLocation | Approximate user location to bias web search results geographically. | nullable |
| engine | enum | Search engine to use. 'auto' uses native provider search when available and falls back to Exa. 'native' prefers the provider's built-in web search (OpenAI, Anthropic, Google, xAI, Perplexity), falling back to Exa for models without native support. 'exa' always… | auto | native | exa · default: "auto" |
| excluded_domains | string[] | Exclude results from these domains. Supported by Exa and some native providers (not OpenAI or Google native search). | nullable |
| max_results | integer | Maximum results per search call (1-25). Applies to the Exa engine; ignored with native provider search. Defaults to 5. | 1 ≤ n ≤ 25 · nullable |
| max_uses | integer | Maximum number of searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. With native provider search, forwarded only to Anthropic; other native providers ignore it. | n ≥ 1 · nullable |
| search_context_size | enum | How much content to retrieve per result. For Exa: low=5K, medium=15K, high=30K characters per result; when omitted, Exa picks adaptively (~2-4K per result). Ignored with native provider search. Overridden by max_characters when both are set. | low | medium | high · nullable |
WebSearchUserLocationobject
Approximate user location to bias web search results geographically.
| type | const | Location type. Only 'approximate' is supported. | "approximate" · default: "approximate" |
| city | string | City name, e.g. 'San Francisco'. | nullable |
| timezone | string | IANA timezone, e.g. 'America/Los_Angeles'. | nullable |
| country | string | Two-letter country code, e.g. 'US'. | nullable |
| region | string | Region or state, e.g. 'California'. | nullable |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"fal","endpointId":"openrouter/router","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}