Routing

AI model router: one id, the right model per request

An AI router on a prepaid key: send model "auto" and the gateway picks a fast, balanced or frontier model for that request, billed at the model's own price. No router fee, no subscription; pay as you go by card or in USDT, USDC, BTC, ETH, SOL.

bash
1curl https://api.relayswitch.io/v1/chat/completions -H "Authorization: Bearer sk-relay-..." -H "Content-Type: application/json" -d '{"model": "auto", "messages": [{"role": "user", "content": "Summarize this thread."}]}'
How it decides

How the AI router picks a model

Three tiers. The request is classified on the API, with no extra model call, from what it carries.

Fast

Everything the two tiers below do not claim: short chat turns, classification, extraction, rewrites.

5 models today. Input $0.0582 to $0.09, output $0.1455 to $0.36 per million tokens.

Balanced

Tools, code blocks, images, a json_schema answer, or a prompt over 16,000 tokens.

5 models today. Input $0.3178 to $1.20, output $0.9987 to $4.50 per million tokens.

Frontier

A reasoning ask, a high reasoning effort, or tools together with code.

5 models today. Input $1.20 to $6.00, output $7.20 to $30.00 per million tokens.

TierModelInputOutput
fastClaude Haiku 5.5$0.0582$0.1455
fastGLM 5.3 Flash$0.09$0.15
fastGPT-6 Luna$0.0625$0.20
fastMiniMax M3$0.09$0.36
fastDeepSeek V4.1 Flash$0.06$0.18
balancedClaude Sonnet 5.5$1.20$3.00
balancedGPT-6.1 Sol$0.582$2.91
balancedGemini 4 Argon$0.60$3.00
balancedKimi K3$0.90$4.50
balancedGLM 5.3$0.3178$0.9987
frontierClaude Opus 5.5$2.80$10.00
frontierGPT-6 Astra$3.00$15.00
frontierClaude Fable 5.1$6.00$30.00
frontierGemini 3.1 Pro Preview$1.20$7.20
frontierClaude Opus 5$1.80$7.50

USD per million tokens, read from the catalog at render. Within a tier, models are tried in this order.

Profiles

The same router, one catalog tag

A profile picks only models carrying that tag. Send the id as the model, or set it on the key.

auto/security

Exploit analysis, malware triage, CTF and red-team work. Alias: auto/cyber.

Only models carrying the security tag.

Models today: Gemma 4 26B A4B Cybersecurity, GLM-5.3 Flash Cybersecurity, Qwen3.8 27B Cybersecurity, Red Team (Flash), OrcaCyber MiniMax M3.1 Flash, OrcaCyber Qwen3.8 Flash Next, Red Team (Pro), CyberHeabsy, OrcaCyber Zero 1.5

auto/roleplay

Long character chats in SillyTavern, JanitorAI, Chub and the other front ends.

Only models carrying the roleplay tag.

Models today: Cydonia 24B v4.3, Magidonia 24B v4.3, Gemma 4 31B Novelist, Uncensored AI Roleplay, Qwen3.8 27B Synthia, Artemis v1.1, Skyfall 36B v2, Wayfarer Large 70B, Qwen3.8 27B Fable, Magnum v4 72B

Auto router key

Route a client that cannot change its model name

Set the router on the key instead of in the request.

One select on the key

Create key in the console has an Auto router select: off, auto, or one of the four profiles. A key set to one sends every chat request through the router whatever model the client names.

Works in fixed-model clients

Claude Code, Cursor, Cline, SillyTavern and any other client with a single model string get the tier that fits each request, with no change to the client.

Same balance, same key

The key draws on the prepaid balance like any other, topped up by card or in USDT, USDC, BTC, ETH, SOL. Existing keys get the same select in their settings.

Code

Three lines of difference

Any OpenAI-compatible client, the Messages, Responses or Gemini endpoints: the model id is "auto" and the rest of the request is yours.

curl, with a tier cap

bash
1curl https://api.relayswitch.io/v1/chat/completions \
2 -H "Authorization: Bearer sk-relay-..." \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "auto",
6 "messages": [{"role": "user", "content": "Write the migration plan for this schema."}],
7 "auto": {"tier_max": "balanced"}
8 }'
9# The answer's "model" names the model that replied; x-uplink-auto-tier names the tier.

Python OpenAI SDK, with a sticky session

python
1from openai import OpenAI
2import os
3
4client = OpenAI(
5 base_url="https://api.relayswitch.io/v1",
6 api_key=os.environ["RELAYSWITCH_API_KEY"],
7)
8
9reply = client.chat.completions.create(
10 model="auto",
11 messages=[{"role": "user", "content": "Refactor this function to async."}],
12 extra_headers={"x-session-id": "ticket-4821"}, # same model for 30 minutes
13)
14print(reply.model) # the model the router chose; billed at its own price
FAQs

AI model router: questions

What it picks, what it costs, and how to steer it.

Open the console

A key in under a minute

Get a key

Or email hello@relayswitch.io

One id, every model, pay as you go

A key set to the router from $10 by card or in USDT, USDC, BTC, ETH, SOL. No router fee, no subscription.

Join on Telegram