Skip to content
docs

Anthropic-compatible clients

A client that uses the Anthropic Messages API connects to Waibee with no code changes. You set two values:

  • Base URL: https://api.waibee.com
  • API key: sk_live_...

Requests go to POST /v1/messages. Pass the key in x-api-key or in Authorization: Bearer; see Authentication. The max_tokens field is required.

Specify the model as <provider>/<model> from the catalog. The router converts Anthropic names without a prefix, such as claude-sonnet-4-6 or the same name with a date at the end, to the catalog form on its own. A ready-made recipe for Claude Code is on a separate page.

python
import anthropic
client = anthropic.Anthropic(
base_url="https://api.waibee.com",
api_key="sk_live_...",
)
msg = client.messages.create(
model="anthropic/claude-sonnet-4.6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)
node
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.waibee.com",
apiKey: process.env.WAIBEE_API_KEY,
});
const msg = await client.messages.create({
model: "anthropic/claude-sonnet-4.6",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello!" }],
});
console.log(msg.content[0].text);
Terminal window
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": "Hello!" }]
}'