mantismantis
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

  1. Sign in at aistudio.google.com with a Google account
  2. Open the API keys page, click 'Create API key'
  3. Create in a new or existing Google Cloud project
  4. Copy the key and set GEMINI_API_KEY

Create a key ↗ · Pricing ↗

Free tier with rate limits; paid tier unlocks higher quotas.

Enable

export GEMINI_API_KEY=...        # shell profile — survives forever

or in the terminal — validates the key live before saving:

/enable gemini

or 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-pro
  • gemini-2.5-flash
  • gemini-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_KEY works too (alias).
  • AI Studio keys have a free quota on flash models — a zero-cost way to try mantis on a hosted model.