Skip to main content
POST

Supported Models

Authorizations

Authorization
string
required
All endpoints require Bearer Token authenticationGet API Key:Visit API Key Management to get your API KeyAdd to request header:

Body

model
string
required
Model name
  • flux-2-flex - Flux 2.0 Flex model (faster, suitable for quick iterations)
  • flux-2-pro - Flux 2.0 Pro model (higher quality, better details)
prompt
string
required
Text description for image generation
resolution
string
default:"1K"
Image resolutionSupported resolutions:
  • 1K - Default, 1080p level
  • 2K - HD, max 2048 pixels
Case insensitive: 1k, 1K, 2k, 2K all work
size
string
default:"1:1"
Image aspect ratioSupported aspect ratios:
  • 1:1 - Square (default)
  • 4:3 - Landscape
  • 3:4 - Portrait
  • 16:9 - Widescreen
  • 9:16 - Vertical
  • 3:2 - Classic landscape
  • 2:3 - Classic portrait
Only these 7 ratios are supported, unsupported ratios will return an error
image_urls
array
Reference image URL listLimitations:
  • Maximum 8 images
  • Must be publicly accessible URL
  • Base64 format not supported

Resolution Reference Table

Usage Examples

Basic Text-to-Image
High Resolution Generation
Image-to-Image (up to 8 reference images)

Response

code
integer
Response status code
data
array
Response data array

Notes

  1. Image URL Requirements: Input images must be publicly accessible URLs, base64 not supported
  2. Result Storage: Generated images are automatically stored, URLs valid for 24 hours
  3. Task Polling: Tasks are processed asynchronously, poll /v1/tasks/{task_id} for results
  4. Input Image Limits: Up to 8 reference images supported