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 LiteLLM

Python SDK call, or config.yaml for the proxy

  1. modelopenai/zai/glm-5.3-flash
  2. api_basehttps://api.minirouter.sh/v1
  3. api_keymr-live-… (your key)Use your full key. Placeholders will not authenticate.
config.yaml for the proxy
model_list:
  - model_name: glm-5.3-flash
    litellm_params:
      model: openai/zai/glm-5.3-flash
      api_base: https://api.minirouter.sh/v1
      api_key: os.environ/MINIROUTER_API_KEY
Full LiteLLM 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.

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

Models and errors

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