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.
1. Set the key
Section titled “1. Set the key”export WAIBEE_API_KEY="sk_live_..."2. Send your first request (OpenAI format)
Section titled “2. Send your first request (OpenAI format)”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?" }] }'import osfrom openai import OpenAI
client = OpenAI( base_url="https://api.waibee.com/v1", api_key=os.environ["WAIBEE_API_KEY"],)
response = client.chat.completions.create( model="anthropic/claude-sonnet-4.6", messages=[{"role": "user", "content": "Answer in one word: what is the capital of France?"}],)print(response.choices[0].message.content)Install the client with pip install openai: the router accepts the official SDK as is.
import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://api.waibee.com/v1', apiKey: process.env.WAIBEE_API_KEY,});
const response = await client.chat.completions.create({ model: 'anthropic/claude-sonnet-4.6', messages: [{ role: 'user', content: 'Answer in one word: what is the capital of France?' }],});
console.log(response.choices[0].message.content);Install the client with npm install openai.
The response:
{ "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 }}3. Anthropic format
Section titled “3. Anthropic format”The same request to POST /v1/messages, the format the Anthropic SDKs and Claude Code use.
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 ID
Section titled “Model ID”model has the form <provider>/<model>; take it from the GET /v1/models catalog:
anthropic/claude-sonnet-4.6openai/gpt-5.2waibee/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.
Switching from another provider
Section titled “Switching from another provider”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.