Skip to main content
POST
Playground
Fill in your API key and a prompt, then send. This hits the live API — the same endpoint your code would call.
Requests sent from this page are real and are billed to your key. A single 1K image costs about $0.02–0.09 depending on the model. Nothing here is a sandbox or a mock.

Parameters

string
required
Which model to run. Accepts gemini-3-pro-image or gemini-3.1-flash-image, matched exactly — no aliases, no -preview suffixes.
object
required
The generation parameters. Any key not listed below is rejected with invalid_params.
string
An https URL to POST the finished task to, so you can skip polling. Must be https — anything else is rejected at submit time.

What comes back

Submitting returns immediately, in well under a second. The image is not in this response — generation happens in the background.

Then poll for the image

This playground covers the create call only. Take the id from the response above and read the task until status reaches completed or failed — expect 15–40 seconds for a 1K image.
A finished task carries an outputs array of image URLs:
Output URLs are unauthenticated and expire 24 hours after the task was created. Send a User-Agent header when you download them — the delivery CDN answers a bare 403 to requests without one.

Next steps

Overview

Every parameter, resolution tier and measured latency for the series.

Async task API

The polling loop, callbacks and the full error table.