generateContent API, so the resource you point it at needs a Google Gemini (or Vertex AI) provider attached. See AI Gateway Overview if you haven’t set that up yet.
You’ll need the resource’s URL (its <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:~/.gemini/.env - the file Gemini CLI loads automatically on every run, regardless of which directory you start it from. To skip the prompts:
Manual setup
Write~/.gemini/.env:
.env first (in the current directory or a parent, up to .git or your home directory) before falling back to ~/.gemini/.env, so a project-level file with the same two lines overrides this for just that project.
Or, for a one-off shell session instead of a permanent file:
GEMINI_API_KEY in place and set it to none. Gemini CLI won’t start without it set to something.
