For AI agents, the documentation index lists all pages. Append .md to a documentation URL for Markdown, or request text/markdown.

Skip to Content

Getting Started

Choose a BitRouter API deployment, discover a model, and send your first inference request.

3 min readEdit this page

Call BitRouter through one of its supported inference protocols. New integrations can start with Responses; existing clients can retain a supported request format.

The BitRouter API is in early beta. Pin your integration to the behavior you test and review release notes before upgrading.

Choose a deployment

DeploymentHTTP originOpenAI-compatible SDK base URLCaller credential
Cloudhttps://api.bitrouter.aihttps://api.bitrouter.ai/v1Cloud API key or supported bearer credential
Local defaulthttp://127.0.0.1:4356http://127.0.0.1:4356/v1Local virtual key when authentication is enabled

Cloud can be called directly from an application without running a local daemon. Local operation requires a running router and configured inference sources. Authentication explains the credential boundaries.

Get a Cloud credential

Create a scoped Cloud API key with inference:invoke. Follow the CLI sign-in instructions on that page if you have not authenticated yet, then set the issued key in your application environment:

export BITROUTER_API_KEY='paste-your-cloud-key-here'

Model discovery

Use GET /v1/models to discover catalog model IDs and the supported provider, model, and modality filters. A catalog entry does not grant account access or guarantee capacity for a request.

Virtual Models explains logical model IDs, explicit provider routes, and locally configured names. The separate model market is an illustrative Elastic Inference preview, not the callable-model catalog.

First Cloud request

Choose a catalog model your account can access. The following request uses an example model ID; replace it with your selected ID or an enabled workspace routing preset:

curl https://api.bitrouter.ai/v1/responses \
  -H "Authorization: Bearer $BITROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-haiku-4.5","input":"Hello!"}'

Inspect the response status and output items. Authentication success or catalog presence alone does not guarantee a completed model request. Inference APIs explains responses, streaming, tools, and continuation; Endpoint Reference owns the hosted request and response schema.

Python client

Use the OpenAI Python SDK as a compatible client for the Responses request above:

python -m pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.bitrouter.ai/v1",
    api_key=os.environ["BITROUTER_API_KEY"],
)
response = client.responses.create(
    model="anthropic/claude-haiku-4.5",
    input="Hello!",
)
print(response.output_text)

The SDK uses your BitRouter Cloud key and sends this request to BitRouter. Compatibility depends on the fields and capabilities supported by the BitRouter endpoint contract.

Local router

Follow CLI Getting Started to configure and start the daemon. Choose a selector listed by bro models for that configuration. Use its local origin and a local virtual key when authentication is enabled.

The Inference APIs examples show a local request. bitrouter/auto requires a local policy binding configured through Auto Router; Cloud uses catalog IDs or enabled workspace presets.

Choose an inference protocol

Inference APIs compares Responses, Chat Completions, Messages, and GenerateContent, including request examples and compatibility limits.

Manage and inspect BitRouter

Discovery, BYOK encryption bootstrap, health, and metrics are public. Account-bound management endpoints require a credential with the scope named by that endpoint.

Use Cloud Management for terminal workflows. The BitRouter Cloud OpenAPI schema generates Endpoint Reference; the Cloud gateway separately publishes its deployed schema.

How is this guide?

On this page