Configure OpenHands
Settings → LLM → Advanced, /settings in the CLI, or LLM_* environment variables
- Custom Modelopenai/zai/glm-5.3-flash
- Base URLhttps://api.minirouter.sh/v1
- API Keymr-live-… (your key)Use your full key. Placeholders will not authenticate.
export LLM_MODEL=openai/zai/glm-5.3-flash
export LLM_BASE_URL=https://api.minirouter.sh/v1
export LLM_API_KEY=mr-live-YOUR-KEY-HERE
openhands --override-with-envsCheck the connection
Run this after saving. A reply confirms the base URL, key, and model together.
# 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.
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.