POST
/
v1
/
ai
/
text-to-image
/
flux-dev
curl --request POST \
  --url https://api.freepik.com/v1/ai/text-to-image/flux-dev \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '{
  "prompt": "<string>",
  "webhook_url": "https://www.example.com/webhook",
  "aspect_ratio": "square_1_1",
  "styling": {
    "effects": {
      "color": "softhue",
      "framing": "portrait",
      "lightning": "iridescent"
    },
    "colors": [
      {
        "color": "#FF0000",
        "weight": 0.5
      }
    ]
  },
  "seed": 2147483648
}'
{
  "data": {
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "IN_PROGRESS"
  }
}

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 - Get the status of the flux-dev task

The response is of type object.