Setup
Client setup drafts
Literal configuration references for common clients. None has passed the recorded-fixture compatibility suite yet.
Two values
Keys begin with mr-live-. Never append /chat/completions to the base URL; the client adds it.
curl https://api.minirouter.sh/v1/chat/completions \
-H "Authorization: Bearer $MINIROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meta/llama-3.3-70b","messages":[{"role":"user","content":"ping"}]}'SDK examples
Server-side examples for the four supported client shapes. Keep the base URL exactly as shown and select a model whose catalog page lists the endpoint you call.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.MINIROUTER_KEY,
baseURL: "https://api.minirouter.sh/v1",
});
const result = await client.chat.completions.create({
model: "meta/llama-3.3-70b",
messages: [{ role: "user", content: "ping" }],
});
console.log(result.choices[0]?.message.content);import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.MINIROUTER_KEY,
baseURL: "https://api.minirouter.sh",
});
const result = await client.messages.create({
model: "meta/llama-3.3-70b",
max_tokens: 256,
messages: [{ role: "user", content: "ping" }],
});
console.log(result.content);import os
import cohere
client = cohere.ClientV2(
api_key=os.environ["MINIROUTER_KEY"],
base_url="https://api.minirouter.sh",
)
result = client.rerank(
model="cohere/rerank-v3.5",
query="Which document is about London?",
documents=["London is in the UK.", "Paris is in France."],
)
print(result.results)import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const minirouter = createOpenAICompatible({
name: "minirouter",
apiKey: process.env.MINIROUTER_KEY,
baseURL: "https://api.minirouter.sh/v1",
});
const { text } = await generateText({
model: minirouter("meta/llama-3.3-70b"),
prompt: "ping",
});
console.log(text);Cline
Full guide →Cline sidebar → ⚙ Settings → API Configuration
Draft field map for Cline
- API ProviderOpenAI Compatible
- Base URLhttps://api.minirouter.sh/v1
The bare host also works. Never append /chat/completions.
- API Keymr-live-… (your key)
- Model IDmeta/llama-3.3-70b
Any id from /models works here.
curl https://api.minirouter.sh/v1/chat/completions \
-H "Authorization: Bearer $MINIROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meta/llama-3.3-70b","messages":[{"role":"user","content":"ping"}]}'Roo Code
Full guide →Roo Code sidebar → ⚙ Settings → Providers
Draft field map for Roo Code
- API ProviderOpenAI Compatible
- Base URLhttps://api.minirouter.sh/v1
The bare host also works. Never append /chat/completions.
- API Keymr-live-… (your key)
- Modelmistral/devstral-small-2
Roo's per-mode model setting accepts any catalog id.
curl https://api.minirouter.sh/v1/chat/completions \
-H "Authorization: Bearer $MINIROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meta/llama-3.3-70b","messages":[{"role":"user","content":"ping"}]}'Kilo Code
Full guide →Kilo Code sidebar → ⚙ Settings → Providers
Draft field map for Kilo Code
- API ProviderOpenAI Compatible
- Base URLhttps://api.minirouter.sh/v1
The bare host also works. Never append /chat/completions.
- API Keymr-live-… (your key)
- Modelmeta/llama-3.3-70b
curl https://api.minirouter.sh/v1/chat/completions \
-H "Authorization: Bearer $MINIROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meta/llama-3.3-70b","messages":[{"role":"user","content":"ping"}]}'OpenCode
Full guide →opencode.json — project root, or ~/.config/opencode/opencode.json
Draft field map for OpenCode
- Config fileopencode.json
Use the draft block below as a starting point, then verify it against the installed version.
- Environmentexport MINIROUTER_KEY=mr-live-…
The config reads the key from this env var.
- Pick a model/models → minirouter
Inside OpenCode, /models lists the provider's models.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"minirouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "minirouter",
"options": {
"baseURL": "https://api.minirouter.sh/v1",
"apiKey": "{env:MINIROUTER_KEY}"
},
"models": {
"meta/llama-3.3-70b": { "name": "Llama 3.3 70B" },
"mistral/devstral-small-2": { "name": "Devstral Small 2" },
"deepseek/deepseek-v3": { "name": "DeepSeek V3" },
"meta/llama-4-maverick": { "name": "Llama 4 Maverick" }
}
}
}
}Continue
Full guide →~/.continue/config.yaml (or the gear icon → Configure)
Draft field map for Continue
- provideropenai
Continue's generic OpenAI-compatible provider.
- apiBasehttps://api.minirouter.sh/v1
Never append /chat/completions.
- apiKeymr-live-… (your key)
- modelmeta/llama-3.3-70b
models:
- name: Llama 3.3 70B (minirouter)
provider: openai
model: meta/llama-3.3-70b
apiBase: https://api.minirouter.sh/v1
apiKey: mr-live-YOUR-KEY-HERE
roles: [chat, edit, apply]
- name: Devstral Small 2 (minirouter)
provider: openai
model: mistral/devstral-small-2
apiBase: https://api.minirouter.sh/v1
apiKey: mr-live-YOUR-KEY-HERE
roles: [chat, edit, apply, autocomplete]SillyTavern
Full guide →API Connections (the plug icon)
Draft field map for SillyTavern
- APIChat Completion
- Chat Completion SourceCustom (OpenAI-compatible)
- Custom Endpoint (Base URL)https://api.minirouter.sh/v1
If models fail to load, try adding /v1. Do NOT add a /chat/completions suffix — SillyTavern appends that path itself.
- Custom API Keymr-live-… (your key)
- Model IDmeta/llama-3.3-70b
Press Connect first — the model list populates from our catalog.
curl https://api.minirouter.sh/v1/chat/completions \
-H "Authorization: Bearer $MINIROUTER_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"meta/llama-3.3-70b","messages":[{"role":"user","content":"ping"}]}'Anything else
Aider, Zed, and other OpenAI-compatible clients may accept the same base URL and Bearer key. Confirm the current fields in the client before relying on it. Model ids are author/name from the catalog. Errors: /docs/errors.