Skip to main content
OpenCode speaks Chat Completions. Private AI Proxy configures it automatically.

With Private AI Proxy

  1. Install Private AI Proxy, sign in, and turn on Protected.
  2. On the Agents screen, connect OpenCode.
  3. Restart OpenCode.
The app writes the provider into 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.
OpenCode keeps the plugin configuration and key in its own stores; do not add a separate 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.

Troubleshooting

References