POST
/
v1
/
ai
/
image-expand
/
flux-pro
Image expand using AI Flux Pro
curl --request POST \
  --url https://api.freepik.com/v1/ai/image-expand/flux-pro \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '{
  "webhook_url": "https://www.example.com/webhook",
  "image": "aSDinaTvuI8gbWludGxpZnk=",
  "prompt": "<string>",
  "left": 1024,
  "right": 1024,
  "top": 1024,
  "bottom": 1024
}'
{
"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
image
string<byte>
required

Base64 image to expand

webhook_url
string<uri>

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.

Example:

"https://www.example.com/webhook"

prompt
string

The description of the changes you want to make. This text guides the expansion process, allowing you to specify features, styles, or modifications for the expanded areas.

left
integer | null

Pixel to expand on the left

Required range: 0 <= x <= 2048
right
integer | null

Pixel to expand on the right

Required range: 0 <= x <= 2048
top
integer | null

Pixel to expand on the top

Required range: 0 <= x <= 2048
bottom
integer | null

Pixel to expand on the bottom

Required range: 0 <= x <= 2048

Response

OK - The task exists and the status is returned

data
object
required
Example:
{
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
],
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}