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
Install the RedPill plugin (OpenCode 1.18.24 or newer), restart OpenCode, then sign in and pick a model in its TUI. Omit--global for a project installation.
provider.redpill block. REDPILL_AI_API_KEY supplies the key for one process.
This plugin verifies ACI inside OpenCode: attestation and every response receipt are checked
automatically, and /redpill-attestation, /redpill-receipts, /redpill-receipt, and
/redpill-session show the evidence.
Check the connection
Run/models and confirm a redpill/ model is selected, then run one bounded tool task.