How to use OpenCode Go subscription from Claude Code?

To run Claude Code using alternative models (such as MiniMax or Qwen models available through OpenCode’s API service), you need to set up a local proxy like LiteLLM. Claude Code natively expects an Anthropic-compatible API. Medium Article

The workflow relies on this architecture:
Claude CodeLiteLLM Proxy (localhost)OpenCode Go APITarget Models. Medium Article

  1. Get your API Key: Sign up for an OpenCode Go subscription and generate an API key.
  2. Install a Proxy: Install LiteLLM , which allows you to translate API calls into formats understood by both Claude Code and OpenCode.
  3. Configure the Environment: Set your ANTHROPIC_BASE_URL to your local LiteLLM proxy and pass your OpenCode API key to ANTHROPIC_API_KEY in your environment.
  4. Run Claude Code: Launch your terminal session and direct Claude Code to your local proxy. Insta Post , Medium Article , 3 , 4