What is an AI gateway?
An AI gateway is a proxy that sits between your application and many model providers. Instead of integrating each provider's SDK and managing separate keys, you call one OpenAI-compatible endpoint. The gateway routes the request to the right model, meters usage, enforces budgets, and records an auditable ledger entry. Your code stays the same even if you swap models under the hood.
Rolling-window budgets, explained
Instead of a single monthly cap, Selora gives every API key two rolling windows: a 4-hour window for burst protection and a weekly window for sustained spend. As time passes, old usage “slides off” the window and budget recovers automatically — so a runaway agent gets throttled now, but your account is healthy again shortly after, with no manual intervention.
How scoped keys work
Each key carries an allowlist of models and a per-minute RPM limit. A coding agent's key can call Claude Fable and Sonnet at 120 rpm; a CI job's key can call only GPT-5.6 Luna at 30 rpm. If one key is compromised or overspends, blast radius is contained — the rest of your account keeps running.
Prompt caching
Repeated prompt prefixes can be cached so you pay a fraction of the input-token rate on subsequent calls. The gateway applies cache discounts dynamically and shows the savings in the cost calculator. Most agentic workloads with stable system prompts benefit materially from this.
Glossary
- TTFT — Time to first token; how long until the model starts emitting.
- TPS — Tokens per second; streaming throughput.
- RPM — Requests per minute; the rate-limit unit.
- Window — a rolling time interval that bounds spend/token usage.
- Ledger — a hash-chained, append-only record of every request.
Next steps
Ready to build? Read the documentation and the quickstart, or explore plans.