linuxair
OpenAI-compatible · Bring your own keys

Every prompt to the right model.

LinuxAir predicts how well each of your models will answer each request, then sends it to the cheapest model that's as good as the best. Quality first, savings automatically — without writing a single routing rule.

2,000 free credits No card required One-line integration
routing decision
Extract invoice number, GSTIN and total from this text and return JSON.
Structured output74%Extraction21%Code5%
Small fast model
within 0.8 pts of the best model, 16× cheaper
Small fast modelChosen$0.00025
quality 94.1%in tolerance
Frontier modelTop quality$0.00410
quality 94.9%better-value option exists
Open-weights 70B$0.00034
quality 90.6%below your quality limit

Works with the providers you already use

OpenAIAnthropicGoogle GeminiGroqMistralDeepSeekxAITogetherOpenRouterOllama
The problem

One model for every prompt is the most expensive way to be average.

A frontier model is overkill for extraction and small talk, and a cheap model fails hard reasoning. Picking one means either overpaying on easy prompts or underperforming on hard ones.

Paying frontier prices for easy work

A lot of real traffic — classification, extraction, short replies — is handled just as well by models that cost a fraction as much.

Routing rules that rot

Keyword and length rules are guesses. They break when prompts change and nobody can tell whether they're helping.

A new model every month

Every release means re-benchmarking and re-tuning. Most learned routers need retraining before they can use a new model.

How it works

Measured once. Routed forever. Always learning.

Connect your providers

Paste your API keys and pick models from each provider's live catalogue. Prices fill in automatically.

Every model gets a fingerprint

Each model answers a shared probe set once. Its strength on each task type becomes its fingerprint.

Each prompt is placed and predicted

Incoming prompts are matched to task types, and every model's quality is predicted — with an uncertainty range.

The best value wins, safely

Only models within your quality tolerance of the best are considered. The cheapest wins; weak answers are checked and escalated.

Try it

Watch the decision change.

Pick a kind of prompt and how much quality you'd trade for savings. Illustrative models and numbers — in production these come from your own models' fingerprints.

Prompt type
Quality tolerance
2.5 pts
Always the bestMaximum savings
Cost vs frontier—
Quality given up—
live preview
Features

Everything a production router needs.

A quality guarantee, not a cost dial

You set the most quality you're willing to give up. Models outside that band are never chosen — even when they're cheaper. Hard prompts automatically tighten the band.

Zero-retrain onboarding

Add a model and it's fingerprinted once. No router retraining, ever.

Automatic pricing

Prices and context windows come from a live feed and refresh daily.

Answer checks

When a weaker model is chosen, a judge scores the answer and escalates if it falls short.

Learns from your traffic

Thumbs up/down and retries reshape each model's fingerprint for your prompts.

Drop-in OpenAI API

Chat completions, streaming, tools and JSON mode pass straight through. Change the base URL and key — nothing else.

Every decision explained

Each request records the candidates, their predicted quality and cost, and why the winner won — plus savings versus your strongest model.

Semantic cache

Repeated or near-identical prompts are answered instantly — no tokens, no credits.

Spend caps

Daily and monthly budgets per workspace and per key, with alerts before you hit them.

Evals & shadow tests

Score models on your own prompts, and try alternatives against live traffic safely.

PII redaction

Mask emails, cards, IDs and secrets before a prompt ever leaves for a provider.

Teams & roles

Invite colleagues as Owner, Developer or Viewer, enforced server-side.

Batch API

Up to 500 requests in one call, processed in the background at a reduced fee.

All features

Compare

Better than one model. Safer than rules.

One model for everythingHand-written rulesLinuxAir
Cost on easy promptsFrontier priceDepends on the rulesCheapest capable model
Quality on hard promptsGood, if you pay for itOften misroutedGuarded by your tolerance
Adding a new modelSwap and hopeRewrite rulesProbe once, done
Adapts to your promptsNoNoOnline learning
Explains each decision—Rule nameQuality, cost and reason
Provider outageRequests failManual fallbackFailover + circuit breaking
Repeated promptsPaid for every timePaid for every timeServed from cache, free
Cost controlFind out on the invoiceFind out on the invoiceSpend caps and alerts
Sensitive dataSent as-isSent as-isRedacted before sending
For developers

Two lines to integrate.

Keep your OpenAI SDK. Point it at LinuxAir and use model="auto". The response tells you which model answered and why.

  • Python, Node, cURL — any OpenAI-compatible client
  • Streaming, tools and JSON mode supported
  • Per-request control: tolerance, budget caps, model allow-lists
  • Automatic failover to the next-best model on provider errors

Quickstart API reference

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.linuxair.com/v1",
    api_key="la-...",
)

r = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Summarise this contract"}],
)
print(r.model)  # the model LinuxAir chose
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://ai.linuxair.com/v1",
  apiKey: process.env.LINUXAIR_KEY,
});

const r = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Summarise this contract" }],
});
console.log(r.model);
curl https://ai.linuxair.com/v1/chat/completions \
  -H "Authorization: Bearer $LINUXAIR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello"}]}'

Questions, answered.

Do you mark up model usage?
No. Requests run on your own provider keys, so your provider bills you directly at their price. LinuxAir charges a small platform fee in credits per routed request.
Will routing make my answers worse?
Only as much as you allow. You set a quality tolerance — the most predicted quality you'll give up to save money. Models outside it are never chosen, and when a weaker model is picked an optional judge checks the answer and escalates weak ones.
How does it know which model is good at what?
Every model answers a shared set of probe prompts across task types — code, math, extraction, JSON, multilingual, reasoning and more. That gives each model a per-task fingerprint, which live feedback keeps refining. Read the details.
What else does it do besides routing?
A semantic cache that answers repeat prompts for free, spend caps with alerts, evaluations on your own prompts, shadow testing against live traffic, PII redaction, a batch API, teams with roles, and Prometheus metrics. See all features.
What if two models are equally good?
LinuxAir says so. Ties are broken by how much evidence each model has and how certain the measurement is — never by which one you added first — and the decision tells you plainly that the models were measured as equal, so you know the probe set needs sharpening.
Can I self-host it?
Yes. LinuxAir can run entirely on your own infrastructure, including with local embedding and judge models. See Self-hosting.

Stop overpaying for easy prompts.

2,000 free credits on signup. Bring your own keys, change one base URL, and see the savings on your own traffic.