Official npm package @routerbrain/sdk for Node.js / TypeScript. It wraps the OpenAI-compatible HTTP APIs described in the gateway reference.

When to use it

Good fitPoor fit
Node backends, workers, CLIBrowser with exposed keys
Built-in SSE streamingAnthropic-only apps (use Anthropic SDK + base URL)
Files + model listEmbeddings via SDK (use raw HTTP)

vs raw HTTP / OpenAI SDK

┌──────────────────┐     ┌─────────────────────┐
│ @routerbrain/sdk │     │ OpenAI SDK          │
│ chat / files /   │     │ baseURL → gateway   │
│ models           │     │                     │
└────────┬─────────┘     └──────────┬──────────┘
         └──────────┬───────────────┘
                    ▼
         https://51kik.com/v1
  • Official SDK: better for RouterBrain-specific options (PDF plugin, headers).
  • OpenAI SDK: change baseURL + apiKey for most chat migrations (From OpenAI).

Surface

APIHTTP
client.chat.sendPOST /chat/completions
client.files.*/files
client.models.listGET /models
client.chat.messages (Node)Path/PDF helpers

Next

InstallationInitializationChat and streaming