OpenCode setup
Set up OpenCode with opencode.json/opencode.jsonc using your API key and base URL.
Use API Keys -> Use key and copy the OpenCode example for your platform type.
Config path: ~/.config/opencode/opencode.json (or opencode.jsonc).
Create the file if it does not exist.
Minimal provider format
json
{
"provider": {
"openai": {
"options": {
"baseURL": "<BASE_URL>",
"apiKey": "<API_KEY>"
}
}
}
}Use the provider id that matches your client flow (for example openai/anthropic/google) as shown in Use key.
You can also configure API Key via OpenCode /connect flow if preferred.
If model/options differ in your dashboard snippet, use the dashboard snippet as final source of truth.