generateContent protocol. SnapGen exposes that protocol at /v1beta/models/{model}:generateContent and accepts the current GPT text model IDs.
Install and verify
Configure SnapGen
GOOGLE_GEMINI_BASE_URL. Do not use GEMINI_BASE_URL; Gemini CLI does not read that variable.
If your shell already has Google credentials, remove the conflicting values for this session:
Send a request
gemini without --prompt to enter interactive mode.
Persist the variables
Add the two exports to your shell profile or a local.env file that is excluded from version control.
Gemini CLI’s native request format was verified against SnapGen with
gpt-5.4-mini. The gateway translates the request; the model is not a Google
Gemini model despite the client protocol.Troubleshooting
Gemini CLI says both GOOGLE_API_KEY and GEMINI_API_KEY are set
Gemini CLI says both GOOGLE_API_KEY and GEMINI_API_KEY are set
Run
unset GOOGLE_API_KEY before starting the CLI. Gemini CLI otherwise
prefers GOOGLE_API_KEY, which may send the wrong credential to SnapGen.Requests still go to Google's API
Requests still go to Google's API
Check that the variable name is exactly
GOOGLE_GEMINI_BASE_URL and the
value is https://api.snapgen.org without /v1 or /v1beta.The model is rejected
The model is rejected
Use an ID returned by
GET /v1/models. Do not
use a Gemini model name unless it is present in the SnapGen catalog.