Opencode
Add ZoneToken as a provider in Opencode using an OpenAI-compatible configuration.
Configure
Edit the file ~/.config/opencode/opencode.json:
json
{
"provider": {
"9router": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.zonetoken.net/v1",
"apiKey": "<apiKey>"
},
"models": {
"claude-sonnet-4.8": {
"name": "claude-sonnet-4.8"
},
"claude-sonnet-4.7": {
"name": "claude-sonnet-4.7"
},
"gpt-5.5": {
"name": "gpt-5.5"
}
}
}
}
}Replace the placeholder
Set apiKey to your real ZoneToken API key in place of <apiKey>.
Verify
Restart Opencode and select one of the models defined above (for example gpt-5.5). Requests will be sent to https://api.zonetoken.net/v1.
