Generate images with sub-second speed using FLUX.2 [klein], the fastest model in the FLUX.2 family by Black Forest Labs.
Key Features:
Use Cases:
Your Freepik API key. Required for authentication. Learn how to obtain an API key
Text description of the image you want to generate.
FLUX.2 [klein] is the fastest model in the FLUX.2 family, optimized for sub-second generation while maintaining high quality. It supports up to 4 reference images for style and subject transfer.
Tips for better results:
Examples:
"a mountain landscape at sunset""portrait of a person in natural lighting, soft focus background""abstract art in the style of watercolor painting""a beautiful sunset over the ocean with dramatic clouds"
Aspect ratio of the generated image. Determines the proportional relationship between width and height.
| Aspect Ratio | Base Dimensions (1k) |
|---|---|
square_1_1 | 1024 × 1024 |
widescreen_16_9 | 1344 × 768 |
social_story_9_16 | 768 × 1344 |
portrait_2_3 | 832 × 1216 |
traditional_3_4 | 960 × 1280 |
vertical_1_2 | 704 × 1408 |
horizontal_2_1 | 1408 × 704 |
social_post_4_5 | 896 × 1152 |
standard_3_2 | 1216 × 832 |
classic_4_3 | 1280 × 960 |
square_1_1, classic_4_3, traditional_3_4, widescreen_16_9, social_story_9_16, standard_3_2, portrait_2_3, horizontal_2_1, vertical_1_2, social_post_4_5 "square_1_1"
Resolution multiplier for the generated image.
1k: Uses base dimensions (default)2k: Doubles the base dimensions (capped at 2048px per side)Final dimensions are calculated by multiplying base dimensions by the resolution factor, then scaling proportionally if either dimension exceeds 2048px, and aligning to multiples of 16.
1k, 2k "1k"
Random seed for reproducible results.
Use case: Generate variations of the same image by using the same seed with modified prompts.
Valid range: 0 to 4,294,967,295 Default: Random seed (if not provided)
0 <= x <= 429496729542
Base64-encoded reference image for style/subject transfer.
Supported formats: JPEG, PNG Use cases:
Note: Supports up to 4 reference images using input_image, input_image_2, input_image_3, and input_image_4.
Second base64-encoded reference image for multi-image generation.
Third base64-encoded reference image for multi-image generation.
Fourth base64-encoded reference image for multi-image generation.
Content moderation tolerance level.
Range: 0 to 5
Note: Lower values filter more content. Choose based on your application requirements.
0 <= x <= 5Output image format.
PNG: Lossless, supports transparency, larger file JPEG: Lossy, smaller file, no transparency
jpeg, png Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
"https://www.example.com/webhook"
OK - Task created successfully
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED"
}