OpenCode · Go

How an agent gets a OpenCode · Go key through KeyKeeper, what to choose on opencode.ai, and how KeyKeeper verifies it.

Template idopencode-go
Fieldopencode-api-key → OPENCODE_API_KEY · secret
Key looks likewhether it can be viewed again is unconfirmed
Created atopencode.ai
Verified by KeyKeepernot verified
Template checked2026-09-15

What the agent does

keykeeper providers show opencode-go
keykeeper save --provider opencode-go --from-clipboard --create --purpose "what this task does"
keykeeper run -c opencode-go -- <your command>

--provider opencode-go fills in the credential id and the field. The environment variable is the one OpenCode's own tools read, so nothing has to be mapped.

What only you can do

登录 OpenCode Console
订阅 Go 并添加账单信息
复制 Go API key
Copy the key, then approve the save in KeyKeeper's window.

What to choose

Go 是订阅套餐,Console 是按量产品;官方未确认两者的 key 可互换,因此必须按不可互换处理并分别保存。Go 未公开按 key 权限范围。

The agent is told the same thing. It opens the page for you and says what to pick; it never logs in, passes 2FA or pays on your behalf.

What KeyKeeper checks

  • Before writing: the value must look like a OpenCode · Go key (whether it can be viewed again is unconfirmed). A wrong paste is refused before anything is stored, and the agent is told why — without the value.
  • After saving: OpenCode · Go offers no read-only endpoint KeyKeeper can use, so the first real call is the test.

Endpoints

The key is a bearer token for these endpoints. keykeeper run sets only the variables above; point your client at the base URL yourself.

  • OpenAI Responses / Chat Completions — https://opencode.ai/zen/go/v1
  • Anthropic Messages — https://opencode.ai/zen/go/v1

Rotation and expiry

未确认统一有效期;以创建页面显示的实际日期为准,未知时不要猜测。 Rotate or revoke at opencode.ai.