Gemini Native (Image)
curl --request POST \
--url https://api.gravitex.ai/v1/images/generations \
--header 'Authorization: <authorization>'Image Series
Gemini Native (Image)
Gemini image generation models: text-to-image and image-to-image
POST
/
v1
/
images
/
generations
Gemini Native (Image)
curl --request POST \
--url https://api.gravitex.ai/v1/images/generations \
--header 'Authorization: <authorization>'Documentation Index
Fetch the complete documentation index at: https://docs.gravitex.ai/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
Nano Banana refers to Google Gemini image generation models: Nano Banana (gemini-2.5-flash-image) and Nano Banana Pro (gemini-3-pro-image-preview). They are called via the unified image API POST /v1/images/generations, supporting text-to-image, image-to-image, and multi-image composition.
For full parameters and multi-model details, see Image Generation.
Authentication
Bearer Token, e.g.
Bearer sk-xxxxxxxxxxSupported models
| Model ID | Description |
|---|---|
gemini-2.5-flash-image | Nano Banana, cost-effective text/image-to-image |
gemini-3-pro-image-preview | Nano Banana Pro, higher quality and controllability |
Request examples
- Text-to-image
- Image-to-image
curl -X POST "https://api.gravitex.ai/v1/images/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash-image",
"prompt": "A cute orange cat sitting in a garden, sunny, high-quality photo",
"size": "16:9",
"quality": "high",
"n": 1,
"response_format": "b64_json",
"image_size": "2K",
"mime_type": "image/png",
"response_modalities": "image"
}'
curl -X POST "https://api.gravitex.ai/v1/images/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-2.5-flash-image",
"size": "16:9",
"quality": "high",
"image_size": "3K",
"response_format": "b64_json",
"contents": [
{
"role": "user",
"parts": [
{"text": "Generate an aerial view of Canton Tower based on this image"},
{"image": "data:image/png;base64,iVBORw0KGgo..."}
]
}
]
}'
Common parameters
- prompt: Text prompt for text-to-image
- size: Aspect ratio, e.g.
16:9,1:1 - quality: Quality level, e.g.
high - image_size: Output size, e.g.
1K,2K,3K - response_format: Gemini series only supports
b64_json(base64 image) - contents: Used for image-to-image or multi-turn; format in Image Generation
âI