Skip to main content
POST
/
v1
/
ai
/
image-to-prompt
curl --request POST \
--url https://api.freepik.com/v1/ai/image-to-prompt \
--header 'Content-Type: application/json' \
--header 'x-freepik-api-key: <api-key>' \
--data '{
"image": "https://example.com/sample-image.jpg",
"webhook_url": "https://your-app.com/webhooks/image-to-prompt"
}'
{
"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
required

Input image for prompt generation. Can be base64-encoded string or URL.

Example:

"https://example.com/image.jpg"

webhook_url
string<uri>

Webhook URL to notify the user when the task is completed

Example:

"https://example.com/webhook"

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"
}
I