1
Get your API key
Create a key at Developers → Keys. Keys look like
nj_sk_... and are shown once — copy immediately.2
Install an SDK
3
Put the key in your environment
4
Make your first request
Set
model to ninja/auto and NinjaChat picks the best model for you.5
Read the response
Read the answer from
output_text. Check model, cost_usd and request_id for the model used, cost and request trace.Example response and routing details
Example response and routing details
model is the concrete model the router chose — the same value as routing.resolved_model — while routing.requested_models keeps the ninja/auto you asked for. routing.router explains the pick: the detected task, how it was classified (regex, llm, or llm-cached), and the ranked candidate chain. The sample is trimmed; see Smart routing for the full block.Next steps
SDKs
TypeScript and Python clients
Smart Routing
ninja/auto plus cost, latency, and quality routingChoose a model
Frontier chat, image, and video models
Observability
Request traces, usage, balance, health, and webhooks
Go live
Reliability, spend controls, and launch checks
Pricing
Live token and media rates