Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt

Use this file to discover all available pages before exploring further.

Google Gemini API is Mirobody’s alternative global-cluster LLM backend, provided by Google AI Studio. Multimodal native (image, audio, video).
China cluster note: The Gemini API endpoint (generativelanguage.googleapis.com) is not available in mainland China. On CN, use DashScope or Volcengine Ark.

1. Register and get a key

1

Sign in to AI Studio

Open aistudio.google.com and sign in with a Google account.
2

Create an API key

On the API Keys page, create a key (bound to a GCP project).
3

Confirm billing

Use the free tier or enable billing on the GCP project for higher quotas.

2. Endpoint info

FieldValue
Native Gemini base URLhttps://generativelanguage.googleapis.com/v1beta
OpenAI-compatible base URLhttps://generativelanguage.googleapis.com/v1beta/openai
AuthAuthorization: Bearer <GEMINI_API_KEY>
RegionGlobal; some models unavailable in EU / IN

3. Available models

Gemini 3 series

Model idNotes
gemini-3.1-proFlagship — deep reasoning + agentic coding (Preview)
gemini-3.5-flashCurrent workhorse — agentic + coding (Stable)
gemini-3-flashFrontier performance + reduced cost (Preview)
gemini-3.1-flash-liteBudget tier

Gemini 2.5 series (stable fallback)

Model idNotes
gemini-2.5-proComplex deep reasoning
gemini-2.5-flashBest price/perf for low-latency reasoning
gemini-2.5-flash-liteBudget multimodal

Embeddings

Model idUse case
gemini-embedding-001Text embedding (Stable)
gemini-embedding-2-previewMultimodal embedding (Preview)
See Gemini Models for the live catalog.

4. Use it in Mirobody (global cluster)

curl -N -X POST <global-cluster-base-url>/api/chat \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-LLM-Provider: gemini" \
  -H "X-LLM-Api-Key: <your Gemini API key>" \
  -H "Content-Type: application/json" \
  -d '{"question":"hi","agent":"Baseline","provider":"gemini-2.5-flash"}'

Troubleshooting

  • API_KEY_INVALID → key revoked in AI Studio.
  • RESOURCE_EXHAUSTED → free-tier quota or RPM exceeded; adjust under Quotas.
  • PERMISSION_DENIED → model unavailable in your region.
  • Mainland-China timeout → expected; switch to DashScope / Volcengine.