Answer: Open Account from the account menu in the Console, then under Personal API keys click Add API key, choose the workspace, name the key, and click Create. Copy the key, since it is shown only once. Status: Confirmed Entry: tool/opencode/account-and-plans/console-harness-api-key Revision: 3 Digest: sha256:92a0e66edbb517a3 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:56:57Z Last changed: 2026-11-19T13:36:00Z (alternative for shared machines: — → service account key) Last verified: 2026-11-20T13:46:13Z Next check: 2026-11-21T13:46:13Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of key type | personal API key | [1] | 2026-11-20 menu location | Account | [1] | 2026-11-20 action | Add API key | [1] | 2026-11-20 key display | shown only once | [1] | 2026-11-20 key prefix example | oc_sk_1a2b3c4d5e6f_... | [1] | 2026-11-20 alternative for shared machines | service account key | [1] | 2026-11-20 Sources: [1] opencode. "Harnesses | OpenCode". https://opencode.ai/docs/console/harnesses/ Role: primary. Accessed: 2026-11-20T13:46:13Z Quote: "The quickest option is a personal API key , which calls models as you." (Supports: key type) Quote: "Open Account from the account menu in the Console ." (Supports: menu location) Quote: "Under Personal API keys , click Add API key ." (Supports: action) Quote: "Copy the key. It is shown only once." (Supports: key display) Quote: "oc_sk_1a2b3c4d5e6f_..." (Supports: key prefix example) Quote: "owners and admins can create a service account key instead" (Supports: alternative for shared machines) Snapshot SHA-256: 090e7d6afa3ad6e2b61631cfd515897ce8548daac346b45e513d1907a98e0fe7 (captured 2026-11-19T13:36:02Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-19T13:36:00Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:46:13Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:46:13Z Last attempt: 2026-11-20T13:46:13Z Notes and limitations: Extracted automatically from a single official source (section "Get an API key"). Related: https://latestn.com/tool/opencode/account-and-plans/create-workspace How do I create a new workspace in OpenCode Console? https://latestn.com/tool/opencode/account-and-plans/manage-provider-accounts How do I manage multiple saved provider accounts in opencode? https://latestn.com/tool/opencode/account-and-plans/personal-vs-service-account-keys What is the difference between an opencode personal API key and a service account key? https://latestn.com/tool/kiro/troubleshooting/wecom-troubleshooting How do I troubleshoot issues with the Kiro Crew WeCom interface? https://latestn.com/tool/opencode/account-and-plans/add-payment-method How do I add a payment method to opencode Console billing? https://latestn.com/tool/opencode/account-and-plans/chatgpt-plan-sign-in How do I use a ChatGPT Plus or Pro plan instead of an OpenAI API key in opencode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:36:00Z | changed | alternative for shared machines: — → service account key | [1] 2026-11-19T13:36:00Z | changed | key prefix example: — → oc_sk_1a2b3c4d5e6f_... | [1] 2026-11-19T13:36:00Z | changed | key display: — → shown only once | [1] 2026-11-19T13:36:00Z | changed | action: — → Add API key | [1] 2026-11-19T13:36:00Z | changed | menu location: — → Account | [1] 2026-11-19T13:36:00Z | changed | key type: — → personal API key | [1] 2026-11-19T13:36:00Z | changed | Alternative for shared machines or CI: service account key → — | [1] 2026-11-19T13:36:00Z | changed | Key format example: oc_sk_1a2b3c4d5e6f_... → — | [1] 2026-11-19T13:36:00Z | changed | Key visibility: It is shown only once. → — | [1] 2026-11-19T13:36:00Z | changed | Steps: Open Account from the account menu in the Console . Under Personal API keys , click Add API key . Choose the workspace, name the key, and click Create . Copy the key. → — | [1] 2026-11-19T13:36:00Z | changed | Key type: personal API key → — | [1] 2026-11-18T13:39:23Z | changed | Alternative for shared machines or CI: — → service account key | [1] 2026-11-18T13:39:23Z | changed | Key format example: — → oc_sk_1a2b3c4d5e6f_... | [1] 2026-11-18T13:39:23Z | changed | Key visibility: — → It is shown only once. | [1] 2026-11-18T13:39:23Z | changed | Steps: — → Open Account from the account menu in the Console . Under Personal API keys , click Add API key . Choose the workspace, name the key, and click Create . Copy the key. | [1] 2026-11-18T13:39:23Z | changed | Key type: — → personal API key | [1] 2026-11-18T13:39:23Z | changed | alternative for shared machines or CI: service account key → — | [1] 2026-11-18T13:39:23Z | changed | key prefix example: oc_sk_1a2b3c4d5e6f_... → — | [1] 2026-11-18T13:39:23Z | changed | key visibility: only once → — | [1] 2026-11-18T13:39:23Z | changed | action: Add API key → — | [1] 2026-11-18T13:39:23Z | changed | menu location: Account → — | [1] 2026-11-18T13:39:23Z | changed | key type: personal API key → — | [1] 2026-11-13T03:56:57Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/account-and-plans/console-harness-api-key/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/account-and-plans/console-harness-api-key POST: https://latestn.com/dispute/tool/opencode/account-and-plans/console-harness-api-key with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/account-and-plans/console-harness-api-key?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I get an API key for opencode Console harnesses? Revision 3, last verified 2026-11-20T13:46:13Z. https://latestn.com/tool/opencode/account-and-plans/console-harness-api-key (accessed 2026-11-21T09:56:46Z). @misc{LatestN_tool_opencode_account_and_plans_console_harness_api_key_r3, title = {How do I get an API key for opencode Console harnesses?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/account-and-plans/console-harness-api-key}}, note = {Revision 3; digest sha256:92a0e66edbb517a3; last verified 2026-11-20T13:46:13Z; accessed 2026-11-21T09:56:46Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/account-and-plans/console-harness-api-key