Skip to main content
POST
/
v3
/
gemini-2.5-flash-image-edit
Gemini 2.5 Flash Image Editing
curl --request POST \
  --url https://api.highwayapi.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": [
    "<string>"
  ]
}
Edit images with text prompts using the Gemini 2.5 Flash model. You can provide images via URLs or base64-encoded strings.

Request Headers

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

Request Body

prompt
string
required
A text prompt describing the desired edits to the image
image_urls
array
A list of input image URLs to edit
aspect_ratio
string
The 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:9Allowed values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
image_base64s
array
A list of base64-encoded images to edit

Response

image_urls
string[]
A list of URLs for the edited output images