LinuxAir
Docs / Billing & costing

Billing & costing

There are two separate meters: what your providers charge for tokens, and the LinuxAir platform fee in credits.

Model usage — paid to your provider

Every request runs on your own provider key, so the provider bills you directly at its own price. LinuxAir never resells or marks up tokens. For each request it records:

cost = ( input tokens × input price + output tokens × output price ) / 1,000,000prices in USD per million tokens
  • Before routing, cost is estimated for each candidate: input tokens from the prompt length (characters ÷ 4), output tokens from the model's typical answer length measured during probing, or your max_tokens.
  • After the call, the actual token counts reported by the provider are used.
  • If an answer check escalates a request, both calls are included in the recorded cost.

Savings

For each request LinuxAir also computes the baseline: what the same tokens would have cost on your highest-quality eligible model.

saved = max(0, baseline cost − actual cost)

The Overview dashboard sums these into spend versus baseline, savings and savings percentage for the period you choose.

Platform fee — paid in credits

EventCredits
Successful routed request (API or playground)1
Failed request0
Answer check or escalation0 extra
Fingerprinting a new model100
Request served from the semantic cache0
Batch requestReduced (50% off by default)
Shadow test run0 credits (provider tokens only)
Eval runThe routing fee per call (prompts × models)
Usage on a managed platform keyCost plus the published markup, in credits
Adding a model already in the shared catalogue0

1,000 credits cost $0.6 or ₹50, so one routed request costs about $0.0006 (₹0.05). New workspaces receive 2,000 free credits.

When your balance can't cover a request, the API returns 402 insufficient_credits. Nothing is charged for that request.

Spend caps

Owners can set daily and monthly USD caps on model spend for the workspace, and a daily cap per API key. When a cap is reached the API returns 402 budget_exceeded until the period rolls over, and an alert email goes out once when usage crosses your alert percentage. Caps apply to provider spend, which LinuxAir measures per request — it pauses routing rather than letting the bill run.

What the cache saves

A cached answer costs nothing at all: no provider tokens and no credits. The dashboard shows the hit rate and the dollars avoided, which on repetitive workloads — classification, extraction, support replies — is usually the single biggest line of savings after routing itself.

Topping up

Open Billing and choose a pack (5,000, 25,000, 100,000 or 500,000 credits). Payments are processed by Razorpay in India (UPI, cards, netbanking) and Stripe elsewhere. Credits are added once the payment is verified; each payment is credited exactly once, even if a confirmation arrives twice.

The ledger

Every credit movement is recorded with the balance after it: signup bonus, recharges, fingerprint fees, adjustments and refunds. Routing fees are rolled up into one line per day so the ledger stays readable.

Worked example

A workspace routes 100,000 requests in a month and adds three new models:

ItemCreditsUSD
Routing100,000$60.00
Fingerprinting300$0.18
Platform fee100,300$60.18

Token costs are billed separately by the providers and appear on the dashboard alongside the savings versus baseline.