OpenAI-compatible clients
Chat Completions and Responses clients connect once you set the base URL and API key. On Responses, send the history with every request; there is no server-side state. You set two values:
- **Base URL**: `https://api.waibee.com/v1`
- **API key**: `sk_live_...`
OpenAI has two formats, and the router serves both:
| Format | Endpoint | SDK method |
|---|---|---|
| Chat Completions | `POST /v1/chat/completions` | `client.chat.completions.create()` |
| Responses | `POST /v1/responses` | `client.responses.create()` |
Which one to use: [router overview](/router/#three-request-formats). How the second one works: [Responses format](/router/responses-api/).
Tools that use the Anthropic format have a [separate page](/router/integrations/anthropic-compatible/).
## SDK
```python title="python"
from openai import OpenAI
client = OpenAI(
base_url="https://api.waibee.com/v1",
api_key="sk_live_...",
)
```
```ts title="node"
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.waibee.com/v1',
apiKey: process.env.WAIBEE_API_KEY,
});
```
One client serves both endpoints:
```python title="python"
chat = client.chat.completions.create(
model="anthropic/claude-sonnet-4.6",
messages=[{"role": "user", "content": "ping"}],
)
resp = client.responses.create(
model="openai/gpt-5.1-codex",
input="ping",
)
print(resp.output_text)
```
## curl
```bash frame="terminal"
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": "ping" }] }'
```
A Responses request differs in the path and the body:
```bash frame="terminal"
curl https://api.waibee.com/v1/responses \
-H "Authorization: Bearer $WAIBEE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "openai/gpt-5.1-codex", "input": "ping" }'
```
## Editors and agents
Tools such as **Cline** and **Continue** take a custom OpenAI-compatible endpoint in their settings. The general recipe:
| Setting | Value |
|---|---|
| Provider / API type | OpenAI-compatible |
| Base URL | `https://api.waibee.com/v1` |
| API key | `sk_live_...` |
| Model | `<provider>/<model>`, for example `anthropic/claude-sonnet-4.6` |
:::tip
The router rejects an ID without the provider prefix with `422 validation_error`. Available IDs: [Models](/router/models/). The value `waibee/auto` leaves the choice of model to the router; see [Autorouting](/router/autorouting/).
:::
Chat Completions and Responses clients connect once you set the base URL and API key. On Responses, send the history with every request; there is no server-side state. You set two values:
- Base URL:
https://api.waibee.com/v1 - API key:
sk_live_...
OpenAI has two formats, and the router serves both:
| Format | Endpoint | SDK method |
|---|---|---|
| Chat Completions | POST /v1/chat/completions | client.chat.completions.create() |
| Responses | POST /v1/responses | client.responses.create() |
Which one to use: router overview. How the second one works: Responses format.
Tools that use the Anthropic format have a separate page.
from openai import OpenAI
client = OpenAI( base_url="https://api.waibee.com/v1", api_key="sk_live_...",)import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://api.waibee.com/v1', apiKey: process.env.WAIBEE_API_KEY,});One client serves both endpoints:
chat = client.chat.completions.create( model="anthropic/claude-sonnet-4.6", messages=[{"role": "user", "content": "ping"}],)
resp = client.responses.create( model="openai/gpt-5.1-codex", input="ping",)print(resp.output_text)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": "ping" }] }'A Responses request differs in the path and the body:
curl https://api.waibee.com/v1/responses \ -H "Authorization: Bearer $WAIBEE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-5.1-codex", "input": "ping" }'Editors and agents
Section titled “Editors and agents”Tools such as Cline and Continue take a custom OpenAI-compatible endpoint in their settings. The general recipe:
| Setting | Value |
|---|---|
| Provider / API type | OpenAI-compatible |
| Base URL | https://api.waibee.com/v1 |
| API key | sk_live_... |
| Model | <provider>/<model>, for example anthropic/claude-sonnet-4.6 |