Skip to main content
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.
  1. One API key — Use one Concentrate key instead of managing separate provider accounts in OpenCode.
  2. More model choice — Select from the models available in your Concentrate catalog.
  3. Switch models in a session — Open /models to choose another concentrate/ model.
  4. Spend controls — Manage usage with Concentrate keys and budgets.
  5. Usage analytics — Review requests, models, tokens, and costs in your dashboard.

Quick Start

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:
Run the setup command for your system:
This requires curl and python3.
The installer prompts for your API key, or offers to use an existing 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:
  1. Run opencode models in a terminal and look for concentrate/ models.
  2. Launch opencode and open /models.
  3. Select a concentrate/ model and send a short prompt. A successful reply confirms the connection.
Re-run the setup script whenever you want to refresh the models available in OpenCode.

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 ~/.config/opencode/opencode.json or your existing global OpenCode config:
Replace the placeholders with a current model ID and name. Keep any unrelated settings already in your 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

The uninstall script removes the 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:
You can also run 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 adds concentrate 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

  1. Run opencode models and look for IDs beginning with concentrate/.
  2. Confirm your global OpenCode config has a concentrate provider.
  3. Re-run the setup script to refresh the model catalog. If you use JSONC, approve the rewrite after reviewing the backup warning.
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.
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.
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.

Feedback

If you encounter issues or have suggestions, email support@concentrate.ai.
Last modified on October 9, 2026