OpenCode
Open-source terminal coding agent, connectable to BeLive Studio via a custom OpenAI-compatible provider in opencode.json.
OpenCode is an open-source terminal coding agent with a responsive TUI, compatible with many model providers.
- Official site: https://opencode.ai
- GitHub: https://github.com/sst/opencode
Prerequisites
- OpenCode installed
- Base URL:
https://api.tokenhub.belivestudios.com - API Key: create one in "API Tokens" on the BeLive Studio Console
- Model name: exactly matching a model ID in the console model list
Edit the Config File
Edit ~/.config/opencode/opencode.json and add the BeLive Studio provider:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"belive-studios": {
"npm": "@ai-sdk/openai-compatible",
"name": "BeLive Studio",
"options": {
"baseURL": "https://api.tokenhub.belivestudios.com",
"apiKey": "{env:BELIVE_STUDIOS_API_KEY}"
},
"models": {
"gpt-5.6-sol": { "name": "GPT-5.6 Sol (BeLive Studio)" },
"claude-fable-5": { "name": "Claude Fable 5 (BeLive Studio)" }
}
}
}
}And set the environment variable:
export BELIVE_STUDIOS_API_KEY="sk-your-belive-studios-key"Start Using
cd /path/to/your/project
opencodeType /models and pick a model under BeLive Studio.
FAQ
Empty model list?
Check opencode.json syntax with a JSON validator, and make sure the env var referenced by apiKey is set.
401 errors? Verify the key is valid with no extra spaces; temporarily hard-code the key to rule out environment issues.