You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an active OpenCode Go subscription, but I cannot authenticate it successfully in the OpenCode CLI.
The CLI accepts the OpenCode Go login and reports “Connected to OpenCode Go”, but any actual request returns:
“Error: Invalid API key.”
I have completely removed all locally stored OpenCode Go and OpenCode Console credentials and started again from scratch.
The problem is that I cannot find any option in the OpenCode Console to generate or retrieve a new OpenCode Go API key. I only have some older API keys in my notes, and none of them works.
For example, testing:
opencode run -m opencode-go/qwen3.8-max "Respond simply: OK"
always returns:
Error: Invalid API key.
Could you please tell me exactly where I can retrieve or regenerate the API key associated with my OpenCode Go subscription?
I would prefer not to keep trying old credentials, since none of them works.
Also, if you get an error when using Chinese AI models, go to Settings → Privacy in the same console (https://opencode.ai/console) and set the region to Global.
I also recommend enabling “Allow paid endpoints that train on request data” if you plan to use models such as Muse Spark Contribution.
Thanks for the report! Closing as a duplicate of #50885, which has the answer: #50885 (comment)
In short: in OpenCode 2.0, run /connect, choose opencode, and pick the workspace that has Go when signing in. Then select a model marked as Go. To use an API key instead, create one under a service account in the console and add it with /connect → opencode go.
If this still fails on 2.0, please open a new issue with your version.
Activity
github-actions commentedon Sep 25, 2026
This issue might be a duplicate of existing issues. Please check:
Voolan commentedon Sep 27, 2026
@claudio9112
Also, if you get an error when using Chinese AI models, go to Settings → Privacy in the same console (https://opencode.ai/console) and set the region to Global.
I also recommend enabling “Allow paid endpoints that train on request data” if you plan to use models such as Muse Spark Contribution.
Tarquinen commentedon Oct 20, 2026
Thanks for the report! Closing as a duplicate of #50885, which has the answer: #50885 (comment)
In short: in OpenCode 2.0, run
/connect, chooseopencode, and pick the workspace that has Go when signing in. Then select a model marked as Go. To use an API key instead, create one under a service account in the console and add it with/connect→opencode go.If this still fails on 2.0, please open a new issue with your version.
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊