POST
/
flux
/
create
curl -X POST https://api.example.com/flux/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "black-forest-labs/flux-kontext-dev",
    "prompt": "A cyberpunk city at night",
    "width": 1024,
    "height": 1024
  }'
{
  "id": "task_123456",
  "status": "pending"
}
Create an image generation task using FLUX series models.

Request Parameters

model
string
required
Model name, e.g., black-forest-labs/flux-kontext-dev.
prompt
string
required
Image description prompt.
width
integer
Image width.
height
integer
Image height.
num_outputs
integer
default:"1"
Number of images to generate.
curl -X POST https://api.example.com/flux/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "black-forest-labs/flux-kontext-dev",
    "prompt": "A cyberpunk city at night",
    "width": 1024,
    "height": 1024
  }'
{
  "id": "task_123456",
  "status": "pending"
}