providers
Gemini
Google's Gemini via the OpenAI-compatible surface of the Generative Language API. AI Studio keys come with a free quota.
| endpoint | https://generativelanguage.googleapis.com/v1beta/openai |
| env var | GEMINI_API_KEY (aliases: GOOGLE_API_KEY) |
| get a key | Google AI Studio |
Get an API key
- Sign in at aistudio.google.com with a Google account
- Open the API keys page, click 'Create API key'
- Create in a new or existing Google Cloud project
- Copy the key and set GEMINI_API_KEY
Free tier with rate limits; paid tier unlocks higher quotas.
Enable
export GEMINI_API_KEY=... # shell profile — survives foreveror in the terminal — validates the key live before saving:
/enable geminior pick any locked 🔒 Gemini model in /models and paste the key inline.
Models
Starter menu (once enabled, /models fetches the provider's full live list):
gemini-2.5-progemini-2.5-flashgemini-2.0-flash
Switch anytime — /model gemini-2.5 fuzzy-matches; context carries over.
SDK
from mantis_agent import MantisAgentOptions
options = MantisAgentOptions(
model="gemini-2.5-pro",
backend="https://generativelanguage.googleapis.com/v1beta/openai", # key read from $GEMINI_API_KEY
)Notes
GOOGLE_API_KEYworks too (alias).- AI Studio keys have a free quota on flash models — a zero-cost way to try mantis on a hosted model.