Generate an image
Create a new image from a text prompt, or edit an existing one by passing an image URL. Works with Nano Banana Pro, Flux, Recraft, Ideogram, and every other image model.
"Make me a product shot of a matte black espresso machine on a warm kitchen counter, golden hour light"
"Take this logo and put it on a coffee cup, photorealistic"
Options (7) +
prompt string required What to create, or edit instructions when image_url is set.
model string Model ID. Defaults to Flux Schnell. Use list_models to browse.
image_url string Pass a source image to switch into edit mode.
width / height number Output dimensions in pixels.
num_images 1-4 Generate multiple variations in one call.
remove_background boolean Auto-remove the background from the result.
extras object Model-specific parameters (see get_model_params). Pass extras.image_urls for style/character references — the first one auto-promotes to image_url if you forgot to set it.