Skip to main content
Product · AI Gateway

The AI gateway with LLM routing built in

One OpenAI-compatible endpoint in front of a curated model catalog. Each request is routed to the best model for the task, served, and returned with its decision on the record.

Request trace · req_8f2c41d9example values
auth
key prod-api · project support-bot
2 ms
limits
118 of 600 rpm · $37.42 of $200 monthly cap · budget ok
1 ms
route
auto · summarisation, complexity 0.21 · 19 qualified · Deepseek V4 Flash (fp4) · decisiveness 0.36
104 ms
serve
streamed · first token at 417 ms · 96 tokens out · primary served, no fallback
1.07 s
receipt
412 in / 96 out · $0.0001 · decision kept · retrievable by req_8f2c41d9
1.2 s

Every stage is enforced before the next; the receipt and the decision resolve from the request id on the response, in the API and the dashboard.

1 API
OpenAI-compatible, no code rewrites: point an existing SDK at one endpoint, keep the rest
74% saving
in-house test vs Claude Opus 4.8: 62 pts model switch + 13 routing, quality projected
950+ models
in the public catalog, updated regularly: curated creators, verified variants, live prices
Definition

What an AI gateway does

Between your applications and the models they call: where an organization sets who calls what, spends how much, and what is recorded.

An AI gateway gives every service one endpoint and one set of credentials in front of many models and providers, and it handles once the concerns that would otherwise be repeated in each service: authentication, rate limits, budgets, logging and failover. Applications keep the API they already use; the gateway holds the provider accounts, the catalog and the record.

Inferbase is that layer with one addition. Where a gateway alone sends each request to the model you named, this one can also decide which model should answer, on the task and the objective you set, and it keeps the reasoning with the request. The gateway is the execution layer of a control plane whose other two layers are the router and the catalog.

AI Gateway

One API, receipts, limits, budgets, failover. The execution layer.

LLM Router

A prompt classified, a model chosen on your objective, the decision kept. The decision layer.

Model Catalog

Curated creators, verified variants, benchmark evidence where it exists, live prices. The knowledge layer.

One API

One OpenAI-compatible API in front of the catalog

Point an existing SDK at one base URL and keep your code. Name a model to pin it, or send auto and let the gateway choose.

OpenAI SDKs

Chat completions, streaming, tool calls, structured output and embeddings pass through in the shapes the SDK already sends.

Anthropic SDKs

Anthropic-shaped clients are served on the Messages endpoint, including streaming and the full tool loop, and route the same way.

Pin or route

model="auto" lets the gateway choose; a named model is served as named. Switch per request.

Frameworks

Anything that speaks the OpenAI API works unchanged: LangChain, agent frameworks, batch jobs, RAG pipelines.

Routing

LLM routing inside the AI gateway

Set the model to auto: each request is classified for its task, narrowed to the models that clear the quality bar, and picked on your objective.

The objective is yours per key or per request: cost, balanced, quality or latency. The decision takes about a tenth of a second at the median on typical prompts, arrives before the first token when you stream, and is kept by request id with the task, the complexity, the candidates that qualified, the one that won and how clearly. Multi-turn work stays on the model that already holds the conversation unless switching is worth it.

How LLM routing works →

Objectives

Cost, balanced, quality, latency. Set on the key, override on the request.

Quality bar

A model has to clear the bar for the task before price is considered; unmeasured models are not assumed equal.

Session affinity

A conversation stays on its model across turns unless a switch is worth the cost.

Controls

AI gateway governance: keys, limits and budgets

Every control is enforced at request time, before anything is forwarded, so a runaway loop stops at the gateway rather than on the invoice.

Per-key rate limits

Requests per minute per API key; a request over the limit is refused with a 429.

Spend caps

A monthly cap per key; a request that would exceed it is refused with a 402.

Project budgets

A monthly budget per project, enforced the same way across every key in it.

Roles

Owner, admin, billing, member and viewer, gating what a member can change and see.

Multi-factor authentication

An organization can require MFA for access to its settings and control plane.

Zero retention

Per user or for a whole organization; disclosed on the decision wherever it changes a choice.

Reliability

Failover, cooldown and cache-aware serving

A routed request carries a primary and two fallbacks; the gateway moves on transient failures and returns client errors as they are.

Fallback chain

Primary plus up to two fallbacks per request, each attempt written to the decision record.

Cooldown

A route that fails is cooled down for a minute before it is tried again.

Honest errors

Invalid requests and content refusals are returned, not retried; another model would reject them identically.

Cache-aware

A prompt marked for caching prefers a route that can cache it, within the quality band.

Observability

Every request on the record

A receipt for every request and a decision for every routed one, retrievable by request id from the API and the dashboard.

Usage receipt

Model, tokens in and out, cached tokens where the provider reported them, and cost.

Routing decision

Task, complexity, objective, how many models qualified, which won and how clearly.

By request id

Both records resolve from the id on the response, in the API and in the activity log.

Streamed first

When streaming, the decision is the first event, before any content token.

Fetch any decision by request id →

Your keys

Bring your own keys, or serve on ours

Connect your own provider accounts and the gateway routes and serves on them; without them, requests run on the managed catalog.

Your accounts

OpenAI, Anthropic, Gemini and other provider keys, connected per project and encrypted at rest.

Your bill

Tokens are billed by your provider; the only Inferbase charge is the routing decision.

Managed catalog

Without keys, requests run on the curated catalog at the provider token price plus a flat 6%.

Same record

Receipts, decisions, limits and budgets apply the same way on either.

The category

How this AI gateway compares

Routers recommend, aggregators resell routing, frameworks make you host it. Inferbase decides, serves and keeps the record, in one API.

InferbaseOpenRouterLiteLLMPortkeyNotDiamondRouteLLM
Picks the best model per requestFirst-partyVia NotDiamond add-onBeta tiers you map by handNo, rules you defineYesStrong vs weak only
Routes and serves in one APIYesYesProxies via your providersProxies via your providersNo, you run itNo, self-hosted
Per-request decision auditYesNoLogs and cost trackingDeep logs and tracesRecommend-sideBuild your own
Nothing to self-host or calibrateYesYesNoHosted, rules are yoursYesNo
Model breadthCurated catalog of open modelsHundreds of models100+ providers, your keys1,600+ models, your keysYour chosen poolTwo models

Read the full comparisons →

FAQ

Frequently asked questions about AI gateways

What an AI gateway is, how it differs from an API gateway and a router, and how this one behaves.

Route every request to the right model.

One OpenAI-compatible endpoint, the best model for each request, every decision on the record. New models and prices reach you with no rewrite.