OpenCode
Set up OpenCode with GetVibe API through ~/.config/opencode/opencode.json: an OpenAI-compatible provider with baseURL getvibeapi.com/v1.
OpenCode is an npm package for agentic coding in the terminal. Providers are configured in ~/.config/opencode/opencode.json.
Ready-made config with every model
OpenCode does not read context sizes from /v1/models: a model you add by hand shows a context of 0 and history is not compacted in time. Instead of typing the numbers in, download the generated config — it is built from our catalog: every published model with its name, context, output limit and image / reasoning / tool flags. It contains no key, only the {env:GETVIBE_API_KEY} reference.
# macOS / Linux — a fresh config with every model and its context
mkdir -p ~/.config/opencode
curl -fsSL https://getvibeapi.com/api/integrations/opencode.json -o ~/.config/opencode/opencode.json# Windows PowerShell
New-Item -ItemType Directory -Force "$HOME\.config\opencode" | Out-Null
Invoke-WebRequest https://getvibeapi.com/api/integrations/opencode.json -OutFile "$HOME\.config\opencode\opencode.json"If your opencode.json is already customised, do not overwrite it — replace only the provider block and keep the rest:
# Already have an opencode.json — replace only the provider block (needs jq)
cd ~/.config/opencode && cp opencode.json opencode.json.bak
curl -fsSL https://getvibeapi.com/api/integrations/opencode.json -o provider.json
jq --slurpfile pv provider.json '.provider = ((.provider // {}) + $pv[0].provider)' opencode.json.bak > opencode.json# Only the models you need (comma-separated IDs); ?variants=1 adds pinned channels too
curl -fsSL "https://getvibeapi.com/api/integrations/opencode.json?models=claude-opus-5.5,openai/gpt-6.1-sol"opencode.json by hand
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"getvibe": {
"npm": "@ai-sdk/openai-compatible",
"name": "GetVibe",
"options": {
"baseURL": "https://getvibeapi.com/v1",
"apiKey": "{env:GETVIBE_API_KEY}"
},
"models": {
"gpt-6.1-sol": {
"name": "GPT-6.1 Sol",
"attachment": true,
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
}
},
"claude-opus-5.5": {
"name": "Claude Opus 5.5",
"attachment": true,
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
}
},
"deepseek-v4.1-flash": {
"name": "DeepSeek V4.1 Flash",
"attachment": true,
"modalities": {
"input": [
"text",
"image"
],
"output": [
"text"
]
}
},
"kimi-k3.1-pro": {
"name": "Kimi K3.1 Pro",
"attachment": false,
"modalities": {
"input": [
"text"
],
"output": [
"text"
]
}
}
}
}
},
"model": "getvibe/gpt-6.1-sol"
}Set GETVIBE_API_KEY before starting OpenCode and start it from the same window: export GETVIBE_API_KEY="sk-pv-…" (macOS/Linux) or setx GETVIBE_API_KEY "sk-pv-…" and a new PowerShell window (Windows). Without the variable OpenCode sends an empty key and gets a 401 “invalid API key”. Prefer no variable? Put the key itself in place of {env:GETVIBE_API_KEY} in the apiKey field.
models, list only the public model IDs you need. The full list is in the catalog. For normal use, write the bare name without a :suffix: a suffix pins one channel and disables automatic switching to a healthy one."attachment": true. OpenCode takes model capabilities from the models.dev registry, which does not list GetVibe, so a model declared as an empty {} is treated as accepting no attachments and OpenCode sends the request without the image. The model then truthfully says it cannot see one, even though it has vision. Add attachment and modalities for every model the catalog shows with image input. We checked the other published integrations too: Cline, Cursor, Roo Code, Kilo Code, Aider, and Continue have no separate model-capability map in their examples, so this OpenCode-only setting is not missing from those configs.