Auto router
rapidrouter/auto picks the model per prompt: light, code, Indic or heavy.
Send "model": "rapidrouter/auto" and the gateway picks the model for you. The prompt is classified locally, no extra model call and no added latency, into one of four buckets: light (short chat) routes to the cheapest live model, code to the strongest live coding model, indic (Indian languages and scripts) to Sarvam when live, and heavy (long context, tools, big output budgets) to a strong mid model. openrouter/auto is accepted as a drop-in alias.
The optional auto object biases the choice: cost_tier of "low", "medium" (the default) or "high" shifts each bucket toward cheaper or stronger models. It is read by the router and stripped before forwarding. The response reports auto_router.bucket and auto_router.chosen, streaming included (as a leading chunk), and the request is billed at the chosen model's normal price.
curl https://rapidrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $RAPIDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "rapidrouter/auto",
"auto": { "cost_tier": "low" },
"messages": [{ "role": "user", "content": "Fix this function: ..." }]
}'