Gemini 3 Pro Image API Usage Guide
Overview
Gemini 3 Pro Image creates high-quality images from descriptive prompts and can blend in multiple reference images supplied as URLs. You can control aspect ratio, output resolution (1K/2K/4K) and the number of images per request. This model is hosted on Google AI Studio and requires a Google API key.Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:Submit Image Generation Request
Base URL
Endpoint
Request Format
Request Parameters
Response
Check Request Status
Endpoint
Example
Response
Request Status Values
List Your Requests
Endpoint
Example
Get Model Information
Endpoint
Example
List Available Models
Endpoint
Example
Response
Gemini Native Interface (alternative)
In addition to the GMI-shape/requests endpoint above, this model accepts
the Vertex-native generateContent shape — request body matches what
Google’s generateContent
uses. Customers already running on google-genai SDK or any HTTP client
that follows Google’s REST contract can plug in by changing only the
base_url and Authorization header.
Endpoint
Curl example
google-genai SDK example
Multi-turn
Passcontents as user/model/user alternation. The last turn must be
role: "user". Reference images on user turns go in
parts[].inlineData (base64) — same field shape as Google’s
generateContent.
Multi-turn Conversation (Iterative Image Editing)
This model supports multi-turn conversations for iterative image editing. After generating an image, you can continue refining it by providing additional instructions.How It Works
- First Turn: Send a regular request with
prompt(and optionalimage) - Response: The response includes
next_turn_contents- a pre-formatted conversation history - Next Turn: Copy
next_turn_contentsto your payload’scontentsfield, then add your new instruction to the last user turn - Repeat: Continue iterating until satisfied
First Turn Request
First Turn Response (with next_turn_contents)
Second Turn Request (Using next_turn_contents)
Copynext_turn_contents to contents, then fill in the last user turn with your new instruction:
Multi-turn Tips
- Text-only edits: Just fill in the
textfield in the last user turn - Add reference image: Include a
fileDatawithfileUripointing to a GCS or HTTP URL - Empty fields are ignored: Empty
textorfileUriare automatically filtered out - Conversation history: Each response includes updated
next_turn_contentsfor the next iteration
Pricing
- Pricing Type: Per-image request
- Price: $0.134 per image
- Unit: Image
Tips for Better Results
- Prompt Clarity: Use detailed, specific prompts for precise results.
- Multi-turn Iteration: For complex edits, use multi-turn mode to refine the image step by step.