Jev Router
Model Overview
Routes each chat request to a model picked for it. TypeSafe Jev judges how hard the request is, and the request goes to the cheapest model of the matching tier that can take it — light: GPT-6 Luna, DeepSeek V4.1 Flash, Gemini 3.1 Flash-Lite, Gemini 3.5 Flash-Lite; standard: GPT-6.1 Sol, Claude Sonnet 5.5; heavy: Claude Opus 5.5, GPT-6 Astra — falling back to a pricier one of the same tier if it fails. Light models do not reason unless you ask (reasoning_effort); standard and heavy ones may think before they answer. You pay the rate of the model that answers, named in meta.model (and the x-aimlapi-model header when not streaming), plus the judgement: one typesafe/jev decision at its catalogue price, listed as its own request in your usage (a turn that returns tool results goes back to the model that made the calls and needs none).
Context window is 1,050,000 tokens, with up to 384,000 tokens of output. The router accepts text, images, files and audio, and supports tools, parallel tool calls, streaming and structured output — the request shape is the same as any other chat model here.
Which models it routes to
Eight models, in three tiers. Within a tier they are comparable in quality and listed cheapest first: a request lands on the cheapest one that can take it, and falls back up in price, never down.
light
openai/gpt-6-luna · deepseek/deepseek-v4.1-flash · google/gemini-3-1-flash-lite · google/gemini-3-5-flash-lite
standard
openai/gpt-6.1-sol · anthropic/claude-sonnet-5.5
heavy
anthropic/claude-opus-5.5 · openai/gpt-6-astra
TypeSafe Jev scores how much capability the request needs, on a scale from trivial to frontier. Below 1.5 the request goes to the light tier, below 2.5 to standard, otherwise to heavy; if the judgement does not come back, it defaults to standard. A candidate that cannot take the request — tools, images, a JSON schema, the context size — is skipped for the next one in its tier, and each request carries one fallback: the model chosen and the next eligible one.
Within a conversation the choice sticks for 30 minutes, so a follow-up does not get re-judged or jump models mid-thread.
The reasoning rule follows the tier. Light models are sent with their thinking off, so a small max_tokens is an answer rather than an empty, paid-for reasoning trace; standard and heavy ones may think before they answer. Either way, if you set reasoning_effort, reasoning or thinking, the router passes your value through untouched.
API Schema
Successful response.
A unique identifier for the chat completion.
chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMlThe object type.
chat.completionPossible values: The Unix timestamp (in seconds) of when the chat completion was created.
1762343744The model that actually produced this completion — the one the router picked, not the router itself. Short form; meta.model carries its canonical id.
gpt-6-lunacurl --request POST \
--url 'https://api.aimlapi.com/v1/chat/completions' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{"model": "typesafe/jev-router", "messages": [{"role": "user", "content": "Hi! What do you think about mankind?"}]}'Successful response.
{
"id": "chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMl",
"object": "chat.completion",
"created": 1762343744,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm just a program, so I don't have feelings, but I'm here and ready to help you. How can I assist you today?",
"refusal": null,
"annotations": null,
"audio": null,
"tool_calls": null
},
"finish_reason": "stop",
"logprobs": null
}
],
"model": "gpt-6-luna",
"usage": {
"prompt_tokens": 137,
"completion_tokens": 914,
"total_tokens": 1051,
"completion_tokens_details": null,
"prompt_tokens_details": null
},
"meta": {
"model": "openai/gpt-6-luna",
"provider": "openai",
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Code Example
Finding out which model answered
The router never answers in its own name, so model at the top level is the model that was picked, in its short form — gpt-6-luna above, not typesafe/jev-router. The canonical id is in meta.model, and meta.usage is what that model charged you.
On non-streaming requests the same facts come back as response headers, which is the cheaper place to read them if you do not need the body:
x-aimlapi-model
openai/gpt-6-luna
x-aimlapi-provider
openai
x-aimlapi-credits-used
11
x-aimlapi-usd-spent
0.000005500
The same two questions, asked of the router, land on different models — this is the routing working as intended:
Last updated
Was this helpful?