Setup

Client setup drafts

Literal configuration references for common clients. None has passed the recorded-fixture compatibility suite yet.

Two values

Base URLhttps://api.minirouter.sh/v1
Get a keyhttps://minirouter.sh/key

Keys begin with mr-live-. Never append /chat/completions to the base URL; the client adds it.

Verify the key first
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.

OpenAI SDK
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);
Anthropic SDK
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);
Cohere SDK
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)
Vercel AI SDK
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 sidebar → ⚙ Settings → API Configuration

Draft field map for Cline

  1. API ProviderOpenAI Compatible
  2. Base URLhttps://api.minirouter.sh/v1

    The bare host also works. Never append /chat/completions.

  3. API Keymr-live-… (your key)
  4. Model IDmeta/llama-3.3-70b

    Any id from /models works here.

Verify outside Cline first — one request, literal values
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 sidebar → ⚙ Settings → Providers

Draft field map for Roo Code

  1. API ProviderOpenAI Compatible
  2. Base URLhttps://api.minirouter.sh/v1

    The bare host also works. Never append /chat/completions.

  3. API Keymr-live-… (your key)
  4. Modelmistral/devstral-small-2

    Roo's per-mode model setting accepts any catalog id.

Verify outside Roo Code first — one request, literal values
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 sidebar → ⚙ Settings → Providers

Draft field map for Kilo Code

  1. API ProviderOpenAI Compatible
  2. Base URLhttps://api.minirouter.sh/v1

    The bare host also works. Never append /chat/completions.

  3. API Keymr-live-… (your key)
  4. Modelmeta/llama-3.3-70b
Verify outside Kilo first — one request, literal values
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.json — project root, or ~/.config/opencode/opencode.json

Draft field map for OpenCode

  1. Config fileopencode.json

    Use the draft block below as a starting point, then verify it against the installed version.

  2. Environmentexport MINIROUTER_KEY=mr-live-…

    The config reads the key from this env var.

  3. Pick a model/models → minirouter

    Inside OpenCode, /models lists the provider's models.

opencode.json — unverified draft
{
  "$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/config.yaml (or the gear icon → Configure)

Draft field map for Continue

  1. provideropenai

    Continue's generic OpenAI-compatible provider.

  2. apiBasehttps://api.minirouter.sh/v1

    Never append /chat/completions.

  3. apiKeymr-live-… (your key)
  4. modelmeta/llama-3.3-70b
config.yaml — unverified draft
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

  1. APIChat Completion
  2. Chat Completion SourceCustom (OpenAI-compatible)
  3. 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.

  4. Custom API Keymr-live-… (your key)
  5. Model IDmeta/llama-3.3-70b

    Press Connect first — the model list populates from our catalog.

Verify outside SillyTavern first — one request, literal values
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.