Answer: Point Claude Code at Console by setting the ANTHROPIC_BASE_URL to "https://opencode.ai/inference/anthropic" and ANTHROPIC_AUTH_TOKEN to your personal API key ("oc_sk_..."), then run claude with a model. You can also set these variables in ~/.claude/settings.json to use Console in every session. Status: Confirmed Entry: tool/opencode/install-and-setup/claude-code-environment-variables Revision: 3 Digest: sha256:447058776aeba0a9 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:57:01Z Last changed: 2026-11-19T13:36:06Z (Go base URL: — → https://opencode.ai/inference/go/anthropic) Last verified: 2026-11-20T13:46:16Z Next check: 2026-11-21T13:46:16Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of base URL variable | ANTHROPIC_BASE_URL | [1] | 2026-11-20 base URL | https://opencode.ai/inference/anthropic | [1] | 2026-11-20 auth token variable | ANTHROPIC_AUTH_TOKEN | [1] | 2026-11-20 auth token placeholder | oc_sk_... | [1] | 2026-11-20 settings file | ~/.claude/settings.json | [1] | 2026-11-20 Go base URL | https://opencode.ai/inference/go/anthropic | [1] | 2026-11-20 Sources: [1] opencode. "Claude Code | OpenCode". https://opencode.ai/docs/console/harnesses/claude-code/ Role: primary. Accessed: 2026-11-20T13:46:16Z Quote: "export ANTHROPIC_BASE_URL= "https://opencode.ai/inference/anthropic"" (Supports: base URL variable, base URL) Quote: "export ANTHROPIC_AUTH_TOKEN= "oc_sk_..."" (Supports: auth token variable) Quote: "Replace oc_sk_... with a personal API key ." (Supports: auth token placeholder) Quote: "Set the variables in ~/.claude/settings.json to use Console in every session." (Supports: settings file) Quote: ""ANTHROPIC_BASE_URL" : "https://opencode.ai/inference/go/anthropic"" (Supports: Go base URL) Snapshot SHA-256: bceabd41b4350f1e8b5be6ed32bab03417739d27e895a6e4d7b590861ee95032 (captured 2026-11-19T13:36:05Z) 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:06Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:46:16Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:46:16Z Last attempt: 2026-11-20T13:46:16Z Notes and limitations: Extracted automatically from a single official source (section "Claude Code"). Related: https://latestn.com/tool/opencode/install-and-setup/configure-api-key How do I configure the OpenCode API key for Pi? https://latestn.com/tool/opencode/install-and-setup/connect-console-provider How do I set up opencode Console as a provider and connect my API key? https://latestn.com/tool/opencode/install-and-setup/connect-provider-and-select-model How do I connect a provider and select a model in opencode? https://latestn.com/tool/opencode/features/use-web-search How do opencode members use web search in a prompt? https://latestn.com/tool/opencode/features/warming-interval-timing How often does opencode send warming requests and when does it stop? https://latestn.com/tool/opencode/install-and-setup/authenticate-opencode-for-acp How do I authenticate opencode before using it from an ACP client? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:36:06Z | changed | Go base URL: — → https://opencode.ai/inference/go/anthropic | [1] 2026-11-19T13:36:06Z | changed | settings file: — → ~/.claude/settings.json | [1] 2026-11-19T13:36:06Z | changed | auth token placeholder: — → oc_sk_... | [1] 2026-11-19T13:36:06Z | changed | auth token variable: — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-19T13:36:06Z | changed | base URL: — → https://opencode.ai/inference/anthropic | [1] 2026-11-19T13:36:06Z | changed | base URL variable: — → ANTHROPIC_BASE_URL | [1] 2026-11-19T13:36:06Z | changed | Token note: ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-19T13:36:06Z | changed | Settings file: ~/.claude/settings.json → — | [1] 2026-11-19T13:36:06Z | changed | Auth token placeholder: oc_sk_... → — | [1] 2026-11-19T13:36:06Z | changed | Auth token variable: ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-19T13:36:06Z | changed | Base URL: https://opencode.ai/inference/anthropic → — | [1] 2026-11-19T13:36:06Z | changed | Base URL variable: ANTHROPIC_BASE_URL → — | [1] 2026-11-18T13:39:28Z | changed | Token note: — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-18T13:39:28Z | changed | Settings file: — → ~/.claude/settings.json | [1] 2026-11-18T13:39:28Z | changed | Auth token placeholder: — → oc_sk_... | [1] 2026-11-18T13:39:28Z | changed | Auth token variable: — → ANTHROPIC_AUTH_TOKEN | [1] 2026-11-18T13:39:28Z | changed | Base URL: — → https://opencode.ai/inference/anthropic | [1] 2026-11-18T13:39:28Z | changed | Base URL variable: — → ANTHROPIC_BASE_URL | [1] 2026-11-18T13:39:28Z | changed | Go base URL: https://opencode.ai/inference/go/anthropic → — | [1] 2026-11-18T13:39:28Z | changed | settings file: ~/.claude/settings.json → — | [1] 2026-11-18T13:39:28Z | changed | auth token placeholder: oc_sk_... → — | [1] 2026-11-18T13:39:28Z | changed | auth token variable: ANTHROPIC_AUTH_TOKEN → — | [1] 2026-11-18T13:39:28Z | changed | base URL: https://opencode.ai/inference/anthropic → — | [1] 2026-11-18T13:39:28Z | changed | base URL variable: ANTHROPIC_BASE_URL → — | [1] 2026-11-13T03:57:01Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/install-and-setup/claude-code-environment-variables/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/install-and-setup/claude-code-environment-variables POST: https://latestn.com/dispute/tool/opencode/install-and-setup/claude-code-environment-variables with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/install-and-setup/claude-code-environment-variables?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I point Claude Code at OpenCode Console using environment variables? Revision 3, last verified 2026-11-20T13:46:16Z. https://latestn.com/tool/opencode/install-and-setup/claude-code-environment-variables (accessed 2026-11-21T09:53:19Z). @misc{LatestN_tool_opencode_install_and_setup_claude_code_environment_variables_r3, title = {How do I point Claude Code at OpenCode Console using environment variables?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/install-and-setup/claude-code-environment-variables}}, note = {Revision 3; digest sha256:447058776aeba0a9; last verified 2026-11-20T13:46:16Z; accessed 2026-11-21T09:53:19Z} } 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/install-and-setup/claude-code-environment-variables