API reference
modelrouting is a thin, fast pass-through to the airelay gateway. Everything is served over HTTPS from a single base URL; the catalog, models and limits are managed by airelay, not by this edge.
Base URL and auth
Base URL: https://api.modelrouting.io/v1
Auth: Authorization: Bearer arl_…your-key
Your key is an arl_… token issued by the Telegram bot. It works anywhere a Responses-API key is accepted. The key carries your purchased concurrency limits; there is no separate quota to track.
POST /v1/responses
Native OpenAI Responses API. One in-flight execution consumes one LLM stream from your key for its entire lifetime.
curl -N https://api.modelrouting.io/v1/responses \
-H "Authorization: Bearer arl_…your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-sol",
"input": "Summarize the last commit",
"stream": true
}'
Set "stream": true to receive server-sent events as they happen; omit it for a single JSON response. Request bodies up to 256 MB are accepted.
Hosted tools
Tool calls run on our side; each in-flight tool execution consumes one tool stream. Included tools:
google_search— web searchx_research— social-media research
{
"model": "gpt-6.1-sol",
"input": "Is the new airelay release out yet?",
"tools": [{"type": "google_search", "google_search": {}}]
}
GET /v1/models
Live model catalog (requires a valid key). GET /v1/public/models serves the same catalog without auth, for display purposes.
Concurrency errors
When every one of your streams is busy, airelay answers 429 with a machine-readable code and a one-second retry hint:
{ "error": { "code": "llm_concurrency_limit_exceeded", "retry_after": 1 } }
{ "error": { "code": "tool_concurrency_limit_exceeded", "retry_after": 1 } }
Harnesses that respect Retry-After will queue automatically. To raise your ceiling, buy an addon from the bot (+1 LLM stream, +2 tool streams).
Key lifecycle
- /buy — new 30-day subscription, or renewal: a fresh key with your current limits is issued and the previous one is retired.
- /add — addon: +1 LLM + 2 tool streams on your live key, plus a 30-day extension.
- Limits and expiry are enforced by airelay; the key row at the edge only tracks ownership.
Payments
- USDT on TRC20 (Tron) or BEP-20 (BSC) — pick your chain in the bot (
/paytron,/paybsc). - Each order gets its own derived deposit address; activation is automatic on confirmation. BSC requires 15 confirmations; Tron settles on the next observed transfer.
- Amounts include a small fee buffer; surplus stays in the derived address.
Zero data retention
The edge logs metadata only — key id, model, HTTP status, duration, byte counts. Prompts, completions and tool payloads stream straight through to the gateway and are never persisted by modelrouting.
Health
GET /healthz # database + upstream airelay status
GET /readyz # same probe, readiness semantics