Parameters & Schema
Every request field with types, defaults and constraints.
The request body follows the OpenAI Chat Completions schema. Unknown fields are passed through to the model when supported.
Core
Model ID such as anthropic/claude-3.5-sonnet.
The conversation so far.
system, user, assistant or tool.
Text, or an array of text and image_url parts for vision models.
Required when role is tool.
Stream tokens as server-sent events. See Streaming.
0–2. Higher values give more random output.
Maximum tokens to generate in the reply.
Sampling
0–1. Nucleus sampling; change this or temperature, not both.
-2–2. Penalises repeated tokens.
-2–2. Encourages new topics.
Up to 4 sequences where generation stops.
Best-effort deterministic sampling.
Number of choices to generate. You're billed for all of them.
Tools
Functions the model may call.
Always function.
Function name.
What the function does.
Arguments the function accepts.
none, auto, required, or a specific function.
Output format
{"type":"json_object"} for JSON mode, or json_schema with a schema for structured outputs.
{
"model": "openai/gpt-4o-mini",
"response_format": { "type": "json_object" },
"messages": [
{ "role": "system", "content": "Reply in JSON." },
{ "role": "user", "content": "List 3 primary colours." }
]
}