OpenCode Zen API key or your own provider: what to pick and how to pay
Zen is a ready-made model catalog from the opencode team. A custom provider is your own key and your own endpoint. When to use which, and how to pay from Russia.
6 min · · агенты · API keys
You installed opencode, typed /connect, and saw Zen in the list. Next to it is "Other", where you can enter any endpoint. The question is whether you need a separate opencode zen api key or whether it is easier to connect a provider you already use. Below we cover how the two options differ, how each is set up, and what the payment situation looks like from Russia.
The third-party details (menus, commands, config format) were checked against the opencode.ai/docs documentation as of October 18, 2026. The project renames things from time to time, so if something does not match, trust the current documentation.
What OpenCode Zen is
Zen is a provider built into opencode itself. The project team put together a list of models they tested specifically as coding agents and sell access to them through their own gateway. You create an account on the opencode site, add credits, and get one key. You are charged per request as you use it.
In the latest documentation the same section is called "Console": it also holds workspace, member and monthly-limit settings. The name Zen still appears in the provider list. It is the same service.
The documented point of Zen is that you do not have to work out which model at which vendor behaves properly with an agent. You take a vetted set. That helps a newcomer, especially when it is unclear why the "same" model behaves differently at different intermediaries.
A few caveats to read before paying. In the Privacy section, some models have exceptions for data retention and for using requests to improve the models, and the "free for a limited time" models are marked separately. If you work with closed-source code, go through that list.
How to get an OpenCode Zen API key
According to the documentation:
- Run
/connectinside opencode. - Pick the opencode provider (the new documentation calls it pay-as-you-go).
- Open opencode.ai/auth, sign in, add billing details and copy the key.
- Paste the key into the terminal prompt.
- Run
/modelsto see the available models and choose one.
In config, Zen models are written as opencode/<model-id>, for example opencode/gpt-6.1-sol. Check the current model list and prices in the console itself. We do not quote them here because they change.
The same models can be called directly, without opencode, at the addresses in the Endpoints section of the docs, with the same console key. So you are not locked to one agent.
Your own provider: what it means in opencode
opencode does not confine you to Zen. The documentation says any LLM provider works as long as you have a key. For a service with an OpenAI-compatible API there are two steps:
/connect, scroll to Other, invent a provider id and paste the key. It is stored in~/.local/share/opencode/auth.json.- Describe the provider in
opencode.json: the@ai-sdk/openai-compatiblepackage (for/v1/chat/completions), abaseURLand a list of models.
For Zukko there is a second route, described in the opencode documentation: override baseURL on the built-in anthropic provider. For Claude this is the better one, because the Anthropic format lets the gateway see cache reads and writes, so Claude gets the cache price. In the OpenAI format (/v1/chat/completions) all Claude input is billed at the input price.
A config with Claude through anthropic and cheap models through an OpenAI-compatible provider in one file:
{
"$schema": "https://opencode.ai/config.json",
"model": "anthropic/claude-sonnet-5",
"provider": {
"anthropic": {
"options": {
"baseURL": "https://api.zukko.pro/v1",
"apiKey": "{env:ZUKKO_API_KEY}"
},
"models": {
"claude-sonnet-5": {},
"claude-opus-5-5": {}
}
},Note the /v1 in both addresses. For the anthropic provider in opencode, without it requests go to the wrong path and you get a 404. Create the fetch_... key on the API keys page and put it in the environment with a plain export ZUKKO_API_KEY=fetch_....
A comparison on the substance
| Zen | Your own provider (e.g. Zukko) | |
|---|---|---|
| What you get | A catalog vetted by the opencode team | Whatever models your provider serves |
| Where the key lives | opencode Console | Your provider's dashboard |
| How to connect | /connect and pick opencode | /connect → Other plus a block in opencode.json, or baseURL on a built-in provider |
| Works outside opencode | Yes, via the endpoints in the docs | Yes, it is a plain API |
| Limits | Monthly limit per workspace and member | Per-key daily and monthly limits in dollars, plus an allowed-models list |
| What to check | The model list and the Privacy exceptions | That the model in your config appears in GET /v1/models |
This is not a ranking. Zen is easier when you just want to pick from a ready list. A custom provider is easier when you already have a balance and keys, need more models, or want separate keys per project.
How to pay from Russia
This is the most common question behind "opencode оплата из россии", and the honest answer for Zen is that the service sets the payment terms. Which methods are available, whether your card works, and whether specific models have country restrictions is visible when you top up and in the Privacy section of the docs. We do not know the current terms and will not retell them.
What we do know about Zukko: access from Russia goes through a gateway, and you can pay by SBP (the Russian instant-payment system), with a MasterCard, or in crypto. The balance is in dollars, and top-ups start at $1. For SBP the payment page adds an 8.5% fee on top: to get $10 on the balance you pay, in rubles at the market rate at the time of payment, the equivalent of $10 × 1.085 = $10.85. MasterCard payments carry a fee of about 13%, with amounts from $2 to $594.
What it costs, by example
Zukko prices on October 18, 2026, $ per 1M tokens. Take an agent session of 2M fresh input tokens and 200K output tokens, ignoring cache.
claude-sonnet-5(0.4 input / 2 output): 2 × 0.4 + 0.2 × 2 = 0.8 + 0.4 = $1.20.deepseek-v4.1-flash(0.013 / 0.038): 2 × 0.013 + 0.2 × 0.038 = 0.026 + 0.0076 ≈ $0.034.
The real bill depends on cache and on how much the agent reads. Take current prices from GET https://api.zukko.pro/v1/models or the "Models" page in the dashboard. Which model handles your task, test on your own tasks: price and the strength index tell you where to start, but they do not replace a trial.
What to pick
If this is your first time with opencode and you do not want to deal with providers, start with Zen. If you already have a Zukko key and a balance, connect it through baseURL as above, and then opencode, Claude Code and your other tools spend one balance. You can keep both providers in one config and switch with /models.
To try the second option, create a key in the dashboard and follow the short guide in the quick start.
FAQ
Do I need a separate key for Zen if I already have another provider's key?
Yes. The Zen key comes from the opencode console and works only with its model catalog. Another provider's key is connected next to it as a separate provider block.
Can I use Zen and Zukko at the same time?
Yes. They are two independent providers in one opencode.json, each with its own balance. Switch models with /models, and set the default with the model field.
Why do I get a 404 when connecting Claude through Zukko?
Most often the anthropic provider's baseURL lacks /v1. For opencode the address must be https://api.zukko.pro/v1. This differs from Claude Code, where /v1 is not needed.
Where do I see the current Zukko models?
With GET https://api.zukko.pro/v1/models or on the "Models" page in the dashboard. Model names in your config must match what that list returns.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- opencode agents: setting up roles, models and toolsA custom agent in opencode is a role, a model and a set of permissions. A working config where a cheap model handles routine work and a stronger one edits code.
- OpenAI API Keys in the Open: Why You Should Not Use ThemWhere free keys on GitHub come from, why using them is dangerous for you and for the owner, and how to protect your own key from the same leak.
- GLM API Errors: Why the Request Fails and How to Fix ItA wrong model id, an overflowing 128K context, the key, the balance, limits: the typical causes of GLM API errors and a quick way to find yours.
- Plan mode in Claude Code: plan first, then edit the codeIn plan mode Claude Code reads your code and proposes a plan but edits nothing until you agree. How to enable it, use it and what it costs.