Google (Gemini) with Empryo
Google Gemini is built into Empryo. Save one API key and you can use any Gemini model your account can access, from the Pro models to the cheaper, faster Flash models, in any task-router slot. Flash models are a good fit for high-volume jobs like context compaction and read-only research.
- How you connect
- API key
- How you pay
- Gemini API prices, with low-cost Flash models
What you get
Example models
- Gemini 3.1 Pro (gemini-3.1-pro-preview)
- Gemini 3.1 Flash Lite (gemini-3.1-flash-lite)
- Gemini 3 Flash (gemini-3-flash-preview)
- Gemini 2.5 Pro (gemini-2.5-pro)
- Gemini 2.5 Flash (gemini-2.5-flash)
- Gemini 2.0 Flash (gemini-2.0-flash)
When to use it
Pick Gemini when a large context window and low cost per token matter most. Gemini Flash models suit the high-volume jobs in Empryo's task router: context compaction, read-only research (spark), short symbol summaries for the Genome, Empryo's map of your repo (semantic), and web search. Gemini Pro models are strong general-purpose models. A cost-effective setup is mixed: your preferred coding model on ember (the slot that edits files) and Gemini Flash on the rest.
Set it up
1. Get an API keyLink to this section
Create a key at aistudio.google.com. Empryo talks to the Gemini API directly at generativelanguage.googleapis.com. You do not need a Vertex AI / Google Cloud project.
2. Save the keyLink to this section
empryo --set-key google AIza...The key is stored in your OS keychain when one is available (macOS Login Keychain, Linux libsecret, Windows DPAPI), with a file fallback otherwise. Confirm it was saved:
empryo --list-providersOr pass it via environment variableLink to this section
Empryo reads Google's standard env var name. Useful for CI or one-off sessions, nothing is persisted:
GOOGLE_GENERATIVE_AI_API_KEY=AIza... empryoLookup order is env → keychain → file by default. Flip it with "keyPriority": "app" in config if an exported shell key keeps overriding your stored one.
3. Pick a modelLink to this section
Inside Empryo, press Ctrl+L to open the model picker and choose any Gemini model. Empryo live-fetches your available models from the Gemini API once the key is set, so you always see exactly what your account can call. To list them from the shell:
empryo --list-models googleModel IDs are namespaced google/<model>, for example google/gemini-2.5-flash or google/gemini-3.1-pro-preview.
4. (Recommended) Route Gemini per taskLink to this section
Gemini Flash is a cheap, fast choice for background slots in Empryo's task router. Edit ~/.empryo/config.json (or run /router):
{
"taskRouter": {
"spark": "google/gemini-2.5-flash",
"ember": "anthropic/claude-sonnet-4-5",
"compact": "google/gemini-2.5-flash",
"semantic":"google/gemini-2.5-flash"
}
}Or make Gemini the active model everywhere:
{ "defaultModel": "google/gemini-3.1-pro-preview" }Thinking / reasoningLink to this section
Empryo maps its thinking config to Gemini's native reasoning controls automatically: Gemini 2.5 models use a thinking *budget*, while Gemini 3.x models use a thinking *level*. Set "thinking": { "mode": "adaptive" } (or "enabled" with a budget) in config and Empryo applies the right knob per model.
Keys or subscriptions
Google (Gemini) connects the way marked below. You can mix ways across task-router slots.
- API keyGoogle (Gemini)Paste a key once. Empryo keeps it in your system keychain, and you pay the provider for what you use.
- Sign inApprove Empryo in your browser and use a plan or credits you already have. There is no key to copy.
- On your machineRun open models on your own computer. No key, no per-token bill, and nothing has to leave your machine.
- Any compatible APIOne block of JSON config turns any OpenAI-compatible endpoint into a provider, including your own server.