How It Works
OpenCode supports custom providers via the @ai-sdk/openai-compatible package.
By pointing it at June's API and providing your June API key, all requests are routed through June's infrastructure.
This gives you the same privacy and billing benefits you're used to from June, within a coding agent of your choice.
Setup
Inside OpenCode, run /connect and enter june as the provider name, followed by your June API key.
Then edit ~/.config/opencode/opencode.jsonc to register the provider and the models you want to use:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"june": {
"npm": "@ai-sdk/openai-compatible",
"name": "June",
"options": {
"baseURL": "https://api.blockchain.info/ai/api/v1"
},
"models": {
"anthropic/claude-opus-latest": {
"name": "Claude Opus (Latest)"
},
"openai/gpt-latest": {
"name": "GPT (Latest)"
}
}
}
}
}
Model Selection
You can add any other models you want to use under the models object. See the models guide for the full list of supported models.