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.