Quickstart

From zero to your first AI API call in under 5 minutes — account, provider keys, and your first request.

How it works

BrainstormRouter is a free, BYOK (Bring Your Own Key) AI gateway. You plug in your existing provider API keys (OpenAI, Anthropic, Google), and BrainstormRouter routes traffic across them with intelligent model selection, budget enforcement, and quality scoring.

You pay your providers directly. BrainstormRouter never marks up token costs. The gateway itself is free — no credit card required.

:::note Research Project: BrainstormRouter is a free AI research project. No warranties, SLAs, or company associations. Use at your own discretion. :::

1. Sign in

Go to brainstormrouter.com/dashboard and sign in with GitHub or Google. No email verification needed.

On first sign-in, BrainstormRouter automatically creates your workspace and gives you admin access. This takes about 2 seconds.

2. Add your provider keys (BYOK)

Navigate to Configure → Providers in the sidebar.

Click Add Provider and paste your API key for any supported provider:

ProviderWhere to get a key
Anthropicconsole.anthropic.com
OpenAIplatform.openai.com
Google AIaistudio.google.com
Groqconsole.groq.com

Your keys are encrypted at rest and never sent back to the browser. The more providers you add, the more models become available for routing and fallback.

3. Create a gateway API key

Navigate to Configure → API Keys in the sidebar.

Click Create Key and configure:

  • Name — A label like "Development" or "Production"
  • Rate limit — Requests per minute (optional)
  • Budget — Daily spend cap in USD (optional)

Click Create. Your key appears once — copy it immediately:

4. Send your first request

Use any OpenAI-compatible SDK. Just change the base URL:

curl
curl https://api.brainstormrouter.com/v1/chat/completions \
  -H "Authorization: Bearer br_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{"role": "user", "content": "Hello, world!"}]
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.brainstormrouter.com/v1",
    api_key="br_live_...",
)

response = client.chat.completions.create(
    model="auto",  # BrainstormRouter picks the best model
    messages=[{"role": "user", "content": "Hello, world!"}],
)

print(response.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.brainstormrouter.com/v1",
  apiKey: "br_live_...",
});

const response = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: "Hello, world!" }],
});

console.log(response.choices[0].message.content);

Setting model: "auto" lets BrainstormRouter pick the optimal model based on request complexity and your available providers. Or specify a model directly: anthropic/claude-sonnet-4, openai/gpt-4o, google/gemini-2.0-flash.

5. Inspect the decision

Every response includes headers showing what BrainstormRouter did:

X-BR-Selected-Model: anthropic/claude-sonnet-4
X-BR-Guardian-Status: pass
X-BR-Estimated-Cost: 0.0032
X-BR-Actual-Cost: 0.0028
X-BR-Efficiency: 1.14
X-BR-Guardian-Overhead-Ms: 1.1

With curl, use -v to see them. In Python:

print(response.headers["X-BR-Selected-Model"])   # which model was chosen
print(response.headers["X-BR-Actual-Cost"])       # cost in USD

What's happening under the hood

When you send a request, BrainstormRouter:

  1. Authenticates your gateway key and checks rate limits / budget
  2. Selects a model using Thompson sampling, complexity assessment, and cost-quality frontiers
  3. Routes the request to the best available provider using your BYOK keys
  4. Falls back automatically if a provider fails (circuit breaker + cascade)
  5. Records usage, cost, and quality metrics for your dashboard

All of this happens in a single request — no configuration required.

Next steps