Setup guide

Connect your client.

Choose your client, add your key and base URL, then test the connection.

Copy the two values

Every OpenAI-compatible client takes the same base URL and adds /chat/completions itself.

Base URLhttps://api.minirouter.sh/v1
API keyGet a key →Starts with mr-live-

Configure Zed

settings.json (zed: open settings file) → language_models

  1. language_models → openai_compatibleminirouter
  2. api_urlhttps://api.minirouter.sh/v1
  3. API Keymr-live-… (your key)Use your full key. Placeholders will not authenticate.
settings.json
{
  "language_models": {
    "openai_compatible": {
      "minirouter": {
        "api_url": "https://api.minirouter.sh/v1",
        "available_models": [
          {
            "name": "zai/glm-5.3-flash",
            "display_name": "GLM 5.3 Flash (minirouter)",
            "max_tokens": 1000000
          },
          {
            "name": "openai/gpt-5.6-sol",
            "display_name": "GPT 5.6 Sol (minirouter)",
            "max_tokens": 1050000
          },
          {
            "name": "spacexai/grok-4.6",
            "display_name": "Grok 4.6 (minirouter)",
            "max_tokens": 500000
          }
        ]
      }
    }
  }
}
Full Zed guide →

Check the connection

Run this after saving. A reply confirms the base URL, key, and model together.

Terminal
# bash / zsh: enter the full key at the hidden prompt
printf 'MiniRouter API key: '
read -rs MINIROUTER_KEY
export MINIROUTER_KEY
printf '\n'
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

Calling from code instead? The base URL stays the same.

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);

Models and errors

Model IDs are author/name from the model catalog. Failed requests are explained in the error reference.