Skip to main content
POST
  • Flux 2.0 image generation model
  • Choose flux-2-flex (faster, for quick iteration) or flux-2-pro (higher quality, better details) via the model parameter
  • Supports text-to-image and image-to-image, up to 8 reference images
  • Billed by resolution (1K/2K)
  • Async task mode, returns task_id for querying results
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload 이미지 API first to upload images and get URLs, then call this endpoint.

Authorization

string
필수
All endpoints require Bearer Token authenticationGet your API Key: Visit the API Key Management Page to get your API KeyAdd to request header:

요청 파라미터

string
필수
Image generation model nameOptions:
  • flux-2-flex - Faster, suitable for quick iteration
  • flux-2-pro - Higher quality, better details
string
필수
Text description for image generation
string
기본값:"1:1"
Image aspect ratioSupported aspect ratios:
  • 1:1 - Square (default)
  • 4:3 / 3:4 - Traditional display ratio
  • 16:9 / 9:16 - Widescreen/portrait
  • 3:2 / 2:3 - Standard photo
string[]
Reference image URL array for image-to-image⚠️ URL format only (base64 not supported)
  • Publicly accessible image URL (http:// or https://)
  • Use the Upload 이미지 API to upload local images and get URLs
Limits:
  • Maximum 8 reference images
object
Metadata parameters for additional configuration options

응답

string
Unique task identifier for querying task status
string
Object type, fixed as generation.task
string
모델 name used for generation
string
Task status
  • queued - Waiting to be processed
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
integer
Task progress percentage (0-100)
integer
Task creation timestamp (Unix timestamp)
object
Task metadata

Use Cases

Case 1: Text-to-Image (Quick Iteration)

Case 2: Text-to-Image (High Quality Output)

Case 3: Image-to-Image (Multiple Reference Images)

Case 4: Portrait Poster

Query Task ResultsImage generation is an async task. After submission, a task ID is returned. Use the Get Image Task 상태 endpoint to query generation progress and results.