Flux 2.0 Image Generation
- Asynchronous processing mode, returns task ID for subsequent queries
- Supports text-to-image and image-to-image generation
- Generated image links are valid for 24 hours, please save promptly
POST
Supported Models
Authorizations
All endpoints require Bearer Token authenticationGet API Key:Visit API Key Management to get your API KeyAdd to request header:
Body
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)
Text description for image generation
Image resolutionSupported resolutions:
1K- Default, 1080p level2K- HD, max 2048 pixels
Case insensitive:1k,1K,2k,2Kall work
Image aspect ratioSupported aspect ratios:
1:1- Square (default)4:3- Landscape3:4- Portrait16:9- Widescreen9:16- Vertical3:2- Classic landscape2:3- Classic portrait
Only these 7 ratios are supported, unsupported ratios will return an error
Reference image URL listLimitations:
- Maximum 8 images
- Must be publicly accessible URL
- Base64 format not supported
Resolution Reference Table
Usage Examples
Basic Text-to-ImageResponse
Response status code
Response data array
Notes
- Image URL Requirements: Input images must be publicly accessible URLs, base64 not supported
- Result Storage: Generated images are automatically stored, URLs valid for 24 hours
- Task Polling: Tasks are processed asynchronously, poll
/v1/tasks/{task_id}for results - Input Image Limits: Up to 8 reference images supported