POST
/
v1
/
ai
/
gemini-2-5-flash-image-preview
Image generation and editing using Gemini 2.5 Flash
curl --request POST \
  --url https://api.freepik.com/v1/ai/gemini-2-5-flash-image-preview \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '{
  "prompt": "A beautiful sunset over mountains with vibrant orange and purple skies",
  "reference_images": [
    "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAABrElEQVR4nO3BMQEAAADCoPVPbQ0Po...",
    "https://example.com/reference-image.jpg"
  ],
  "webhook_url": "https://www.example.com/webhook"
}'
{
"data": {
"generated": [],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}
}

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json

Response

200
application/json

OK - The task exists and the status is returned

The response is of type object.