gemini-3-pro-image-preview-official API
Generate and edit images up to 4K with Google's Nano Banana Pro official edition on Openrouter API.
gemini-3-pro-image-preview-officialgemini-3-pro-image-preview-official API pricing
All prices in USD. Openrouter API rates compared with the official list price for the same unit.
| Token type | Openrouter API | Official | Save |
|---|---|---|---|
| Text input per 1M tokens | $1.76 | $2.00 | −12% |
| Cached text input per 1M tokens | $0 | $0 | — |
| Image input per 1M tokens | $1.76 | $2.00 | −12% |
| Cached image input per 1M tokens | $0 | $0 | — |
| Text output per 1M tokens | $10.56 | $12.00 | −12% |
| Image output per 1M tokens | $106 | $120 | −12% |
Approximate cost per output
| Option | Openrouter API | Official |
|---|---|---|
| 4K | ≈ $0.2112 | $0.24 |
What is gemini-3-pro-image-preview-official?
Google's gemini-3-pro-image-preview-official is an image generation and editing model in the Nano Banana family, available on Openrouter API as the official edition. Use it to create images from text descriptions or transform reference images supplied as public URLs or complete base64 Data URIs. The endpoint supports explicit aspect ratios and 1K, 2K, or 4K output resolution, with one image per request. Processing is asynchronous: submit a request, receive a task ID, and query for the result.
Openrouter API provides access with one API key and the OpenAI-compatible base URL https://openrouterapi.ru/v1. Billing is pay-as-you-go and applies only to successful requests. This model is token-billed, with an estimated per-image cost at 4K of about $0.2112, versus the developer's list price about $0.24. The default configuration is about 12% below the developer's list price, and prompt-cache reads are supported.
gemini-3-pro-image-preview-official highlights
Text and reference inputs
Generate images from a text prompt or supply reference images for image-to-image and editing workflows. Reference inputs accept public image URLs or complete base64 Data URIs.
Resolution and ratio controls
Choose 1K, 2K, or 4K output resolution. Supported aspect ratios include square, portrait, landscape, and 21:9 formats.
Asynchronous task handling
POST to /v1/images/generations returns a task ID for subsequent queries. Build task tracking into your application rather than expecting an immediate image result.
Optional content moderation
Enable nsfw_check to review prompts and input images with omni-moderation-latest before submission. It defaults to false, which adds no moderation cost or latency.
How to call the gemini-3-pro-image-preview-official API in 4 steps
- 01
Get an API key
Sign in to Openrouter API, top up from $50, and create an sk-ora key in the console.
- 02
Set the base URL
Use https://openrouterapi.ru/v1 as the base URL in your SDK or HTTP client.
- 03
Send the request
Call POST /v1/images/generations with "model": "gemini-3-pro-image-preview-official" and the parameters below.
- 04
Handle the response
The response contains a task_id. Poll GET /v1/tasks/{task_id} until the status is completed, then download the result URLs.
Request examples
Documentation: Nano banana Pro Image Generation# model can be "gemini-3-pro-image-preview-official", or the compatible alias "nano-banana-pro-ext"
curl --request POST \
--url https://openrouterapi.ru/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-3-pro-image-preview-official",
"prompt": "A bamboo forest path under moonlight",
"size": "1:1",
"n": 1,
"resolution": "1K"
}'Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | gemini-3-pro-image-preview | Image generation model name |
nsfw_check | boolean | Optional | false | Whether to run content moderation before submitting the image task. |
prompt | string | Required | — | Text description for image generation |
size | string | Optional | — | Image generation size |
n | integer | Optional | — | Number of images to generate |
resolution | string | Optional | — | Output image resolution |
official_fallback | boolean | Optional | false | Whether to automatically retry on the `-official` edition if the standard edition cannot complete the request |
image_urls | array | Optional | — | List of reference image URLs for image-to-image or image editing |
What you can build with gemini-3-pro-image-preview-official
Marketing asset generation
Build a tool that turns campaign briefs into images with explicit aspect ratios for different placements.
Reference-based image editing
Let users submit reference images and a text description of the desired changes in an editing workflow.
Creative concept exploration
Generate individual visual concepts from art-direction prompts, then submit additional requests to explore alternatives.
Queued image production
Integrate image generation into a background-job pipeline that tracks task IDs and saves completed assets.
Tips for better results
- 01
Set the aspect ratio
Specify size rather than relying on auto. For text-to-image, auto defaults to 1:1 or 16:9; for image-to-image, the ratio follows the model response.
- 02
Choose resolution explicitly
Set resolution to 1K, 2K, or 4K; 1K is the default. Generating 4K images with base64 format takes longer processing time.
- 03
Validate reference inputs
Supply no more than 14 reference images, each no larger than 30MB. For base64 inputs, include the full Data URI prefix and use JPEG, PNG, or WebP.
- 04
Handle tasks and storage
Keep the returned task_id for subsequent status queries. Download completed images promptly because generated links remain valid for only 24 hours.
Limits and things to know
Each request supports exactly one generated image; n must be the number 1, not a quoted string.
Reference inputs are limited to 14 images, with a maximum size of 30MB per image.
The official_fallback parameter cannot be used with this official-edition model.
gemini-3-pro-image-preview-official API FAQ
How much does Nano Banana Pro cost on Openrouter API?
The estimated per-image cost at 4K is about $0.2112, token-billed, versus the developer's list price about $0.24. Per 1M tokens, rates are text input $1.76, cached text input $0, image input $1.76, cached image input $0, text output $10.56, and image output $105.60. The default configuration is about 12% below the developer's list price.
How do I call gemini-3-pro-image-preview-official?
Send a Bearer-authenticated POST request to https://openrouterapi.ru/v1/images/generations with model set to gemini-3-pro-image-preview-official and a required prompt. The alias nano-banana-pro is also accepted; the response returns a task ID for subsequent queries.
Which image generation parameters are supported?
You can set size for aspect ratio, resolution to 1K, 2K, or 4K, and image_urls for reference-based generation or editing. Set n to the number 1 and optionally enable nsfw_check; do not use official_fallback with this model.
What are the input and output limits?
The listed limits are 1,000,000 input tokens and 128,000 output tokens. Reference inputs support up to 14 JPEG, JPG, PNG, or WebP images, each no larger than 30MB, and each request generates one image.
Can I use generated images commercially?
Commercial use is subject to the model developer's terms. Review Google's applicable terms and any rights associated with your reference images before using outputs commercially.
How does the official model differ from the standard version?
gemini-3-pro-image-preview-official is the official edition and accepts the alias nano-banana-pro. The standard version is gemini-3-pro-image-preview, with alias nano-banana-pro-ext; published information does not establish a quality or speed difference between the two editions.
Related models
Nano Banana
gemini-2.5-flash-image-previewgemini-2.5-flash-image-preview-official
Nano Banana Pro
gemini-3-pro-image-previewNano Banana 2
gemini-3.1-flash-image-previewgemini-3.1-flash-image-preview-official
Nano-Banana-2-Lite
gemini-3.1-flash-lite-imagegemini-3.1-flash-lite-image-ext
Nano Banana 2.1
gemini-nano-banana-2.1Start building with gemini-3-pro-image-preview-official
One key, pay as you go from $50, billed only for successful requests.
