Request Body Parameters¶
This page documents every parameter accepted by POST /v1/chat/completions (and the router alias endpoints).
Quick Reference¶
| Parameter | Type | Default | Purpose |
|---|---|---|---|
model |
string |
auto |
Model preference or routing mode |
messages |
array |
— | OpenAI-style conversation |
prompt |
string |
— | Shortcut when messages is empty |
context |
boolean\|string |
auto |
Memory injection mode |
chat_id |
string |
chat_default_<api-key-row-id> |
Which memory thread to use |
conversation_id / thread_id / memory_id |
string |
— | Aliases for chat_id |
new_chat |
boolean |
false |
Start a fresh random chat |
stream |
boolean |
false |
SSE streaming |
temperature |
number |
provider default | Sampling temperature |
max_tokens |
number |
2048 / 4096 |
Max answer length |
model¶
Type: string
Supported values¶
| Value | Behavior |
|---|---|
auto / router |
Auto-route: classify prompt → pick best provider/model automatically (checks Zen and Nvidia first). |
zen / zen-auto |
Force Zen provider: pick a random Zen model from the classified tier. |
puter / puter-auto |
Force Puter provider: skip Zen/NVIDIA, go directly to Puter fallback. |
nvidia / nvidia-auto |
Force NVIDIA provider: try NVIDIA models only, then fall back to Puter. |
<exact-model-name> |
Use a specific model (e.g. "deepseek-v4-flash", "gpt-4o"). Routed to Zen first, then Nvidia, then Puter. |
Available Zen models¶
| Model | Variants |
|---|---|
deepseek-v4-flash-free |
low, medium, high, max |
mimo-v2.5-free |
low, medium, high |
big-pickle |
(no variants) |
laguna-s-2.1-free |
low, medium, high |
nemotron-3-ultra-free |
low, medium, high |
north-mini-code-free |
none, high |
Note
If the model value is omitted or unrecognized, the Worker defaults to auto-routing behavior.
Examples¶
{ "model": "auto", "messages": [...] }
{ "model": "claude-sonnet-4-6", "messages": [...] }
{ "model": "gpt-4o", "messages": [...] }
messages¶
Type: array
OpenAI-style messages:
Supported roles are not strictly validated by the Worker, but the useful roles are:
For memory injection, only these are treated as conversation turns:
System, developer, and tool messages are preserved as instruction messages.
prompt¶
Type: string
Shortcut used when messages is missing or empty.
Example:
The Worker converts it into:
context¶
Type: boolean | string
Default: auto
Supported values¶
| Value | Behavior |
|---|---|
true or "auto" |
Store and inject compact memory. |
"full" |
Store and inject a larger recent-message slice. |
false |
Clear/skip memory for the selected chat id. |
If context is omitted, the Worker sets it to auto.
chat_id¶
Type: string
Use this to continue a specific remembered chat.
If not provided, the Worker uses a stable default chat id for the API key:
conversation_id, thread_id, memory_id¶
Aliases for chat_id.
The Worker checks them in this order:
new_chat¶
Type: boolean
Set to true to create a new random chat id:
The response includes the generated chat_id. Save it and send it later to continue the same memory thread.
stream¶
Type: boolean
Set to true for server-sent event streaming.
The Worker supports both upstream formats:
The client always receives OpenAI-style SSE chunks.
temperature¶
Type: number
Forwarded to the answer provider.
NVIDIA detail
NVIDIA rejects temperature: 0, so the Worker clamps NVIDIA temperatures to at least 0.01. This keeps classifier behavior nearly deterministic while avoiding NVIDIA API validation errors.
max_tokens¶
Type: number
Forwarded to the answer provider.
Defaults¶
For routed requests, if omitted, the Worker defaults to:
The classifier itself uses:
Note
If a client sends a smaller max_tokens, that client-provided limit wins. Long answers can still be cut off if you explicitly set max_tokens too low.