ninja/auto to select a model for your request. Set routing.strategy to prioritize cost, latency, quality or a balanced approach. NinjaChat selects an available provider and can try another route if the request fails.
GET /api/v1/models/ninja/auto lists the router’s current candidate pool under router.candidates; the per-request ranking comes back on every response under routing.router.
Routing strategies
Withninja/auto the strategy picks the model; with a pinned model it orders the provider rails behind that model.
Billing: you pay the resolved model and provider rail’s published rate for actual token usage. The response identifies both, so cost attribution stays explicit. See Pricing for the live catalog.
Provider controls
routing.providers lets you include, exclude, or order provider rails without changing the public model ID. data_policy filters rails before ranking, and require_parameters rejects rails that cannot honor every requested feature.TypeScript SDK
ninja/auto, model and routing.resolved_model carry the concrete model that served it, routing.requested_models keeps ["ninja/auto"], and a router block explains the decision:
task is one of the task types above, classified_by is regex, llm, or llm-cached, candidates is the ranked chain the router would try in order, and considered lists every model it evaluated with the reason it was kept or eliminated. The same block is persisted on the request trace (GET /requests/{id}).
Current frontier choices
The router tracks the live catalog rather than a hard-coded marketing table. Current leading options you can pin directly includegpt-5.6-sol, gpt-5.5-pro, claude-fable-5, claude-opus-5, claude-sonnet-5, gemini-3.7-flash, gemini-3.1-pro, grok-4.6, deepseek-v4-pro, glm-5.2, minimax-m2.7, and qwen3-coder-next. Fetch /models at runtime when you need a user-facing picker.
Pair it with
Spend controls
routing.max_cost_usd caps each requestFallbacks
Explicit order with automatic failover
Quality gates
Evaluate important outputs before acceptance