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="")
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 provider'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 provider's concern.

Inferbase serves the open-weight models in its catalog this way, from a managed pool of providers, 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 provider's price plus a flat 6%. No minimum, no idle charge, no capacity to reserve.

Managed pool

Open-weight models already loaded on the providers 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 provider 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 provider 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 providers 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 served as named.

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 session 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 provider 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.

How the gateway fails over →

Pricing

Serverless inference pricing: per token, no idle

Free within the free plan's limits; on Pro, the provider's token price plus a flat 6%, on every receipt.

Free plan

Chat, embeddings and rerank on our models at no charge: 100 requests and $0.50 of usage a day, 5,000 requests a month.

Tokens on Pro

The provider's per-token price plus a flat 6%, from credit (top-ups from $10). No minimum spend, no idle charge, no reserved capacity.

Plan

Pro is $19 a month with 50,000 requests on any model and any key, routed or pinned.

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 →

Serve on your own provider keys →

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 on the free plan with 5,000 requests a month, no card required.