Admin
Back to marketQuick use
OverviewUsageAPI KeysWalletDocs

Integration

One key, one baseURL. OpenAI, Anthropic and Responses protocols share one entry point.

baseURL

https://router.nebutra.com/v1

Sample model

gpt-5.6-luna
TypeScript · openai SDK
import 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
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"}]}'
TypeScript · @anthropic-ai/sdk
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
# 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
# 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",
});
Image generation
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"}'

Limits

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.

MethodPathDescription
GEThttps://router.nebutra.com/v1/modelsPublic model list
POSThttps://router.nebutra.com/v1/chat/completionsChat completions (streaming or not)
POSThttps://router.nebutra.com/v1/responsesResponses API (Codex, Agents SDK)
POSThttps://router.nebutra.com/v1/messagesAnthropic Messages (Claude Code, Anthropic SDK, x-api-key)
POSThttps://router.nebutra.com/v1/embeddingsEmbeddings
POSThttps://router.nebutra.com/v1/images/generationsText to image (302.ai / OpenAI contract)
POSThttps://router.nebutra.com/v1/images/editsImage to image (multipart: image + prompt + model + size)
GEThttps://router.nebutra.com/v1/limitsThis key's rate limit and remaining quota