⚡ OnyRouter — Automatic Model Selection

Let the system pick the best model per request: set the model field to onysoft/auto.

OnyRouter analyzes the incoming message, classifies the question type and routes the request to the best-fit model. There is no special endpoint — the familiar /v1/chat/completions with the model name "onysoft/auto". Routing is completely free; the request is billed only at the selected real model's catalog price.

POST /v1/chat/completions "model": "onysoft/auto"

The standard chat completions endpoint — OnyRouter activates when the model field is onysoft/auto. All parameters, including streaming, work unchanged.

How It Works

There are two layers. The first is instant heuristics with zero added latency: messages carrying code signals (code blocks, error output, technical commands) go to the coding category; very short greetings go to the quick category.

Messages the heuristics can't settle are shown to a light, fast classifier model that returns a one-word category. Classification runs on the platform's own infrastructure — you pay neither tokens nor fees for it. The category is then mapped to a real model through a continuously updated routing table.

Categories and Routes

Category When is it chosen? Routed class
hizliShort/simple questions, greetings, one-line lookupsLeading speed-class model
genelNormal conversation, writing, summarization, translationBalanced flagship model
kodProgramming, debugging, technical commandsStrongest balanced coding model
derinMulti-step analysis, strategy, math/logicReasoning flagship
ekonomikHigh-volume mechanical work such as batch classification/labelingBest price/performance model
gorselImage/photo analysis requestsStrong vision-capable model

The routing table is updated as the model catalog evolves — your code keeps saying onysoft/auto while we keep the routes current.

Example Request

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.onysoft.com/v1",
    api_key="sk-ony-your-api-key",
)

response = client.chat.completions.create(
    model="onysoft/auto",
    messages=[{"role": "user", "content": "Bu Python kodundaki hatayı bul: ..."}],
)
print(response.model)  # yönlendirilen gerçek model
print(response.choices[0].message.content)
cURL
curl https://api.onysoft.com/v1/chat/completions \
  -H "Authorization: Bearer sk-ony-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "onysoft/auto",
    "messages": [{"role": "user", "content": "Merhaba!"}]
  }'

Transparency: Which Model Was Selected?

The model field of the response shows the routed real model (in streaming, the model field of the chunks). Your usage reports also list the request under the selected model's name. onysoft/auto additionally appears as a virtual model in the /v1/models list.

Billing

Routing and classification are free. The request is billed at the catalog price of the real model OnyRouter selects; there is no separate "router fee".

Limits and Notes

For the full guide and architecture, see our blog post: OnyRouter

Want help finding the right model?