opencode
Using MuiRouter with opencode
opencode is an AI coding agent for your terminal. Point it at MuiRouter and one key gets you Claude, GPT, Gemini, Grok, Kimi and MiMo — pay per token, no separate account per vendor.
1. Get an API key
Create a key on the API Keys page in your dashboard, then put it in your environment.
export MUIROUTER_API_KEY=sk-gw-xxxxxxxx2. Add the provider config
Custom providers in opencode need an explicit model list. Add this to your config file:
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"muirouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "MuiRouter",
"options": {
"baseURL": "https://api.muirouter.com/v1",
"apiKey": "{env:MUIROUTER_API_KEY}"
},
"models": {
"claude-opus-5": {},
"gpt-5.6": {},
"gemini-3-flash": {},
"kimi-k3": {}
}
}
}
}Only a few popular models are listed here — append more in the same shape. The full catalog and prices are on the pricing page
3. Start it and pick a model
Restart opencode and run /models to see the MuiRouter models.
opencode
/modelsWhy list the models by hand?
opencode does not call a provider's /v1/models endpoint.