Model blf_flux
- 2026.01.21 Now supports
flux-2-klein-4bandflux-2-klein-9b - 2025.12.01 Now supports
flux-2-max - 2025.11.26 Now supports
flux-2-proandflux-2-flex - 2025.06.09 This site now supports flux-related models from bfl.ai
- Supported models include
flux-kontext-maxflux-kontext-proflux-pro-1.1-ultraflux-pro-1.1flux-proflux-devand more
Pricing and Billing
- Prices are based on bfl.ai exchange rate of 4
- Oct 21: Due to account risk control issues at bfl, prices increased to a 1:4 exchange rate at 23:00
- Example: official
flux-devis $0.025/image, this site charges ¥0.075/image, which equals 750 credits/image - Official pricing table: https://bfl.ai/pricing
flux-2 Billing Notes
- The response will include a
costfield - 1
cost= $0.01, multiply by the exchange rate to get credits in CNY flux-2-prostarts from3cost,flux-2-flexstarts from6cost- Billing is related to the size of input and output images
json
{
"id": "2fa25140-591f-4839-b377-9945a7a3881a",
"polling_url": "https://api.eu2.bfl.ai/v1/get_result?id=2fa25140-591f-4839-b377-9945a7a3881a",
"cost": 4.5, //this is used for billing
"input_mp": 0,
"output_mp": 1.98
}{
"id": "2fa25140-591f-4839-b377-9945a7a3881a",
"polling_url": "https://api.eu2.bfl.ai/v1/get_result?id=2fa25140-591f-4839-b377-9945a7a3881a",
"cost": 4.5, //this is used for billing
"input_mp": 0,
"output_mp": 1.98
}BFL_Flux API
- Use
Authorization: Bearer your-keyin the header (the official site usesx-key) - Replace the official
https://api.bfl.ai/v1withhttps://api.openai-hk.com/bfl/v1 - Official help documentation reference
1. Create a Task
shell
curl --request POST \
--url https://api.openai-hk.com/bfl/v1/flux-dev \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Elephant fights tiger",
"width": 1024,
"height": 768,
"steps": 28,
"prompt_upsampling": false,
"seed": 42,
"guidance": 3,
"safety_tolerance": 2,
"output_format": "jpeg"
}'curl --request POST \
--url https://api.openai-hk.com/bfl/v1/flux-dev \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "Elephant fights tiger",
"width": 1024,
"height": 768,
"steps": 28,
"prompt_upsampling": false,
"seed": 42,
"guidance": 3,
"safety_tolerance": 2,
"output_format": "jpeg"
}'Response body
json
{
"id": "9dd30d68-4995-4c7b-97e5-9d1943bfc727"
}{
"id": "9dd30d68-4995-4c7b-97e5-9d1943bfc727"
}The returned id is the task_id to be used in the next step to retrieve the task result.
2. Retrieve a Task
get https://api.openai-hk.com/bfl/v1/get_result?id={task_id}
shell
curl --request GET \
--url 'https://api.openai-hk.com/bfl/v1/get_result?id=f5295e95-191c-4fcd-abfb-236e67226f60' \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json'curl --request GET \
--url 'https://api.openai-hk.com/bfl/v1/get_result?id=f5295e95-191c-4fcd-abfb-236e67226f60' \
--header 'Authorization: Bearer hk-your-key' \
--header 'Content-Type: application/json'Response body
json
{
"id": "f5295e95-191c-4fcd-abfb-236e67226f60",
"status": "Ready",
"result": {
"sample": "https://delivery-us1.bfl.ai/results/9a/99533669e7979a/69e7979af22842ca9e28a0434285868d/sample.jpeg?se=2025-06-09T14%3A16%3A35Z&sp=r&sv=2024-11-04&sr=b&rsct=image/jpeg&sig=Sk6Gg/sYyC/8ntQzyJaSG6KGZT%2B7HtMz9NyQy1l0608%3D",
"prompt": "Elephant fights tiger",
"seed": 42,
"start_time": 1749477991.4603546,
"end_time": 1749477995.6950064,
"duration": 4.234651803970337
},
"progress": null,
"details": null
}{
"id": "f5295e95-191c-4fcd-abfb-236e67226f60",
"status": "Ready",
"result": {
"sample": "https://delivery-us1.bfl.ai/results/9a/99533669e7979a/69e7979af22842ca9e28a0434285868d/sample.jpeg?se=2025-06-09T14%3A16%3A35Z&sp=r&sv=2024-11-04&sr=b&rsct=image/jpeg&sig=Sk6Gg/sYyC/8ntQzyJaSG6KGZT%2B7HtMz9NyQy1l0608%3D",
"prompt": "Elephant fights tiger",
"seed": 42,
"start_time": 1749477991.4603546,
"end_time": 1749477995.6950064,
"duration": 4.234651803970337
},
"progress": null,
"details": null
}- If
statusisReady, the image URL is available inresult.sample - Note: the image URL in
result.samplehas atime limitand will expire
3. Width/Height Ranges
| Model | Range |
|---|---|
| flux-2-flex | Width/height x >= 64, must be a multiple of 32 |
| flux-2-pro | Width/height x >= 64, must be a multiple of 32 |
| flux-2-max | Width/height x >= 64, must be a multiple of 32 |
| flux-pro-1.1 | Width/height 256 <= x <= 1440, must be a multiple of 32 |
| flux-dev | Width/height 256 <= x <= 1440, must be a multiple of 32 |
| flux-pro-1.1-ultra | Does not support width/height, supports aspect ratio |
| flux-kontext-pro | Does not support width/height, supports aspect ratio |
| flux-kontext-max | Does not support width/height, supports aspect ratio |
- Reference aspect ratios: "1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21"
- flux-2 supports custom width/height, but note that billing is tied to the dimensions
OpenAi-HK