altrouter.ai
CORE

Parameters

The full reference of request parameters by surface. Which ones a given model supports is shown on its catalog page (the support column marks the exceptions).

i
The public contract is OpenAI. Standard fields are accepted as-is; parameters a given model does not support are flagged in the support column.

Chat completions

The request body for POST /v1/chat/completions.

modelstringrequired
A model id from the catalog, e.g. "gpt-5.4". See GET /v1/models.
messagesarrayrequired
The conversation: an array of messages with roles system / user / assistant / tool. Supports multimodal content (text + image_url).
streambooleandefault false
If true, the reply streams as OpenAI-compatible server-sent events (SSE). The stream ends with data: [DONE].
max_tokensinteger
Maximum tokens to generate. The alias max_completion_tokens is also accepted. Defaults to a server-side cap.
Claude validates the value against its output cap (8192) and returns a 400 if you exceed it; other models clamp silently.
temperaturenumber0–2default 1
Sampling randomness. Higher is more creative, lower is more deterministic.
Gemini models. GPT-5 and Claude do not take sampling parameters.
top_pnumber0–1default 1
Nucleus sampling — the probability mass to sample tokens from.
Gemini models. GPT-5 and Claude do not take sampling parameters.
stoparray
A string or array of strings at which generation stops.
toolsarray
Function-calling tool definitions in OpenAI format.
Models with the "tools" capability.
tool_choiceobject
Controls tool use: auto / required / none / a specific function.
reasoning_effortstringlow | medium | high | xhigh
Thinking budget for reasoning models. Reasoning content is returned in message.reasoning_content.
Reasoning models, but each family takes a different range: gpt-5.4/5.5 accept low…xhigh, gpt-5.2 low or high, Gemini low/medium/high, and Claude is binary (any value enables thinking). The model page lists the live values.
response_formatobject
Structured output: { "type": "json_object" } or { "type": "json_schema", "json_schema": … }. See the Structured outputs guide.
Gemini and GPT models. Not supported by Claude models.
web_searchbooleandefault false
Server-side web search: the model answers with live data from the web.
Every GPT-5.x model and most Gemini models — wherever the request routes through kie. Not supported by Claude. The model page lists it where available.
seedinteger
Seed for reproducible sampling where the model supports it.
Gemini models only. GPT-5.x and Claude do not take sampling parameters.
frequency_penaltynumber−2–2
Penalizes tokens by their existing frequency.
Gemini models only. GPT-5.x and Claude do not take sampling parameters.
presence_penaltynumber−2–2
Penalizes tokens that have already appeared.
Gemini models only. GPT-5.x and Claude do not take sampling parameters.

Image generation

The request body for POST /v1/images/generations. Cost-driving parameters (image count, resolution) are fixed per model — finer control comes from the model’s own params.

modelstringrequired
An image model id from the catalog, e.g. "nano-banana-pro".
promptstringrequired
A text description of the desired image.
imagearray
Reference images (URL or base64) for editing. The router picks the model’s edit variant automatically.
Edit-capable models.
resolutionstring1K | 2K | 4K
Resolution tier — selects the model variant and price (quality:"hd" ⇒ 4K).
Where the model offers multiple resolutions.
response_formatstringurl | b64_jsondefault url
Result shape. Defaults to url: the image is re-hosted on our CDN and the link is permanent.

For a specific model’s parameters, see its page in the catalog.

NextStreaming