OnyRouter: Automatic AI Model Selection Per Request (onysoft/auto API Guide)
With 708+ models in the catalog, "which model should I use?" is a real engineering burden for every request: wire quick tasks to a flagship and your bill balloons; send deep analysis to a budget model and quality visibly drops. OnyRouter takes that decision off your plate — it analyzes the incoming message, classifies the question type and routes the request to the model best suited for the job. Usage is a single line: set the model field to onysoft/auto. Routing itself is completely free; only the selected real model's usage is billed. Few platforms in the world offer this today, and Onysoft is the first Turkish AI gateway to ship it — both inside the panel Chat and directly on the API, ready to power your own applications.
What Is OnyRouter and How Does It Work?
OnyRouter is a two-layer routing engine. The first layer is heuristic and adds zero latency: if the message carries code signals (code blocks, error output, technical commands) it goes straight to the coding category; a very short greeting goes to the quick category. The second layer is a classifier: messages the heuristics can't settle are shown to a light, fast model that answers "what type of question is this?" in a single word. Classification runs on the platform's own infrastructure — you pay neither tokens nor fees for it.
The resolved category maps to a real model through a routing table: quick questions go to the best speed-class model, coding and general chat to a balanced flagship, deep analysis to the strongest reasoning model, bulk mechanical work to the best price/performance model, and image-bearing requests to a vision-capable model. We keep the routing table current as the catalog evolves — when a new model becomes best-in-class we update the route, while your code keeps saying onysoft/auto. The choice is transparent on every response: the model field of the API response shows the actual routed model.
Why Automatic Model Selection?
Production systems tend to fall into one of two traps: sending everything to a single flagship (you pay flagship prices while 80% of traffic is simple work) or sending everything to a single budget model (your users notice the quality drop on critical questions). The right architecture is tiered model selection — but building it by hand means writing request classifiers and tracking the model catalog forever.
OnyRouter gives you that tier as a managed layer. Similar approaches are only now emerging globally — OpenRouter's auto route, or research such as RouteLLM — but Onysoft is the first local Turkish gateway to combine it with TL billing, local support and KVKK compliance. It also works on two surfaces at once: "⚡ OnyRouter" is the default option in the in-panel Chat, and the onysoft/auto virtual model brings the same intelligence to your own SaaS, chatbot or internal tool with a one-line change.
Using It on the API: Python, curl and Streaming
There is no special endpoint — the familiar /v1/chat/completions with the model name onysoft/auto:
from openai import OpenAI
client = OpenAI(
base_url="https://api.onysoft.com/v1",
api_key="sk-ony-YOUR_KEY",
)
response = client.chat.completions.create(
model="onysoft/auto",
messages=[{"role": "user", "content": "Find and fix the bug in this Python function: ..."}],
)
print(response.model) # the routed real model (e.g. anthropic/claude-sonnet-5)
print(response.choices[0].message.content)The same request with curl:
curl https://api.onysoft.com/v1/chat/completions \
-H "Authorization: Bearer sk-ony-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "onysoft/auto",
"messages": [{"role": "user", "content": "Hello!"}]
}'Streaming works the same way — pass stream=True and the answer streams live from the selected model; the model field of the chunks tells you which model is answering. onysoft/auto also appears as a virtual model in the /v1/models list, so applications that discover the catalog programmatically will find it too.
Categories: Which Question Goes Where?
OnyRouter works with six categories. The current routing logic in short:
- Quick — short/simple questions, greetings, one-line lookups → the leading speed-class model (currently the Gemini Flash class).
- General — normal conversation, writing, summarization, translation → a balanced flagship (currently the Claude Sonnet class).
- Code — programming, debugging, technical commands → the strongest balanced coding model.
- Deep — multi-step analysis, strategy, math/logic, long-document evaluation → the reasoning flagship (currently the GPT-5.6 class).
- Bulk — high-volume mechanical work such as batch classification/labeling → the best price/performance model (currently the DeepSeek class).
- Vision — image/photo analysis requests → a strong vision-capable model.
The examples in parentheses reflect the routes at the time of writing; we update them as the catalog evolves. For endpoints where you want to pin a specific model, keep using its full name (like anthropic/claude-sonnet-5) — onysoft/auto is an option, not a requirement.
Billing, Transparency and Limits
The billing model is deliberately simple: routing is free, and the request is billed at the selected real model's catalog price. Your usage logs and panel reports show the request under the routed model's name; there is no surprise "router fee" line item. For cost planning, run your expected per-category volume through the cost calculator with the corresponding route's model.
Two limits worth knowing: (1) On keys with a model lock (allowed_models), the request returns 403 if the routed model isn't on the allow-list — locked keys are dedicated to specific models by design, so use explicit model names there. (2) The classifier layer can add a few seconds to time-to-first-token; for clear-cut cases like code or greetings the zero-latency heuristics kick in, so most of the time you won't feel it. A good middle ground: keep latency-critical endpoints on fixed model names and let the rest of your traffic ride onysoft/auto.
To get started: create a free account, generate your sk-ony- key in the panel, and set the model to onysoft/auto on your first request. To try it without writing code, ⚡ OnyRouter is already the default in the panel Chat.
Frequently Asked Questions
What is OnyRouter and what does it do?
OnyRouter is Onysoft AI Gateway's automatic model selection technology. It analyzes the incoming message with two layers (instant heuristics + a light classifier model), determines the question type and routes the request to the model best suited for the job. On the API you simply set the model to onysoft/auto; in the panel Chat the same technology runs by default as ⚡ OnyRouter.
Does onysoft/auto cost extra?
No. Routing and classification are completely free; the request is billed only at the catalog price of the real model OnyRouter selects. Usage logs show the request under the selected model's name — there is no separate router fee.
How do I see which model was selected?
The model field of the API response shows the routed real model (in streaming, the model field of the chunks). In the panel Chat, the response header shows an "⚡ OnyRouter → model (category)" badge, and your usage reports list the request under the selected model's name.
Which categories does OnyRouter route by?
There are six: quick (short/simple questions), general (conversation, writing, summarization, translation), code (programming and debugging), deep (multi-step analysis and reasoning), bulk (high-volume mechanical work) and vision (image analysis). Each category maps to the current best model of its class, and the routing table is updated as the catalog evolves.
How is this different from OpenRouter's auto feature?
It belongs to the same family of approaches — per-request automatic model selection — but OnyRouter ships on Turkey's local AI gateway together with TL billing at the central bank rate, corporate e-invoicing, KVKK compliance and 24/7 Turkish support. The same technology runs both on the API (onysoft/auto) and in the panel Chat; routing is free and the selected model is transparently reported on every response.
Related pages
Ready to build?
Access 708+ AI models through a single API. Pay as you go — no subscription.