Point an OpenAI-direct app at RouterBrain by changing Base URL, API key, and model ids.

Steps

1. Gateway URL and key

2. Update the client

OpenAI SDK

const openai = new OpenAI({
  apiKey: process.env.ROUTERBRAIN_API_KEY,
  baseURL: process.env.ROUTERBRAIN_BASE_URL, // https://51kik.com/v1
});

curl

Replace https://api.openai.com/v1 with https://51kik.com/v1.

3. Map models

Replace OpenAI names (gpt-4o, …) with catalog id values:

curl -sS "https://51kik.com/v1/models" | jq '.data[].id'

4. Verify

  1. Non-stream chat (First request)
  2. Streaming (Streaming request)
  3. Tools / files if used

Watchouts

TopicNotes
CatalogGET /models without key; OpenRouter-like shape
Content partsUse input_file, not legacy file
Extensionspdf_preprocess, extra_body
Speech / embeddingsUse /audio/speech, /embeddings reference pages on this site

OpenAI compatibility.

Related

Create chat completion · SDK overview