Skip to content

Go API key is not available in the new v2 Console #52227

Closed

Description

@ryanmeowy

Description

I have an active OpenCode Go subscription, and Go models work normally in OpenCode CLI.

However, I cannot find any way to create, view, or copy a Go API key in the new v2 Console.

The current Go documentation still says users can copy an API key and use Go with external coding agents such as Claude Code.

There should be a way to obtain a Go API key after subscribing.

Go subscription works in OpenCode CLI, but no Go API key is available in the v2 Console.

OpenCode version: 1.18.33

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Sep 30, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. inkovasy969-eng commented on Sep 30, 2026

    @inkovasy969-eng

    У меня та же проблема.

    Окружение:

    • ОС: Windows 10 (10.0.19044)
    • Версия OpenCode CLI: 1.18.32
    • Тариф: OpenCode Go ($10/месяц)

    Что происходит:

    1. В личном кабинете (https://opencode.ai/auth) я не вижу раздела для создания или копирования ключа Go API. Все создаваемые ключи начинаются с префикса oc_sk_ (Zen), а не sk- (Go).
    2. В CLI (~/.local/share/opencode/auth.json) сохранён ключ oc_sk_..., и opencode auth list показывает OpenCode Go api — 1 credentials.
    3. При отправке запроса сервер отвечает: Upstream request failed: Invalid credential
    4. В логах: providerID=opencode-go modelID=deepseek-v4-flash → stream error: AI_APICallError: Upstream request failed: Invalid credential
    5. Пробовала разные модели (DeepSeek, Kimi, GPT) — ошибка одинаковая.

    Подписка Go активна, но ключ API Go в консоли v2 недоступен. Подтверждаю проблему.

  3. kirubeltadesse commented on Oct 6, 2026

    @kirubeltadesse

    We would appreciate any update on this, @fwang!

  4. mobeenkk-ctrl commented on Oct 13, 2026

    @mobeenkk-ctrl

    Same problem here — active Go subscription, no Go API key available in the v2 Console.

    I purchased OpenCode Go, but the new v2 Console has no option to generate or retrieve my Go API key. I cannot find any way to view, copy, or create one.

    I need the key to connect DeepSeek Harness to Go. Go is reached via OPENCODE_API_KEY against https://opencode.ai/inference/go/v1, so without a retrievable key there is no way to authenticate.

    Environment: OpenCode CLI 1.4.3, macOS (Apple Silicon).

    How can I obtain my Go API key?

  5. lucasvidela94 commented on Oct 17, 2026

    @lucasvidela94

    Consolidating here from #56498, which is being closed in favour of this issue. Three things verified locally that I did not see on this thread, in case they help whoever picks up the fix.

    1. opencode-go declares no OAuth method at all. From the running server (opencode api get /api/integration):

    { "id": "opencode",    "methods": [ "key", "env", { "id": "device", "type": "oauth" } ] }
    { "id": "opencode-go", "methods": [ "key", "env" ] }

    So opencode auth login opencode — which the docs and the connect picker steer a Go subscriber toward — targets a different integration. Nothing in the CLI or the docs says the device flow does not apply to Go. A subscriber who only knows "I need Go" reads that dead end as a broken backend, which is likely why so many reports here conclude Go itself is broken.

    2. The backend is fine; the gap is purely onboarding. Once a key exists, both routes succeed:

    opencode auth login opencode-go --method key          # never touches the device endpoint
    POST /api/integration/opencode-go/connect/key  →  204
    

    and inference works immediately after:

    opencode run --model opencode-go/deepseek-v4.1-flash        → OK
    opencode run --model opencode-go/muse-spark-1.3-contributor → OK
    

    3. Where the key actually is. Confirmed against the v2 Console: Settings → your account name → Create. It is not the Keys tab, which mints oc_sk_ workspace keys — the confusion reported in #52243 and #51388. This matches what users found independently in a linux.do thread, where it took considerable hunting. The Go docs and the Console Go page both still say "copy your API key", which is the wording most likely worth updating.

    Also worth knowing when replacing a key: a stale expired credential could not be removed through the integration API, and both credentials sat in connections side by side with no indication of which was active. Filed as #56500. The device-code 429 without Retry-After — reproduced by the triage bot — is #56499.

  6. itonoz commented on Oct 17, 2026

    @itonoz

    Same problem, can't create API keys, there is no Keys tab in the console.

  7. ryanseddon commented on Oct 17, 2026

    @ryanseddon

    I found api key creation by clicking on user dropdown > account.

    My problem now is that I use the api key via tailscale apeture which keeps telling me api key has expired even though using the new key in the tailscale apeture chat works fine. Upgraded to latest opencode and still fails. Apeture is configured as a custom provider with no apiKey as the auth is done via being on my tailnet, this has worked fine until all keys were deleted due to the incident.

  8. onigetoc commented on Oct 18, 2026

    @onigetoc

    My guess, they will loose half on their subscription with this mess.

  9. juno-yu commented on Oct 18, 2026

    @juno-yu

    Old keys all become "Restricted | expired" with zero scope in settings->service accounts and cannot be enabled back , revoke not clickable / regenerate function not being there etc

    these breaking changes/migrations better be considered more carefully, or you intend to evict most of your users?

  10. xiaomozhang commented on Oct 20, 2026

    @xiaomozhang

    mee too~

  11. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    You can create a key for Go in the new console: open the account menu in the top right and go to Account → Personal API keys → Add API key, and use it with the Go endpoint (https://opencode.ai/zen/go/v1). Owners and admins can also create keys under Settings → Service accounts. Keys from the old console were imported as Legacy: <your email> service accounts limited to listing and calling models. If yours shows as expired, create a new personal key instead. Closing as this is now available. If it doesn't work for you, comment here or email help@anoma.ly.

  12. ryanseddon commented on Oct 21, 2026

    @ryanseddon

    @neriousy your docs say to use /inference/go/v1 is either fine or will zen/go eventually be deprecated?

  13. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    Correction to the earlier comment: https://opencode.ai/zen/go/v1 still works, but the canonical Go endpoints are now under /inference/go, split by protocol:

    Protocol Base URL
    OpenAI Chat Completions / Responses https://opencode.ai/inference/go/openai/v1
    Anthropic Messages https://opencode.ai/inference/go/anthropic/v1
    Google (Gemini) https://opencode.ai/inference/go/google/v1beta

    Model list and usage: GET https://opencode.ai/inference/go/v1/models and GET https://opencode.ai/inference/go/v1/usage.

    Each model is served over one protocol, and the Endpoints table shows which. Pick the base URL that matches the provider/SDK type your client uses (e.g. an OpenAI-compatible custom provider → .../inference/go/openai/v1).

    To your question:

    • /inference/go/v1 is fine for models and usage. Using it as a single base for generation (/inference/go/v1/chat/completions, /messages, /responses) currently works, but it's kept for compatibility, so prefer the protocol-specific bases above.
    • /zen/go/v1 is still supported and routes to the same backend. There's no removal date announced, but new setups should use /inference/go/....
  14. neriousy commented on Oct 21, 2026

    @neriousy
    Member

    @ryanseddon ^ here's a more detailed one - I think my previous anwser was a bit misleading, sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions