Skip to main content
POST
/
v3
/
gemini-2.5-flash-image-edit
Nano Banana Image Edit
curl --request POST \
  --url https://api.myrouter.ai/v3/gemini-2.5-flash-image-edit \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "image_urls": [
    {}
  ],
  "aspect_ratio": "<string>",
  "image_base64s": [
    {}
  ]
}
'
{
  "image_urls": [
    {}
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt

Use this file to discover all available pages before exploring further.

Edit images using the Gemini 2.5 Flash model with text prompts. You can provide images via URL or base64 encoded strings.

Request Headers

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

prompt
string
required
Text prompt describing the desired image editing effect
image_urls
array
List of input image URLs for editing
aspect_ratio
string
Aspect ratio of the generated image. Available values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9Possible values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
image_base64s
array
List of base64 encoded images for editing

Response

image_urls
array
List of output image URLs after editing