GET
/v1/schemas/llmgateway/chat/v1/chat/completions
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source trace477e8258752717545fa4114b499bcc484ac6b0a273b9c39832892143c7814be2{
"fetchedAt": 1794029444,
"extractorVersion": "1",
"verifiedAt": null
} |
Request body
34 properties · 0 required · 0 $defs| property | type | description | constraints |
|---|---|---|---|
| model | string | ||
| messages | object[] | ||
| temperature | number | ||
| max_tokens | number | ||
| top_p | number | ||
| frequency_penalty | number | ||
| presence_penalty | number | ||
| response_format | object | object | ||
| stream | boolean | default: false | |
| n | integer | How many chat completion choices to generate for each input message. Only accepted when the resolved model supports it upstream (currently OpenAI Chat Completions models and Google Gemini 2.5 models via `candidateCount`); requests for unsupported models are re… | 1 ≤ n ≤ 128 |
| prompt | object | Managed prompt to expand before routing, by id or name. Its rendered messages are prepended to `messages`, and its model and parameters fill fields you leave unset. Pin a `version`, or pick a `label` (`production` by default; `latest` is the newest version). A… | |
| prompt_cache_key | string | OpenAI prompt caching key used to improve cache routing for requests with shared prompt prefixes. | |
| prompt_cache_retention | enum | OpenAI prompt cache retention policy. OpenAI supports in_memory and 24h for eligible models. | in_memory | 24h | null |
| prompt_cache_options | object | OpenAI explicit prompt caching options (GPT-5.6 and later). mode 'implicit' (default) places an automatic cache breakpoint at the latest message; 'explicit' caches only content parts marked with prompt_cache_breakpoint. Only forwarded for OpenAI models that su… | |
| safety_identifier | string | Opaque end-user identifier stored in log params.safety_identifier. Never forwarded upstream; credits requests use the fixed LLM Gateway API-key identifier instead. | length ≤ 128 |
| user | string | OpenAI end-user identifier. Used as a fallback sticky-routing session key when no x-session-id header or prompt_cache_key is provided. | |
| tools | object | object | object[] | ||
| tool_choice | enum | enum | enum | … | Controls which tool the model calls. `{"type": "web_search"}` demands a search instead of offering one, and requires a `web_search` tool in `tools`. Providers whose web search is model-elected are unaffected by it — the model already decides — but it is the on… | |
| parallel_tool_calls | boolean | Whether the model may call several tools in one turn. Only sent alongside `tools`. Forwarded to OpenAI, Azure, and OpenAI-compatible providers that list it in `supported_parameters`; `false` maps to Anthropic's `disable_parallel_tool_use`. Ignored elsewhere. | |
| reasoning_effort | enum | Controls the reasoning effort for reasoning-capable models. `none` is only supported by OpenAI's newer reasoning models (e.g. gpt-5.4 and later); for other providers it disables reasoning. `max` is the highest tier (above `xhigh`), supported by Anthropic model… | none | minimal | low | medium | high | xhigh · +2 more |
| reasoning | object | Unified reasoning configuration object for controlling reasoning behavior | |
| effort | enum | Controls the computational effort for supported models (currently only claude-opus-4-5-20251101) | low | medium | high | null |
| verbosity | enum | Controls how detailed the model's responses are. Only supported by OpenAI GPT-5 and later models; requests to models without verbosity support return a 400 error. | low | medium | high | null |
| service_tier | enum | Processing tier for the request. `flex` and `priority` are forwarded only for provider/model mappings that explicitly support the requested tier, such as supported OpenAI and Google mappings. `auto`/`default` use the standard on-demand tier. Unsupported tier r… | auto | default | flex | priority |
| anthropic_safeguards | object | Anthropic server-side safeguard review (Claude Code auto mode): the Messages API `safeguards` field and its paired beta values. Valid pairs restrict routing and fallback to compatible providers; unsupported provider pins return 400. Verdicts are returned as `a… | |
| routing | enum | Provider selection strategy for model-id routing, named after the factor it optimizes. `auto` (default) uses the full weighted smart-routing score. `price`, `throughput`, and `latency` each give a 90% relative weight to that factor while keeping a small uptime… | auto | price | throughput | latency |
| free_models_only | boolean | When used with auto routing, only route to free models (models with zero input and output pricing) | default: false |
| onboarding | boolean | Deprecated and ignored. This once skipped email verification for free model usage, but the flag is client-supplied, so any account could assert it. Onboarding is now recognized server-side by the API proxy; setting this grants nothing. | default: false · deprecated |
| no_reasoning | boolean | When used with auto routing, exclude reasoning models from selection | default: false |
| sensitive_word_check | object | ||
| image_config | object | ||
| web_search_options | object | OpenAI's Chat Completions web search parameter. Equivalent to a `{"type": "web_search"}` entry in `tools` with the same `search_context_size` and `user_location`; when both are sent, the tool's own fields win. The model decides whether to search; add `tool_cho… | |
| web_search | boolean | Enable native web search for models that support it. When enabled, the model can search the web for real-time information. | default: false |
| plugins | object[] | Plugins to enable for this request. Currently supported: response-healing (automatically repairs malformed JSON responses when using response_format) |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"llmgateway","endpointId":"v1/chat/completions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}