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
| OS | Path |
|---|---|
| Linux / macOS | ~/.config/opencode/opencode.jsonc |
| Windows | C:\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
opencodeIf 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.