OpenCode connects to Concentrate through its OpenAI-compatible provider. Model capabilities vary, so choose a model that supports the tools and inputs your workflow needs.
Reasons to Use Concentrate with OpenCode
Reasons to Use Concentrate with OpenCode
- One API key — Use one Concentrate key instead of managing separate provider accounts in OpenCode.
- More model choice — Select from the models available in your Concentrate catalog.
- Switch models in a session — Open
/modelsto choose anotherconcentrate/model. - Spend controls — Manage usage with Concentrate keys and budgets.
- Usage analytics — Review requests, models, tokens, and costs in your dashboard.
Quick Start
View prerequisites (before you begin)
View prerequisites (before you begin)
1
Create a Concentrate API key
Create a key at concentrate.ai/api-keys. Make sure the account has credits available.
2
Install OpenCode
Follow the official installation guide. Verify the CLI is available:
- macOS / Linux / WSL
- Windows PowerShell
curl and python3.CONCENTRATE_API_KEY. It asks whether to make Concentrate your default provider. Choose No to keep your current default.
Verify Installation
After the setup script finishes:- Run
opencode modelsin a terminal and look forconcentrate/models. - Launch
opencodeand open/models. - Select a
concentrate/model and send a short prompt. A successful reply confirms the connection.
Manual Setup
If you prefer to configure OpenCode yourself or the automated script does not work in your environment:1
Add the Concentrate provider
Add this provider to Replace the placeholders with a current model ID and name. Keep any unrelated settings already in your config.
~/.config/opencode/opencode.json or your existing global OpenCode config:This example uses OpenCode v1 config syntax, which OpenCode v2 still accepts. For native v2 syntax, see OpenCode’s custom provider guide.
2
Provide your API key
Set
CONCENTRATE_API_KEY in your environment, or launch OpenCode, run /connect, choose Other, and enter concentrate as the provider ID before entering your key.3
Verify the connection
Run
opencode models, select a concentrate/ model with /models, and send a short prompt.Remove Concentrate AI
- macOS / Linux / WSL
- Windows PowerShell
concentrate provider, any concentrate/ default models, and the key stored in OpenCode. It leaves CONCENTRATE_API_KEY in your environment because other Concentrate integrations may use it.
Use Different Models
Open/models inside OpenCode to choose another Concentrate model, or start OpenCode with a model ID:
opencode models to see available IDs. Model availability and capabilities change over time; check the models page when choosing one for coding tasks.
How It Works
The setup script addsconcentrate as a custom OpenCode provider with https://api.concentrate.ai/v1 as its base URL. It loads models from Concentrate’s live catalog and stores your key in OpenCode’s user auth file. On macOS and Linux, the auth file is normally ~/.local/share/opencode/auth.json with file mode 600.
The script backs up existing config and auth files before writing. If your global config is JSONC, setup asks before rewriting it as JSON; the backup retains its comments and formatting. Uninstall asks before rewriting a JSONC config too.
Billing and usage are managed through your Concentrate credits. You can review requests and spend in the Concentrate dashboard.
Troubleshooting
Concentrate models are missing
Concentrate models are missing
- Run
opencode modelsand look for IDs beginning withconcentrate/. - Confirm your global OpenCode config has a
concentrateprovider. - Re-run the setup script to refresh the model catalog. If you use JSONC, approve the rewrite after reviewing the backup warning.
API key is missing or invalid
API key is missing or invalid
Check that the key entered during setup is the one shown at concentrate.ai/api-keys. If you configured OpenCode manually, confirm
CONCENTRATE_API_KEY is set or connect the concentrate provider through /connect. A 402 response means the key’s account needs credits.Requests cannot connect
Requests cannot connect
Confirm the provider base URL is
https://api.concentrate.ai/v1, then check your internet connection and firewall. Try another model in /models to see whether the issue is specific to one model.JSONC comments changed
JSONC comments changed
The setup and uninstall scripts can rewrite
opencode.jsonc as JSON. They ask first and save a timestamped backup next to the original file. Restore comments or formatting from that backup if you need them.Next Steps
API Reference
Explore the Concentrate API.
Available Models
Browse the model catalog.
Auto Routing
Learn about model selection and routing.
Get Support
Contact our support team.

