<endpoint>) and its API key (<key>). Both are on the resource’s Keys page.
Public vs. private resourcesWherever these instructions show
<key>, what you put there depends on the resource type:- Public resource - reachable from anywhere, so the gateway checks a virtual API key. Copy it from the resource URL after login, the Resource Launcher more-info panel, or
https://app.pangolin.net/<org-id>/keys(use your self-hosted dashboard URL in place ofapp.pangolin.netif you self-host). - Private resource - only reachable from devices connected to your Pangolin network, so no key is checked. You must have the Pangolin client installed and connected. Use the literal string
noneas the key.
Fastest: Pangolin CLI
Install the Pangolin CLI if you don’t have it, then log in:anthropic,openai, but you can enter any comma-separated list OpenCode recognizes (e.g. openrouter,google). It fetches a key for you if needed and writes opencode.json and auth.json. To skip the org/resource prompts:
Manual setup
Merge this into your globalopencode.json (~/.config/opencode/opencode.json, or $XDG_CONFIG_HOME/opencode/opencode.json if set):
auth.json (~/.local/share/opencode/auth.json, or $XDG_DATA_HOME/opencode/auth.json if set):
openrouter, google, groq, etc.) at this gateway, add a matching block under provider in opencode.json and a matching key in auth.json.
