MuiRouter

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-xxxxxxxx

2. 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
/models
Why list the models by hand?
opencode does not call a provider's /v1/models endpoint.
Model lists for opencode's built-in providers come from models.dev, an open-source model database; custom providers must declare theirs in config. We are working on getting MuiRouter listed on models.dev — once it lands you will only need MUIROUTER_API_KEY and the models will show up on their own, making this snippet unnecessary.

Related