Image Edit
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | ✅ Yes | - | The model to use for image editing (e.g., “gemini-3-pro-image-preview”). |
image | file | ✅ Yes | - | The image file to edit. Must be a PNG, JPEG, or WEBP file. |
mask | file | ❌ No | - | An optional mask image that specifies where to edit the image. |
prompt | string | ✅ Yes | - | The text prompt describing the desired edits. |
n | integer | ❌ No | 1 | The number of images to generate. |
size | string | ❌ No | 1024x1024 | The size of the generated images (e.g., “256x256”, “512x512”, “1024x1024”). |
response_format | string | ❌ No | url | The format of the response (“url” or “b64_json”). |
style | string | ❌ No | vivid | The style of the generated images (“vivid” or “natural”). |