FLUX1.1 [pro] is the standard for text-to-image generation with fast, reliable and consistently stunning results. To generate an image from text, you’ll make a request to the /flux-pro-1.1 endpoint.

Key Features

Fast & Reliable

State-of-the-art inference speeds with consistent, stunning results every time

Strong Prompt Adherence

Proven baseline for accurate text-to-image generation that follows your prompts precisely

Scalable Generation

Robust architecture ideal for high-volume, production-ready image generation

Competitive Pricing

Superior image quality at just $0.04 per image

Examples of Image Generation with FLUX.1 [pro]

Using FLUX1.1 [pro] API for Text-to-Image Generation

Create a Request

Use the /flux-pro-1.1 endpoint for standard FLUX1.1 [pro] generation:
request=$(curl -X POST \
  'https://api.bfl.ai/v1/flux-pro-1.1' \
  -H 'accept: application/json' \
  -H "x-key: ${BFL_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "A futuristic city skyline at sunset with flying cars",
    "width": 1024,
    "height": 1024
}')

request_id=$(echo $request | jq -r .id)
polling_url=$(echo $request | jq -r .polling_url)

Poll for Result

After submitting a request, you need to poll using the returned polling_url to retrieve the output when ready.
while true; do
  sleep 0.5
  result=$(curl -s -X 'GET' \
    "${polling_url}" \
    -H 'accept: application/json' \
    -H "x-key: ${BFL_API_KEY}")
  
  status=$(echo $result | jq -r .status)
  echo "Status: $status"
  
  if [ "$status" == "Ready" ]; then
    echo "Result: $(echo $result | jq -r .result.sample)"
    break
  elif [ "$status" == "Error" ] || [ "$status" == "Failed" ]; then
    echo "Generation failed: $result"
    break
  fi
done
A successful response will be a json object containing the result, and result['sample'] is a signed URL for retrieval.
Our signed URLs are only valid for 10 minutes. Please retrieve your result within this timeframe.

FLUX1.1 [pro] Parameters

ParameterTypeDefaultDescriptionRequired
promptstringText description of the desired imageYes
widthinteger1024Image width in pixelsNo
heightinteger1024Image height in pixelsNo
prompt_upsamplingbooleanfalseEnhance prompt for better resultsNo
seedintegernullSeed for reproducible results. Accepts any integerNo
safety_toleranceinteger2Content moderation level. Value ranges from 0 (most strict) to 6 (more permissive)No
output_formatstring”jpeg”Desired format of the output image. Can be “jpeg” or “png”No
webhook_urlstringnullURL for asynchronous completion notification. Must be a valid HTTP/HTTPS URLNo
webhook_secretstringnullSecret for webhook signature verification, sent in the X-Webhook-Secret headerNo

Pricing

FLUX1.1 [pro] is available at $0.04 per image.