Skip to content

OpenCode Setup

OpenCode is an open-source terminal AI coding tool. This guide shows how to configure it to use Claudexia as the API provider.

Config file location

OSPath
Linux / macOS~/.config/opencode/opencode.jsonc
WindowsC:\Users\User\.config\opencode\opencode.jsonc

Provider setup

jsonc (opencode.jsonc)
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://api.claudexia.tech/v1",
        "apiKey": "YOUR-KEY"
      }
    }
  }
}

Verify

Start OpenCode to confirm it connects to Claudexia:

bash
opencode

If configured correctly, OpenCode will use Claude models through Claudexia.

Tips

  • The config file supports JSONC (JSON with comments).
  • Set the anthropic provider — OpenCode routes requests through the configured base URL.
  • All Claudexia models are available. Check the Models page for supported IDs.