With Private AI Proxy
- Install Private AI Proxy, sign in, and turn on Protected.
- On the Agents screen, connect OpenCode.
- Restart OpenCode.
opencode.json with an agent-scoped token for its local API, and
restores the file when you disconnect or stop Protected.
From the CLI, the same connection is:
Without the Proxy
Export your RedPill API key, then add a custom provider toopencode.json in your project:
opencode.json
/models, and select the RedPill model. The key is read from the process
environment. For another model, use its ID and limits from the model catalog.
This path does not verify ACI locally. For confidential-only routing, use an is_tee: true model
with "baseURL": "https://tee.redpill.ai/v1". See Verify a response.
Check the connection
Run/models and confirm a redpill/ model is selected, then run one bounded tool task.