Use ISH API with OpenCode
OpenCode should use the OpenAI-compatible ISH endpoint:https://api.ish.chat/v1. API usage requires purchased credits and is billed at 1x actual tokens.
1. Create an API key
Go to API keys, create a key, and copy it once. Keys start withish_live_.
2. Add the provider
Put this in your global OpenCode config at~/.config/opencode/opencode.json or in a project-level opencode.json. Theish/... model names are accepted by ISH and mapped to the canonical Rootnull ids.
{
"$schema": "https://opencode.ai/config.json",
"model": "ish/claude-sonnet-4.6",
"small_model": "ish/claude-haiku-4.5",
"provider": {
"ish": {
"npm": "@ai-sdk/openai-compatible",
"name": "ISH API",
"options": {
"baseURL": "https://api.ish.chat/v1"
},
"models": {
"claude-haiku-4.5": {
"name": "Claude Haiku 4.5",
"limit": {
"context": 200000,
"output": 8192
}
},
"claude-sonnet-4.6": {
"name": "Claude Sonnet 4.6",
"limit": {
"context": 200000,
"output": 8192
}
},
"claude-opus-4.8": {
"name": "Claude Opus 4.8",
"limit": {
"context": 200000,
"output": 8192
}
}
}
}
}
}3. Add your key
If you use OpenCode auth storage, add the key under the same provider id. You can also export OpenAI-style environment variables before starting OpenCode.
{
"ish": {
"type": "api",
"key": "ish_live_..."
}
}4. Restart and verify
Quit OpenCode fully, start it again, then check the model picker. Streaming may take a few seconds before the first token depending on upstream model latency.
opencode
# Inside OpenCode:
/models
# Select:
ish/claude-sonnet-4.6
# Then send a small prompt:
Reply exactly: ISH_OKTroubleshooting
No response: make sure the provider id in auth storage matchesish, then restart OpenCode.
Unsupported model: use ish/claude-sonnet-4.6 or the canonical id claude-sonnet-4.6.
401 error: the key is missing, revoked, or copied with extra spaces.
Insufficient credits: API calls only spend purchased credits, not daily/free credits.