Skip to content

モデル blf_flux

  • 2026.01.21 flux-2-klein-4bflux-2-klein-9b をサポート開始
  • 2025.12.01 flux-2-max をサポート開始
  • 2025.11.26 flux-2-proflux-2-flex をサポート開始
  • 2025.06.09 このサイトは bfl.ai の flux 関連モデルをサポート開始
  • サポートされるモデルには flux-kontext-max flux-kontext-pro flux-pro-1.1-ultra flux-pro-1.1 flux-pro flux-dev などが含まれます

価格と請求

  • 価格は bfl.ai のレート 4 に基づいています
  • 10月21日: bfl のアカウントリスク管理の問題により、23:00 に価格が 1:4 のレートに引き上げられました
  • 例: 公式の flux-dev は $0.025/画像ですが、このサイトでは ¥0.075/画像、つまり 750 クレジット/画像です
  • 公式価格表: https://bfl.ai/pricing

flux-2 請求に関する注意事項

  • レスポンスには cost フィールドが含まれます
  • 1 cost = $0.01、レートを掛けて CNY でのクレジットを取得します
  • flux-2-pro3cost から、flux-2-flex6cost から始まります
  • 請求は入力画像と出力画像のサイズに関連しています
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, //これが請求に使用されます
  "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, //これが請求に使用されます
  "input_mp": 0,
  "output_mp": 1.98
}

BFL_Flux API

  • ヘッダーに Authorization: Bearer your-key を使用します(公式サイトでは x-key を使用)
  • 公式の https://api.bfl.ai/v1https://api.openai-hk.com/bfl/v1 に置き換えます
  • 公式ヘルプドキュメントリファレンス

1. タスクの作成

post https://api.openai-hk.com/bfl/v1/{model}

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"
}'

レスポンスボディ

json
{
  "id": "9dd30d68-4995-4c7b-97e5-9d1943bfc727"
}
{
  "id": "9dd30d68-4995-4c7b-97e5-9d1943bfc727"
}

返された id は、次のステップでタスク結果を取得するために使用する task_id です。

2. タスクの取得

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'

レスポンスボディ

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
}
  • statusReady の場合、画像 URL は result.sample で利用可能です
  • 注意: result.sample の画像 URL には 有効期限 があり、期限切れになります

3. 幅/高さの範囲

モデル範囲
flux-2-flex幅/高さ x >= 64、32 の倍数である必要があります
flux-2-pro幅/高さ x >= 64、32 の倍数である必要があります
flux-2-max幅/高さ x >= 64、32 の倍数である必要があります
flux-pro-1.1幅/高さ 256 <= x <= 1440、32 の倍数である必要があります
flux-dev幅/高さ 256 <= x <= 1440、32 の倍数である必要があります
flux-pro-1.1-ultra幅/高さはサポートされていません、アスペクト比をサポート
flux-kontext-pro幅/高さはサポートされていません、アスペクト比をサポート
flux-kontext-max幅/高さはサポートされていません、アスペクト比をサポート
  • 参考アスペクト比: "1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21"
  • flux-2 はカスタム幅/高さをサポートしていますが、請求はサイズに関連していることに注意してください