If your application already uses OpenAI-style chat-completions calls, the lowest-friction way to test another routing layer is to keep the client code familiar and change only the base URL, API key, and model id.
RouterBase is designed for that kind of experiment. It exposes an OpenAI-compatible endpoint at https://routerbase.com/v1
, so existing SDK setup can stay close to what developers already know.
ROUTERBASE_API_KEY=your_routerbase_key
ROUTERBASE_BASE_URL=https://routerbase.com/v1
ROUTERBASE_MODEL=google/gemini-2.5-flash
Keeping the model in configuration makes it easier to compare providers later without editing the application path that calls the model.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.ROUTERBASE_API_KEY,
baseURL: process.env.ROUTERBASE_BASE_URL || "https://routerbase.com/v1"
});
const completion = await client.chat.completions.create({
model: process.env.ROUTERBASE_MODEL || "google/gemini-2.5-flash",
messages: [
{
role: "user",
content: "Write a one-paragraph changelog entry for a developer tool."
}
]
});
console.log(completion.choices[0]?.message?.content);
Before using the setup in a production workflow, run a short checklist: