RouterBrain is a managed inference gateway. Your backend calls our HTTP APIs; we route to upstream models, enforce tenant policy, and record usage.

Protocol surfaces

SurfaceBase URLTypical clients
OpenAI-compatiblehttps://51kik.com/v1OpenAI SDK, LangChain, most agent frameworks
Anthropic-compatiblehttps://51kik.com/anthropicAnthropic SDK, Claude Code

Use one surface per integration path. Model IDs are shared: take id from List models as model on either surface.

HTTP APIs

OpenAI-compatible API

CapabilityMethod / path
ChatPOST /chat/completions
EmbeddingsPOST /embeddings
FilesPOST/GET/DELETE /files, GET /files/:id/content
SpeechPOST /audio/speech
Model catalogGET /models (no API key)

Anthropic-compatible API

CapabilityMethod / path
MessagesPOST /messages
Model catalogGET /models

Where the model and route support it, both chat surfaces support streaming, tools / function calling, and multimodal user content (text, images, files). Embeddings, files, and speech are OpenAI-compatible only.

Gateway extensions (OpenAI chat)

FieldDescription
pdf_preprocessPDF handling: native / ocr / markdown
extra_bodyJSON merged into upstream body (OpenAI-compatible routes)
stream_options.include_usageGateway always includes usage on streams (Streaming)

Optional headers (both surfaces)

HeaderPurpose
x-trace-idYour correlation id (usage + support)
x-user-idEnd-user id in your product
x-agent-nameAgent or service name

Pricing, quotas, and keys are managed in the console.

Suggested path: First requestCreate chat completionErrors