Tool Setup
Configure OpenCode
OpenCode can use GetToken through an OpenAI-compatible provider configuration.
OpenCode can connect to GetToken through an OpenAI-compatible provider.
Config file
macOS / Linux:
text
~/.config/opencode/opencode.json
Windows:
text
%APPDATA%\opencode\opencode.json
Example
json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"openai": {
"npm": "@ai-sdk/openai-compatible",
"name": "OpenAI",
"options": {
"baseURL": "https://api.clawto.link",
"apiKey": "<your GetToken API Key>"
},
"models": {
"gpt-5.5": {
"name": "GPT-5.5",
"limit": {
"context": 1000000,
"output": 128000
},
"options": {
"store": false
}
}
}
}
}
}
Common mistakes
- The field is
baseURL, notbase_url. - Do not add extra spaces to the API Key.
- JSON files cannot contain comments.
Screenshot placeholder: OpenCode configuration file.