Generate image

Create one or more images from a text prompt using nano-banana.

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. Supports multiple request formats including JSON, form data, and URL-encoded parameters.

Body Params
string
required
length between 1 and 4096

Text prompt for the image to generate.

string
enum
Defaults to nano-banana

Model to use. This worker supports nano-banana for generation and editing.

Allowed:
integer
1 to 4
Defaults to 1

Number of images to request.

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. Supported values are exactly the ratios accepted by the worker.

Allowed:
string
enum
Defaults to png

Generated output image format. This maps to the worker output_format parameter.

Allowed:
string
enum
Defaults to url

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

Allowed:
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

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