Integrations
opencode
Point opencode at Token Harbor manually — Base URL, API key, and exact steps. One key, every model, no CLI required.
opencode + Token Harbor
The open-source terminal agent. Route it through Token Harbor to use every model with a single key.
Get a thk_… key from /dashboard/api-keys (a free account works), then:
opencode reads ~/.config/opencode/opencode.json. Add a provider:
{
"provider": {
"tokenharbor": {
"npm": "@ai-sdk/openai-compatible",
"options": { "baseURL": "https://tokenharbor.ai/v1", "apiKey": "{env:TOKENHARBOR_API_KEY}" },
"models": { "th-orchestra": { "name": "Token Harbor" } }
}
}
}
Set TOKENHARBOR_API_KEY=YOUR_thk_KEY in your environment. This keeps the
secret out of opencode.json.
Run opencode and pick the Token Harbor model with /models.
Prefer one command? The tokenharbor CLI configures opencode
automatically (and can undo it).