One key, one baseURL. OpenAI, Anthropic and Responses protocols share one entry point.
baseURL
https://router.nebutra.com/v1Sample model
gpt-5.6-lunaimport OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.NEBUTRA_API_KEY,
baseURL: "https://router.nebutra.com/v1",
});
const res = await client.chat.completions.create({
model: "gpt-5.6-luna",
messages: [{ role: "user", content: "ping" }],
});curl -s https://router.nebutra.com/v1/chat/completions \
-H "Authorization: Bearer $NEBUTRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-luna","messages":[{"role":"user","content":"ping"}]}'import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.NEBUTRA_API_KEY, // sent as x-api-key
baseURL: "https://router.nebutra.com",
});
const msg = await client.messages.create({
model: "claude-sonnet-4-5",
max_tokens: 256,
messages: [{ role: "user", content: "ping" }],
});# Claude Code / any Anthropic-format CLI export ANTHROPIC_BASE_URL="https://router.nebutra.com" export ANTHROPIC_AUTH_TOKEN="$NEBUTRA_API_KEY" claude
# Codex CLI — Responses API
export OPENAI_BASE_URL="https://router.nebutra.com/v1"
export OPENAI_API_KEY="$NEBUTRA_API_KEY"
codex
# same endpoint from the SDK
const r = await client.responses.create({
model: "gpt-5-codex",
input: "ping",
});curl -s https://router.nebutra.com/v1/images/generations \
-H "Authorization: Bearer $NEBUTRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"a lighthouse at dusk","size":"1024x1024"}'Each key defaults to 10 requests per second. Beyond that it returns 429 with x-ratelimit-limit / x-ratelimit-remaining / x-ratelimit-reset and retry-after.
A key can also carry a total and a daily quota; the daily quota resets at midnight UTC. Hitting it returns 402 key_quota_exceeded; an empty balance returns 402 insufficient_balance. Call GET https://router.nebutra.com/v1/limits with the same key for the values in force.
| Method | Path | Description |
|---|---|---|
| GET | https://router.nebutra.com/v1/models | Public model list |
| POST | https://router.nebutra.com/v1/chat/completions | Chat completions (streaming or not) |
| POST | https://router.nebutra.com/v1/responses | Responses API (Codex, Agents SDK) |
| POST | https://router.nebutra.com/v1/messages | Anthropic Messages (Claude Code, Anthropic SDK, x-api-key) |
| POST | https://router.nebutra.com/v1/embeddings | Embeddings |
| POST | https://router.nebutra.com/v1/images/generations | Text to image (302.ai / OpenAI contract) |
| POST | https://router.nebutra.com/v1/images/edits | Image to image (multipart: image + prompt + model + size) |
| GET | https://router.nebutra.com/v1/limits | This key's rate limit and remaining quota |