Skip to main content
POST
Gemini 2.5 Flash Image Editing
Edit images with text prompts using the Gemini 2.5 Flash model. You can provide images via URLs or base64-encoded strings.

Request Headers

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

Request Body

string
required
A text prompt describing the desired edits to the image
string[]
A list of input image URLs to edit
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
string[]
A list of base64-encoded images to edit

Response

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