Skip to main content
Product · Serverless Inference

Serverless inference with LLM routing built in

Open models through one OpenAI-compatible API, on managed capacity, billed per token. No GPUs to provision, nothing idle to pay for, and the router on whenever you send auto.

serve.pyopenai ≥ 1.0
client = OpenAI(
    base_url="https://api.inferbase.ai/v1",
    api_key=os.environ["INFERBASE_API_KEY"],
)

stream = client.chat.completions.create(
    model="deepseek-v4-flash",   # or "auto"
    messages=[{"role": "user", "content": prompt}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
950+ models
in the catalog: curated, verified, live prices
Per request
the cheapest model that clears the quality bar for THAT prompt, not per account
3 doors
prompt, response, tool results, checked per policy
Every request
on record: decision, verdicts, tokens, cost, latency
Definition

What serverless inference is

A model called over an API on capacity someone else runs, paid per token rather than per GPU-hour, nothing left running in between.

With dedicated inference you provision GPUs, load a model, keep it warm and pay whether or not it is busy. With serverless inference the model is already loaded on a host's hardware; you send a request, the response streams back, and the bill is the tokens. Live in minutes, nothing while idle, and the hardware, the batching and the weights are the host's concern.

Inferbase serves the open-weight models in its catalog this way, from a managed pool of hosts, behind the one API the gateway gives every application. Name a model and it is served as named; send auto and the router chooses for the task. Either way the request leaves a receipt, behind the same keys, limits and budgets.

Per token

The host's price plus a flat 6%. No minimum, no idle charge, no capacity to reserve.

Managed pool

Open-weight models already loaded on the hosts that serve them; the pool, not you, holds the hardware.

One API

OpenAI-compatible, with Anthropic-shaped clients on the Messages endpoint. Keep the SDK you have.

Routed or pinned

The router picks per request when you send auto; a named model is served as named.

Mechanism

How serverless inference works on Inferbase

One request in, the model resolved or chosen, a host that already has it loaded, tokens streamed back with the record.

request
model="auto"

One OpenAI-compatible call, authenticated, checked against the key's limits and budget.

managed pool
LlamaQwenDeepSeekMistral

The router picks a model that clears the bar for the task, or the named model is served as named, on a host that already has it loaded.

response
tokens out

Streamed back through the same connection, with a usage receipt and, when routed, the decision.

One API

One OpenAI-compatible API for serverless inference

Point an existing SDK at one base URL and keep your code. Every request shape the SDK already sends passes through.

OpenAI SDKs

Chat completions, streaming, tool calls, structured output and embeddings, 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.

Capabilities honoured

A request that carries a JSON schema or tools is served only by a model whose deployment supports them.

Frameworks

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

The catalog

The open models serverless inference serves

A curated catalog, not a logo wall: every entry carries its provenance, its verified variants, benchmark evidence where it exists, and the live price.

The managed pool serves open-weight models from 11 creators: Qwen, DeepSeek, Z.ai, Meta, Google, Moonshot AI, MiniMax, Mistral, OpenAI, NVIDIA and Microsoft. The catalog lists many more models than the pool serves, and marks which are servable today, so the model behind your API is always a known quantity: what it is, who made it, which variant is running, and what it costs.

Browse the model catalog →

Provenance

Each model is attributed to its creator; a variant is a variant, never passed off as the original.

Evidence

Benchmark scores per task from a public, cited source, where they exist. Where they do not, the catalog says so.

Live prices

Per-token prices read from the hosts and kept current, on the catalog and on every receipt.

Served nowfrom the catalog

Every model listed here answered a one-token probe; the full servable set is on the catalog.

Routing

Serverless inference with LLM routing

Send auto and each request is classified for its task, narrowed to the models that clear the quality bar, and served by the one that wins on your objective.

Serverless inference is how a model runs; routing is the decision of which one. 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. A pinned model skips the router and is never charged a routing fee.

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.

Reliability

Failover, budgets and warm capacity

A routed request carries a primary and two fallbacks under fixed time budgets; a pinned model falls back to another host that serves it.

Fallback chain

A primary and up to two fallbacks per request, every attempt on the record.

Time budgets

15, 10 and 5 seconds to first token per attempt; 30 seconds for the chain.

Cooldown

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

Slow starters

Very large models scaled to zero when idle get a longer first-token budget.

Honest errors

Invalid requests and refusals are returned, not retried.

Health probes

One-token probes on every route; servable means it answered.

Failover trace · req_c17a0be2example values
route
auto · summarisation · primary Deepseek V4 Flash (fp4) · fallbacks Qwen3 235B, Llama 3.3 70B
100 ms
attempt 1
Deepseek V4 Flash (fp4) · 503 from the host at 240 ms · route cooled down for 60 s
240 ms
attempt 2
Qwen3 235B · first token at 612 ms · 96 tokens out · served
1.04 s
receipt
both attempts on the decision record · billed once, for the model that answered · req_c17a0be2
1.4 s

A transient failure moves to the next model in the chain; an invalid request or a content refusal is returned as it is, because another model would reject it identically.

Pricing

Serverless inference pricing: per token, no idle

Two meters, both visible on every receipt. Free during beta; the published plan is pay as you go.

Tokens

The host's per-token price plus a flat 6%. No minimum spend, no idle charge, no reserved capacity.

Decisions

$1 per 1,000 routing decisions, the first 5,000 each month free. A pinned model is never charged one.

Credit

New accounts start with $5 of credit. Top-ups from $10.

Caps

A requests-per-minute limit and a monthly spend cap per key, a monthly budget per project, enforced before anything is forwarded.

See the full pricing →

Your keys

Serve on the managed pool, or on your own accounts

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

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 pool

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

Two lanes, one record

Your key

served on your OpenAI, Anthropic or Gemini account, connected per project

tokens billed by your provider · Inferbase charges the routing decision

Managed catalog

served on the curated catalog, no keys to connect

tokens at the provider price plus a flat 6%

Same record

  • receipt
  • decision
  • limits
  • budgets
The category

How serverless inference on Inferbase compares

Aggregators resell hosts with no decision, proxies follow your rules, routers only recommend. Inferbase decides, serves and keeps the record.

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 serverless inference

What serverless inference is, how it differs from self-hosted GPUs and from a gateway, and how serving on Inferbase behaves.

Put intelligence in the middle.

One gateway in front of every model, with your policies applied and every decision on record. Start with $5 of credit and 5,000 routing decisions a month, no card required.