Introduction
OpenCode is an open-source AI programming assistant supporting 75+ models and local deployment. With Mixroute Api, you can use various mainstream and latest models (GPT, Claude, Gemini, etc.) in OpenCode with custom provider and model configuration. Download: https://opencode.ai/Quick Configuration
1. Get API Key
Create and copy your API key from Mixroute Api Console.2. Configure Custom Provider in OpenCode
Fill Configuration
- Provider ID: e.g.,
mixroute(lowercase, numbers, hyphens or underscores) - Display Name: e.g.,
Mixroute Api - Base URL:
https://console.mixroute.io/v1(must end with/v1) - API Key: Paste your Mixroute Api key
3. Switch Models
Select configured provider and model in chat or settings (e.g.,mixroute/gpt-4o).
Models Requiring Responses API
Some models require Responses API instead of Chat Completions. If you see this error:The chatCompletion operation does not work with the specified model

"apiCompatibility": "responses" in your config file:


Configuration Success Example
Below is an example of normal conversation using Mixroute Api in OpenCode:
Recommended Models
| Type | Model ID | Notes |
|---|---|---|
| Coding | gpt-5.1-codex | Requires Responses API |
| General | gpt-5.2, gpt-5.1-chat | Standard config |
| Long text | claude-sonnet-4-20250514 | Standard config |
| Cost-effective | gpt-4.1-mini, gemini-2.5-flash | Standard config |

