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 Hermes Agent

~/.hermes/config.yaml, with the key in ~/.hermes/.env

  1. hermes modelCustom endpoint (self-hosted / VLLM / etc.)
  2. model.base_urlhttps://api.minirouter.sh/v1
  3. model.providercustom
  4. model.defaultzai/glm-5.3-flash
  5. model.key_envMINIROUTER_KEY
  6. MINIROUTER_KEYmr-live-… (your key)Use your full key. Placeholders will not authenticate.
~/.hermes/config.yaml
model:
  provider: custom
  base_url: https://api.minirouter.sh/v1
  default: zai/glm-5.3-flash
  key_env: MINIROUTER_KEY
Full Hermes Agent 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.

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)

Models and errors

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