Gemini 3.1 Flash Lite Image API on MaxAPI
Gemini 3.1 Flash Lite Image is a Gemini image generation and editing model exposed through MaxAPI. It accepts the OpenAI-compatible /v1/images/generations endpoint and the Gemini-native v1beta/models/<id>:generateContent format.
Common use cases
- Generate new marketing, editorial, or product imagery from a text prompt
- Edit or recompose an existing image with one or more reference images
- Iterate quickly between aspect ratios and resolutions for the same prompt
- Mix multiple reference images to compose a new scene
Endpoints
Image generation is synchronous by default. Set "async": true to queue and poll, or pass X-MaxAPI-Async: true on the Gemini-native endpoint.
- POST /v1/images/generations
- POST /v1/images/edits
- GET /v1/images/generations/{task_id}
- GET /v1/images/edits/{task_id}
- POST /v1beta/models/gemini-3.1-flash-lite-image:generateContent (Gemini-native)
- GET /v1beta/operations/{task_id} (async polling for the Gemini-native endpoint)
Lineage
Source family: Google Gemini image generation. MaxAPI exposes it through the OpenAI-compatible /v1/images/* endpoints and the Gemini-native /v1beta/models/<id>:generateContent format.
Available routes
This model runs on a single route: mix. Call it with an API key that permits the mix route (route_mode defaults to mix; sending a different route_mode is rejected).
- mix — blended route that may switch between configured providers for cost, availability, and fallback coverage; billing follows the published entry for this model.
Pricing
Pricing is per route mode. Failed requests are not charged. 1 credit = 1 USD.
Quick example
curl -X POST "https://api.maxapi.dev/v1/images/generations" \
-H "Authorization: Bearer $MAXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-3.1-flash-lite-image",
"prompt": "a clean product photo of a glass cube",
"aspect_ratio": "1:1",
"resolution": "1K",
"n": 1
}'
FAQ
How do I call Gemini 3.1 Flash Lite Image on MaxAPI?
Send requests to POST /v1/images/generations or POST /v1/images/edits with an Authorization: Bearer header. The body shape follows MaxAPI's OpenAI-compatible image API.
How do I switch between route_mode options?
Gemini 3.1 Flash Lite Image runs on a single route: mix. There is nothing to switch — call it with an API key that permits the mix route.
How is billing handled?
Failed requests don't charge credits. Per-image, per-call, and per-generation pricing is billed on completion; token-priced routes settle from upstream usage. 1 credit = 1 USD.
Where does the returned media URL live?
Generated media is normally stored on MaxAPI's CDN for seven days. Pass "asset_delivery": "mirror" on supported generation endpoints to receive URLs on the configured alias domain instead.
Provider source: Google Gemini image generation documentation
Full API reference