Skip to content
docs

Quickstart

Waibee Router supports OpenAI Chat Completions (POST /v1/chat/completions) and Responses (POST /v1/responses), as well as Anthropic Messages (POST /v1/messages). For your first request you need a Waibee API key (sk_live_...; see Authentication for where to get one) and the address https://api.waibee.com.

Terminal window
export WAIBEE_API_KEY="sk_live_..."

2. Send your first request (OpenAI format)

Section titled “2. Send your first request (OpenAI format)”
chat-completion.sh
curl https://api.waibee.com/v1/chat/completions \
-H "Authorization: Bearer $WAIBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4.6",
"messages": [{ "role": "user", "content": "Answer in one word: what is the capital of France?" }]
}'

The response:

response.json
{
"id": "gen-...",
"object": "chat.completion",
"created": 1791678193,
"model": "anthropic/claude-sonnet-4.6",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": { "role": "assistant", "content": "Paris" }
}
],
"usage": { "prompt_tokens": 19, "completion_tokens": 4, "total_tokens": 23 }
}

The same request to POST /v1/messages, the format the Anthropic SDKs and Claude Code use.

messages.sh
curl https://api.waibee.com/v1/messages \
-H "x-api-key: $WAIBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4.6",
"max_tokens": 1024,
"messages": [{ "role": "user", "content": "Answer in one word: what is the capital of France?" }]
}'

Here the max_tokens field is required, and the response comes back in Anthropic shape: content, stop_reason, usage.

model has the form <provider>/<model>; take it from the GET /v1/models catalog:

  • anthropic/claude-sonnet-4.6
  • openai/gpt-5.2
  • waibee/auto (Autorouting: the router picks the model for the request)

The catalog, short names on /v1/messages, and what happens with a wrong name: Models.

To use Waibee from a client compatible with the OpenAI or Anthropic API, change only the base URL and the key:

client = OpenAI(
base_url="https://api.openai.com/v1",
api_key=os.environ["OPENAI_API_KEY"],
base_url="https://api.waibee.com/v1",
api_key=os.environ["WAIBEE_API_KEY"],
)

Step-by-step setup for specific tools is in Integrations.