Automating Domino's local competitor pricing research.Read the case study

Introducing Brainbase LLM Gateway

Every model behind one API, routed, failed over and paid for in one place.

Contact sales

Change one line, keep your SDK

The gateway speaks the OpenAI and Anthropic APIs. Point a client at it and every model on your list answers to the same call.

Every lab, one address

  • Anthropic
  • OpenAI
  • Google
  • xAI
  • Meta
  • DeepSeek
  • Mistral
  • Qwen
  • Moonshot
agent.py
from openai import OpenAI
client = OpenAI(
base_url="https://gateway.acme.internal/v1",
api_key=os.environ["GATEWAY_KEY"],
)
client.chat.completions.create(
model="claude-fable-5-2",
messages=[{"role": "user", "content": question}],
)

Composite models route every request

A composite is a decision tree whose leaves are models. Draw it on the canvas, publish it, and clients call it by its name like any model. What sits behind the name changes without a deploy.

Claude Fable 5.2+0 ms
GPT-6.2 Astra
Gemini 4 Carbon
Add fallback

Model

Runs a model and falls down its list of fallbacks when one fails. A list may mix providers and protocols.

Over 60k tokens?Rules
Gemini 4 Carbon+0 ms
Claude Haiku 5.5+0 ms

Rules branch

Picks a path from the request itself: its size, attachments, tools or metadata. Costs no model call.

What is it about?+210 ms
GPT-6.2 Astra+210 ms
Claude Sonnet 5.5+210 ms
Kimi K3.1 Pro+210 ms

Classifier branch

Asks a small model the question and follows its answer, for choices rules cannot make.

Does it ask for a password?+180 ms
Claude Fable 5.2+180 ms

Guardrail

Stops a request on its way to a model, refused in the caller's own API format.

One address for every model.
Routed, kept up and accounted for.

The gateway sits between your agents and the model providers. It picks the model for each request, keeps requests answered when a provider fails, and records what every one of them cost.

Every model, through the API you already use.

Send OpenAI or Anthropic requests: chat, responses, messages or embeddings. The gateway translates each one for whichever model answers, so changing models is changing one string.

Composite models choose the model per request.

Define a model that is really a policy. Rules or a classifier send each request where it fits, clients call it by one name, and what sits behind that name changes without a deploy.

Failover across providers.

Give a model more than one deployment. When one fails or is overloaded, the request goes to the next and the client gets an answer, not an error.

Keys, limits and budgets for every team.

Each key carries its own list of models, its own rate limits and its own spend. Requests over a limit stop at the gateway.

Every request traced and priced.

Each request is logged with the model that answered, its tokens, its latency and its cost, so what every agent and every team spends is in view.

Runs in your cloud.

One container and a Postgres database, in your own account. Provider keys are encrypted at rest, and each team's providers, models and keys stay its own.