Skip to content

Getting Started

Sign up for BrainstormRouter, get your API key, and make your first request.

# Getting Started

BrainstormRouter is an OpenAI-compatible AI gateway that routes requests to the optimal model across 362 endpoints and 20+ providers. It uses Thompson sampling and 13 intelligence systems to maximize quality while minimizing cost.

Sign Up

Create your account at [brainstormrouter.com](https://brainstormrouter.com) and generate an API key from the dashboard.

Your First Request

BrainstormRouter is fully OpenAI-compatible. Point any OpenAI SDK or HTTP client at https://api.brainstormrouter.com/v1:

``bash

curl https://api.brainstormrouter.com/v1/chat/completions \

-H "Authorization: Bearer br-your-api-key" \

-H "Content-Type: application/json" \

-d '{

"model": "auto",

"messages": [

{"role": "user", "content": "Explain quantum computing in one paragraph"}

]

}'

`

The auto model lets BrainstormRouter select the optimal model for your request. You can also specify a model directly (e.g., claude-opus-4-6, gpt-5.4, gemini-3.1-pro).

Using the OpenAI SDK

Since BrainstormRouter is OpenAI-compatible, use any OpenAI SDK by changing the base URL:

`typescript

import OpenAI from 'openai';

const client = new OpenAI({

apiKey: 'br-your-api-key',

baseURL: 'https://api.brainstormrouter.com/v1',

});

const response = await client.chat.completions.create({

model: 'auto',

messages: [{ role: 'user', content: 'Write a Python fibonacci function' }],

});

`

`python

from openai import OpenAI

client = OpenAI(

api_key="br-your-api-key",

base_url="https://api.brainstormrouter.com/v1",

)

response = client.chat.completions.create(

model="auto",

messages=[{"role": "user", "content": "Write a Python fibonacci function"}],

)

`

Routing Modes

Control how BrainstormRouter selects models using the X-BR-Strategy header:

`bash

curl https://api.brainstormrouter.com/v1/chat/completions \

-H "Authorization: Bearer br-your-api-key" \

-H "X-BR-Strategy: quality" \

-H "Content-Type: application/json" \

-d '{"model": "auto", "messages": [...]}'

`

Available strategies: quality, cost, combined, capability, learned, rules.

Response Headers

Every response includes routing metadata in headers:

| Header | Description |

|--------|-------------|

| X-BR-Model | The model that handled the request |

| X-BR-Provider | The provider that served it |

| X-BR-Latency | End-to-end latency in milliseconds |

| X-BR-Cost | Request cost in USD |

| X-BR-Strategy` | The routing strategy that was used |

Next Steps

  • Explore the full [API reference](/router/api-reference)
  • Learn about the [13 intelligence systems](/router/intelligence)
  • Review [security features](/router/security)
  • Browse [available models](/router/models)