Generate image (GET)

Create one or more images from a text prompt using query parameters.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Provide a detailed description of what you want to create, and the API will return an image.

Query Params
string
required
length ≥ 1

Text prompt for the image to generate.

string
enum
Defaults to nano-banana

Generation model. Only nano-banana is supported.

Allowed:
integer
1 to 4
Defaults to 1

Number of images to generate.

string
enum
Defaults to 1024x1024

OpenAI-compatible legacy size parameter. Prefer aspect_ratio for Nano Banana. Known mappings: 1024x1024 -> 1:1, 1792x1024 -> 16:9, 1024x1792 -> 9:16, 768x1024 -> 3:4, 1024x768 -> 4:3.

Allowed:
string
enum
Defaults to 1:1

Aspect ratio for generated images.

Allowed:
string
enum
Defaults to png

Output image format.

Allowed:
string
enum
Defaults to url

Response format. Use url for a worker-hosted image URL, or b64_json for base64 image data.

Allowed:
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json