Edit image

Modify an existing image from a URL, base64 string, or uploaded file using nano-banana.

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

Upload an image as a file, provide a URL, or send base64-encoded data along with your editing prompt. The API will intelligently apply your requested changes and return the edited image. Supports JSON, multipart form data, and URL-encoded formats for flexible integration.

Body Params
string
required
length ≥ 1

Text instruction for editing the image.

string
required

Image input as a URL, data:image base64 string, or raw base64 string. Supported MIME types: image/jpeg, image/jpg, image/png, image/gif, image/webp, image/bmp.

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 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