Install
openclaw skills install @zenlee123/routerbase-api-integrationIntegrate applications with RouterBase, the OpenAI-compatible model gateway at https://routerbase.com/v1. Use when migrating OpenAI SDK calls to RouterBase, configuring RouterBase API keys, implementing chat completions, streaming, tool calling, JSON mode, vision inputs, request validation, error handling, or documenting RouterBase setup for Python, JavaScript, curl, LangChain, LlamaIndex, Vercel AI SDK, Cursor, Continue, or other OpenAI-compatible clients.
openclaw skills install @zenlee123/routerbase-api-integrationUse routerbase as an OpenAI-compatible gateway for GPT, Claude, Gemini, and other supported models. This skill helps agents migrate existing OpenAI-compatible code, keep API keys server-side, and produce concise, testable RouterBase integration snippets.
Read references/routerbase-api.md when exact endpoint details, headers, or examples are needed.
ROUTERBASE_API_KEY in server-side environment configuration.https://routerbase.com/v1, then swap the model to a RouterBase model ID.import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ROUTERBASE_API_KEY"],
base_url="https://routerbase.com/v1",
)
response = client.chat.completions.create(
model="google/gemini-2.5-flash",
messages=[{"role": "user", "content": "Write one sentence about model routing."}],
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTERBASE_API_KEY,
baseURL: "https://routerbase.com/v1",
});
const response = await client.chat.completions.create({
model: "google/gemini-2.5-flash",
messages: [{ role: "user", content: "Write one sentence about model routing." }],
});
console.log(response.choices[0].message.content);
curl -X POST https://routerbase.com/v1/chat/completions \
-H "Authorization: Bearer $ROUTERBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [{"role": "user", "content": "What is 2+2?"}]
}'
sk-rb-... only in docs.stream: true and process Server-Sent Events or SDK stream chunks.tools and response_format.text and image_url.ROUTERBASE_API_KEY should be configured.