Option 2 · Manual setup
OpenCode
Configure OpenCode to use Claude models through APIKO
Overview
OpenCode is an open-source coding agent for the terminal. It supports custom providers through its opencode.json config, so APIKO's Claude models can be added with the Anthropic provider package.
Prerequisites
- An APIKO API Key from Console → API Keys
Step 1: Install OpenCode
bash
curl -fsSL https://opencode.ai/install | bashVerify installation:
bash
opencode --versionStep 2: Configure APIKO Provider
Save your key as APIKO_API_KEY in your shell environment, then edit or create ~/.config/opencode/opencode.json:
json
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"apiko": {
"npm": "@ai-sdk/anthropic",
"name": "APIKO",
"options": {
"baseURL": "https://api.apiko.app/v1",
"apiKey": "{env:APIKO_API_KEY}"
},
"models": {
"claude-sonnet-5-5": { "name": "Claude Sonnet 5.5" },
"claude-opus-5-5": { "name": "Claude Opus 5.5" }
}
}
},
"model": "apiko/claude-sonnet-5-5"
}Add any other Claude model from the list below under models, using its exact id.
Loading models… The full list of Claude model ids is also on the Claude API page.
Step 3: Verify Configuration
bash
opencodeRun /models in OpenCode and pick a model under APIKO, then send a short message. A 401 means APIKO_API_KEY is not set in the shell that started OpenCode.