OpenCode
The official OpenCode docs provide the full reference. This page covers only the key steps to connect it to Global AI.1
Install OpenCode
Install with npm:
Install OpenCode
2
Set the provider base URL
Edit
~/.config/opencode/opencode.json (create it if missing):~/.config/opencode/opencode.json
~ is your home directory. On Windows this is C:\Users\<your username>.3
Set the API key
Edit
~/.local/share/opencode/auth.json and replace anthropic.key with your sk- key. We recommend creating a key in the claude code group at /keys:~/.local/share/opencode/auth.json
4
Choose a model and start
Open a terminal and run
opencode. Type /models, pick an Anthropic model such as claude-sonnet-4-5, and start chatting.UI configuration
If you prefer not to edit files by hand, open OpenCode’s graphical settings, switch the provider to Anthropic, set Base URL tohttps://globalai.vip/v1, and set API Key to your token. Return to the main screen and pick your target model from the model selector.
Troubleshooting
Anthropic missing from the OpenCode model list
Anthropic missing from the OpenCode model list
Check that
opencode.json is at the correct path and that auth.json has a valid anthropic.key. Restart OpenCode after changes.