POST
https://api.unifically.com
/
flux.2-pro
/
generate
Generate Image
curl --request POST \
  --url https://api.unifically.com/flux.2-pro/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "image_urls": [
    {}
  ],
  "aspect_ratio": "<string>",
  "quality": "<string>",
  "callback_url": "<string>"
}
'
{
  "code": 200,
  "data": {
    "status": "processing",
    "task_id": "dd55ae25-adff-47a0-9194-6a37845b58e4"
  }
}
Generate high-quality AI images using the Flux.2 Pro model with support for up to 8 reference images.

Pricing

QualityPrice
1K$0.02
2K$0.03

Request

curl -X POST "https://api.unifically.com/flux.2-pro/generate" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "A beautiful sunset over mountains",
    "image_urls": ["https://example.com/ref1.jpg"],
    "aspect_ratio": "16:9",
    "quality": "2K"
  }'

Parameters

Required Parameters

prompt
string
required
Text description of the image to generate

Optional Parameters

image_urls
array
Array of reference image URLs to guide generationMaximum: 8 images
aspect_ratio
string
Aspect ratio of the generated imageOptions: "auto", "1:1", "4:3", "16:9", "3:2", "2:3", "9:16", "3:4"Default: "auto"
quality
string
Output image quality/resolutionOptions: "1K", "2K"Default: "1K"
callback_url
string
URL to receive webhook notification on completion

Response

{
  "code": 200,
  "data": {
    "status": "processing",
    "task_id": "dd55ae25-adff-47a0-9194-6a37845b58e4"
  }
}

Response Fields

code
integer
default:"200"
HTTP status code (200 for success)
data
object
Response data
task_id
string
Unique identifier for this generation task
status
string
Task status (e.g., “processing”)
Use the task_id to check the status using the Check Status endpoint.