This endpoint allows you to generate or edit images using the Gemini 2.5 Flash model. You can provide a prompt for image generation, or include reference images for image editing and style transfer. The model supports both text-to-image generation and image-to-image editing with up to 3 reference images.
Your Magnific API key. Required for authentication. Learn how to obtain an API key
The prompt is a short text that describes the image you want to generate or edit. It can range from simple descriptions, like "a cat", to detailed scenarios, such as "a cat with wings, playing the guitar, and wearing a hat". This field is required for both image generation and editing.
"A beautiful sunset over mountains with vibrant orange and purple skies"
Optional array of reference images for image editing. Each image can be provided as a Base64 encoded string or a publicly accessible URL. Maximum of 3 reference images allowed. If provided, the model will use these images as reference for editing or style transfer.
3Reference image as Base64 encoded string or publicly accessible URL
[
"iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAABrElEQVR4nO3BMQEAAADCoPVPbQ0Po...",
"https://example.com/reference-image.jpg"
]Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
"https://www.example.com/webhook"
OK - The task exists and the status is returned
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED",
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
]
}