BlogHow to Use Concentrate AI in OpenCode (Step by Step)
How to use Concentrate AI in OpenCode: create an API key, connect it with opencode auth login or /connect, then pick Claude, GPT or DeepSeek in /models.
Concentrate.ai
BlogHow to use Concentrate AI in OpenCode: create an API key, connect it with opencode auth login or /connect, then pick Claude, GPT or DeepSeek in /models.
Concentrate.ai
To use Concentrate AI in OpenCode, create a Concentrate API key, run opencode auth login, search for Concentrate and paste your key. Then open OpenCode, type /models and pick any model labeled Concentrate. Concentrate is a built-in OpenCode provider through models.dev, the open source model database OpenCode uses for its provider list, so there is nothing to install and no config file to edit. The whole setup takes about a minute.
This guide walks through each step with screenshots from OpenCode 1.19.6. Want the backstory? Read Concentrate AI is now an official OpenCode provider.
![]()
Tip for teams: create one key per engineer and set a spend limit on each, so you can see what every person spends on coding agents.
opencode auth login.![]()
![]()
Prefer to stay inside OpenCode? Type /connect, search for Concentrate, press Enter and paste your key. Once it is connected, Concentrate shows a check mark in this list.
![]()
Prefer an environment variable? Add export CONCENTRATE_API_KEY="sk-cn-..." to your shell profile. OpenCode turns on the Concentrate provider when that variable is set.
opencode./models and press Enter.![]()
If the model supports reasoning effort, OpenCode asks which level to use. Pick Default, or choose low, medium, high, xhigh or max.
![]()
The prompt box now shows your model and Concentrate. Type a request and press Enter.
![]()
You can also start OpenCode with a model already chosen: opencode -m concentrate/claude-sonnet-5-5. To list every Concentrate model ID, run opencode models concentrate.
Send a short prompt, such as asking OpenCode to explain your project. Then open Logs in your Concentrate dashboard. Each OpenCode request appears there with its model, tokens and cost. A logged request confirms the connection works.
Add a model line to your OpenCode config at ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"model": "concentrate/claude-sonnet-5-5"
}
Keep any other settings already in the file. OpenCode now starts with that model every time.
| If you want | Try | OpenCode model ID |
|---|---|---|
| The strongest results on hard tasks | Claude Opus 5.5 | concentrate/claude-opus-5-5 |
| An everyday coding model | Claude Sonnet 5.5 | concentrate/claude-sonnet-5-5 |
| OpenAI's GPT-6.1 | GPT-6.1 Sol | concentrate/gpt-6.1-sol |
Compare context windows and live prices for every model on the Concentrate models page. Switching is as easy as typing /models again, so try a few on the same task.
Concentrate isn't in the provider list. OpenCode caches its list of providers from models.dev. Run opencode models --refresh, or update OpenCode, then run opencode auth login again.
Requests fail with an authentication error. Check that you pasted the full key, which starts with sk-cn, and that the key hasn't been deleted. Run opencode auth login again to replace it.
Requests fail with a billing error. Your account needs credits. Add them in Billing in your Concentrate dashboard.
I set up Concentrate earlier with the setup script. Nothing to change. The script and the built-in provider both use the provider ID concentrate. The OpenCode integration docs cover the script and manual setup.
Is Concentrate built into OpenCode?
Yes. Concentrate is listed in models.dev, which OpenCode uses for its provider list, so you can find it in opencode auth login and /connect without installing anything.
What is the Concentrate provider ID in OpenCode? The provider ID is concentrate, and model IDs look like concentrate/claude-sonnet-5-5.
Which environment variable does OpenCode use for Concentrate? CONCENTRATE_API_KEY. Set it in your shell and OpenCode uses Concentrate without running auth login.
How many Concentrate models are available in OpenCode?
More than 160 today, including Claude, GPT, Gemini, DeepSeek, GLM, Kimi and Qwen models. Run opencode models concentrate to see them all.
How much does it cost to use Concentrate in OpenCode? Concentrate charges no fees. You pay for tokens with no markup, no platform fee and no card fee. That is unlike OpenRouter, which adds a 5.5% platform fee on its Standard plan, Vercel AI Gateway, which charges credit card fees on credit purchases, and even OpenCode Zen, which adds 4.6% + $0.31 to every credit purchase. See the full fee comparison.
Can I control what my team spends in OpenCode? Yes. Give each engineer a Concentrate key with a spend limit and review every request in Logs. Read how teams track coding agent spend by employee.
Does this work with Claude Code too? Yes, with a different setup. Follow the Claude Code AI gateway setup guide.
LLM Gateway
Change models, providers, add fallbacks, and more by running all AI usage through one platform.
| A fast, low-cost open model | DeepSeek V4.1 Flash | concentrate/deepseek-v4-1-flash |
| An open model tuned for code | Kimi K2.7 Code | concentrate/kimi-k2-7-code |