Image Generation
Our API endpoints enable media creation with BFL generative models. It follows an asynchronous design, where you first make a request for a generation and then query for the result of your request.
Available Endpoints
We currently support the following endpoints for image generation:
/flux-kontext-pro
/flux-kontext-max
/flux-pro-1.1-ultra
/flux-pro-1.1
/flux-pro
/flux-dev
Create Your First Image
Submit Generation Request
To submit an image generation task with FLUX 1.1 [pro], create a request:
A successful response will be a json object containing the request’s id, that will be used to retrieve the actual result.
Poll for Results
To retrieve the result, poll the get_result
endpoint:
A successful response will be a JSON object containing the result, where result['sample']
is a signed URL for retrieval.
Our signed URLs are only valid for 10 minutes. Please retrieve your result within this timeframe.
See our reference documentation for a full list of options and our inference repo.
Limits
Rate Limits: Sending requests to our API is limited to 24 active tasks. If you exceed your limit, you’ll receive a status code 429
and must wait until one of your previous tasks has finished.
Rate Limits: Additionally, due to capacity issues, for flux-kontext-max
, the requests to our API is limited to 6 active tasks.
Credits: If you run out of credits (status code 402
), visit https://api.us1.bfl.ai, sign in and click “Add” to buy additional credits. See also managing your account.
If you require higher volumes, please contact us at flux@blackforestlabs.ai