Skip to main content
POST
/
v1
/
ai
/
image-expand
/
ideogram
Ideogram - Expand image
curl --request POST \
  --url https://api.freepik.com/v1/ai/image-expand/ideogram \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '
{
  "image": "aSDinaTvuI8gbWludGxpZnk=",
  "left": 1024,
  "right": 1024,
  "top": 1024,
  "bottom": 1024,
  "webhook_url": "https://www.example.com/webhook",
  "prompt": "<string>",
  "seed": 1073741823
}
'
{
"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

left
integer
required

Number of pixels to expand on the left side

Required range: 0 <= x <= 2048
right
integer
required

Number of pixels to expand on the right side

Required range: 0 <= x <= 2048
top
integer
required

Number of pixels to expand on the top side

Required range: 0 <= x <= 2048
bottom
integer
required

Number of pixels to expand on the bottom side

Required range: 0 <= x <= 2048
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

Optional text prompt describing the desired expanded content. If not provided, the AI model will auto-generate a prompt based on the image.

seed
integer

Optional seed for reproducibility

Required range: 0 <= x <= 2147483647

Response

OK - The task exists and the status is returned

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