Point an OpenAI-direct app at RouterBrain by changing Base URL, API key, and model ids.
Steps
1. Gateway URL and key
- Base URL:
https://51kik.com/v1(Base URL and environments) - Key: from console (API keys)
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
- Non-stream chat (First request)
- Streaming (Streaming request)
- Tools / files if used
Watchouts
| Topic | Notes |
|---|---|
| Catalog | GET /models without key; OpenRouter-like shape |
| Content parts | Use input_file, not legacy file |
| Extensions | pdf_preprocess, extra_body |
| Speech / embeddings | Use /audio/speech, /embeddings reference pages on this site |