Integrations
pi
Point pi at Token Harbor manually — Base URL, API key, and exact steps. One key, every model, no CLI required.
pi + Token Harbor
The open-source BYOK coding 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:
pi reads ~/.pi/agent/models.json. Add a provider. Command-backed secret
resolution works across both the older @mariozechner releases and current
@earendil-works releases:
{
"providers": {
"tokenharbor": {
"name": "Token Harbor",
"baseUrl": "https://tokenharbor.ai/v1",
"api": "openai-completions",
"apiKey": "!node -e \"const k=process.env.TOKENHARBOR_API_KEY;if(!k)process.exit(1);process.stdout.write(k)\"",
"models": [{
"id": "th-orchestra", "name": "TH Orchestra",
"reasoning": true, "input": ["text", "image"],
"contextWindow": 200000, "maxTokens": 8192,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}]
}
}
}
Export TOKENHARBOR_API_KEY=YOUR_thk_KEY, start pi, and choose the model with
/model.
Prefer one command? The tokenharbor CLI configures pi
automatically (and can undo it).