Gemini 3 Pro
Google Gemini 3 Pro image API reference. Generate and edit high-quality images with Google's most capable model. Text-to-image and multi-image editing via REST API.
Generate Image
POST/v1/images/gemini/3/pro/generate/
Generate images from a text prompt. Supports multiple output formats, aspect ratios, resolutions up to 4K, and batch generation of up to 4 images.
curl -X POST https://api.3daistudio.com/v1/images/gemini/3/pro/generate/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a futuristic cityscape at night, neon lights",
"output_format": "png",
"aspect_ratio": "16:9",
"resolution": "2K",
"num_images": 2
}'{
"task_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"created_at": "2026-02-25T12:00:00Z"
}Generate Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text description of the image to generate. |
| output_format | string | No | "png", "jpeg", or "webp". Default: "png". |
| aspect_ratio | string | No | "auto", "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", or "9:16". Default: "auto". |
| resolution | string | No | "1K", "2K", or "4K". Default: "1K". 4K costs 80 credits per image. |
| num_images | integer | No | Number of images (1 to 4). Default: 1. Credits multiply accordingly. |
Edit Image
POST/v1/images/gemini/3/pro/edit/
Edit existing images with natural-language instructions. Provide one or more base64-encoded source images and a text prompt describing the desired changes.
curl -X POST https://api.3daistudio.com/v1/images/gemini/3/pro/edit/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Change the wall color to blue and add a plant in the corner",
"images": ["data:image/png;base64,iVBOR..."],
"output_format": "png"
}'{
"task_id": "f7e8d9c0-b1a2-3456-7890-abcdef012345",
"created_at": "2026-02-25T12:00:00Z"
}Edit Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text instruction describing the edit to apply. |
| images | array | Yes | Array of 1 to 14 base64-encoded source images (data:image/...;base64,...). |
| output_format | string | No | "png", "jpeg", or "webp". Default: "png". |
| aspect_ratio | string | No | Output aspect ratio. Default: "auto". |
| resolution | string | No | "1K", "2K", or "4K". Default: "1K". |
| num_images | integer | No | Number of output images (1 to 4). Default: 1. |
Checking Status
GET/v1/generation-request/<task_id>/status/
Poll this endpoint with the task_id from the submit response. When status is "FINISHED", the results array contains your generated or edited images with download URLs and thumbnails. If you requested multiple images (num_images > 1), each image appears as a separate entry in the results array. Results expire after 24 hours.
curl https://api.3daistudio.com/v1/generation-request/YOUR_TASK_ID/status/ \
-H "Authorization: Bearer YOUR_API_KEY"{
"status": "FINISHED",
"progress": 100,
"results": [
{
"asset_url": "https://cdn.3daistudio.com/images/img_001.png",
"asset": "https://storage.3daistudio.com/assets/img_001.png",
"asset_type": "IMAGE",
"thumbnail": "https://storage.3daistudio.com/thumbnails/img_001.png"
},
{
"asset_url": "https://cdn.3daistudio.com/images/img_002.png",
"asset": "https://storage.3daistudio.com/assets/img_002.png",
"asset_type": "IMAGE",
"thumbnail": "https://storage.3daistudio.com/thumbnails/img_002.png"
}
]
}Credit Costs
| Resolution | Per Image |
|---|---|
| 1K / 2K | 50 credits |
| 4K | 80 credits |
Processing Times
Image generation typically takes 40–90 seconds per image. Editing existing images takes a similar 40–90 seconds depending on the complexity of the edit and the input image size. Higher resolutions and batch requests (multiple images) may take longer.
Errors
Common errors for Gemini 3 Pro image endpoints.
| Status | Error Code | Description |
|---|---|---|
| 402 | insufficient_credits | Not enough credits. Top up your wallet. |
| 429 | rate_limited | Rate limit exceeded. Wait and retry. |
| 400 | validation_failed | Missing or invalid parameters. |