Introduction
Moonez.ai provides native and Gemini-compatible APIs with a shared key and balance:
- Images — five Nano Banana models for text-to-image generation and image editing.
- Text — nine Gemini models billed per token, including Gemini 4 Argon and Gemini 3.8 Flash.
- Video — Veo 3.1, Veo 3.1 Fast, and Veo 3.1 Lite.
- Music — Lyria tracks and native RealTime audio streaming.
- Multimodal — Gemini Omni, with provider-dependent input and output capabilities.
Start with the complete catalog of 23 models. The latest
additions are gemini-4-argon, gemini-3.8-flash, and
gemini-3.1-flash-lite-image (Nano Banana 2 Lite, 1K only).
Base URLs
Section titled “Base URLs”| API | Base URL |
|---|---|
| Gemini-compatible API | https://api.moonez.ai/api/gemini/v1beta |
| Native jobs API | https://api.moonez.ai/api/v1 |
For Android apps with a custom Gemini provider, enter the complete URL
https://api.moonez.ai/api/gemini/v1beta. Use your Moonez.ai key.
In the Python SDK, configure the same URL together with
base_url_resource_scope=types.ResourceScope.COLLECTION to prevent the SDK
from adding /v1beta again. See the SDK setup.
How to get results
Section titled “How to get results”The native API is asynchronous:
- Send
POST /api/v1/generationswith the model and parameters. - Receive
202 Accepted, ajob_id, and astatus_url. - Poll
GET /api/v1/jobs/{job_id}until the status isdoneorfailed. - If the result contains an image, download it from
result.image_url.
You can configure a webhook instead of polling.
The Gemini-compatible API returns the result directly in the
generateContent response or through a streamGenerateContent stream.
No job polling is needed for these methods. Veo uses asynchronous jobs instead. See the API overview.
Image models
Section titled “Image models”For the native API, use POST /api/v1/generations with the model field:
| Model | Native API resolution | Generation | Editing |
|---|---|---|---|
gemini-2.5-flash-image | 1K | Text-to-image | Image-to-image |
gemini-3.1-flash-lite-image | 1K only | Text-to-image | Image-to-image |
gemini-3.1-flash-image | 1K · 2K · 4K | Text-to-image | Image-to-image |
gemini-3-pro-image | 1K · 2K · 4K | Text-to-image | Image-to-image |
gemini-nano-banana-2.1 | 1K · 2K · 4K | Text-to-image | Image-to-image |
The same IDs are available through the Gemini-compatible API.
Text and video
Section titled “Text and video”See Text models for the model list and per-token billing details.
For veo-3.1-generate-001, veo-3.1-fast-generate-001, and
veo-3.1-lite-generate-001, use
POST /api/gemini/v1beta/interactions. Request formats and billing are
covered in Video generation.
The multimodal gemini-omni-1.1-flash model is called through
POST /api/gemini/v1beta/models/gemini-omni-1.1-flash:generateContent.
See Models for details.
Next steps
Section titled “Next steps”- Quickstart — your first generation with cURL.
- Authentication — keys, permissions, and idempotency.
- Python SDK — Nano Banana 2.1 generation through the Gemini-compatible API.
- API Reference: Nano Banana 2 Lite — 1K generation and model-specific access.
- Model catalog — every active model and its exact API ID.