Generate image with FLUX 2 Klein
Black Forest Labs FLUX.2 Klein — sub-second generation with excellent prompt adherence. Text-to-image and image editing with up to 3 reference images, megapixel-based resolution, and seed control.
Asynchronous. Returns a job id (the image is not in this response). Poll GET /v1/images/{id} until status is succeeded — the generated image URLs are in that response’s images array (each { url, position }).
Authorizations
API key as a bearer token: Authorization: Bearer bpx_live_xxx
Body
Text description of the image to generate.
Output aspect ratio.
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21, 5:4, 4:5, match_input_image Output resolution in megapixels.
0.5, 1, 2, 4 Number of images to generate.
1 <= x <= 4Optional reference images (up to 3) for image editing. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Use aspect_ratio "match_input_image" to keep the first reference's aspect ratio.
3Seed for reproducible generation. Omit for random.