Drop in. Route smart. Cut costs.
A drop-in replacement for the OpenAI and Anthropic base URLs. Pick a section, or start with the three-line quickstart.
Most agent loops pin one expensive model across every step, from planning to retrieval to tool calls to synthesis to verification, and pay frontier prices throughout. Fairmeter classifies each step and sends it to the cheapest model that still holds quality, then serves repeats from cache instead of billing you twice.
SDK recipes
Runnable templates for OpenAI, Anthropic, curl, LangChain, Cursor, Codex CLI, and Claude Code.
Opencurl https://gateway.fairmeter.in/v1/chat/completions \
-H "Authorization: Bearer gw_live_..." \
-H "Content-Type: application/json" \
-d '{ "model": "cap:auto", "messages": [...] }'Core concepts
Auth
How API keys, scopes, and the gw_live_ prefix work.
Routing
How the gateway picks a model and a none/low/medium/high thinking budget per prompt.
Step classifier
Per-step labels that bias routing across an agent loop.
Capability aliases
Name intent with cap: handles instead of pinning models.
Agent sessions
One row per agent run: trajectory replay and cost envelopes.
Caching
Exact, semantic, multi-turn, and streaming cache hits, billed at zero.
Billing
Token classes, four-way spend split, and thinking-budget reporting.
Tooling
Security & ops
Security
Zero data retention, anomaly rate-limits, access scoping, and per-org controls.
Compliance
Audit chain, evidence packs, GDPR DSAR, and HIPAA-oriented tooling.
Operations
Exactly-once daily jobs, dependency currency, and what an operator can verify.
Webhook capacity
Size your receiver for the delivery rate, latency budget, and retry behaviour.
Three lines today. A clean bill tomorrow.
Plans start at $9.99/month. You’ll route real traffic in under five minutes.