Routing
JoyToken selects the model and provider for every request. Send model: "auto" and control the eligible routing range with tier and API key policy.
Common Requests
Tiers
Wallet Fallback
When the request uses model: "auto" and the current tier lacks balance, JoyToken may try another tier allowed by policy.
Concrete model IDs are not accepted in requests. If policy, balance, or budget filtering leaves no eligible candidate, the request returns an error.
Orchestration (Multi-task Planning)
For complex prompts, JoyToken may handle a single model: "auto" request in orchestration mode: it first builds a task plan, runs each task with a selected sub-model, then aggregates a final answer. You do not opt in explicitly; the gateway decides based on the request.
How to detect it
Task lifecycle
In orchestration mode each task is billed separately (one metadata/billing entry per task) and may use a different sub-model. Parse choices[].message.content as JSON before rendering, and sum billing.credits_used across all task metadata entries.
