·Image to Image
POST/api/v1/images/generate

Image to Image

Transform an existing image using a text prompt. Uses the same endpoint as text-to-image — simply include the image_url field pointing to a publicly accessible image.

Note

The image_url must be publicly accessible. Private or authenticated URLs will result in a 400 Bad Request. For base64 input, encode to a data: URL (coming soon).

Parameters

modelstringrequired

"nano-banana" | "nano-banana-2" | "nano-banana-pro"

promptstringrequired

Describes how to transform the input image

image_urlstringrequired

Publicly accessible URL of the source image (JPEG, PNG, WebP)

aspect_ratiostringoptional

"1:1" | "16:9" | "9:16" | "4:3" | "3:4". Defaults to "1:1".

Prompt tips

  • Describe the style transformation, not just the subject — e.g. "turn into oil painting" vs. just "painting"
  • Reference specific art styles: "Monet impressionism", "Bauhaus poster", "Studio Ghibli anime"
  • Use strong adjectives for texture: "rough", "glossy", "watercolor washes"
  • Combine with content edits: "woman in the photo wearing a red jacket instead"