Flux Fill Pro icon

Flux Fill Pro API

マスクによるインペイント、またはキャンバスを拡張するアウトペイント。

Flux Fill Pro を1回のAPIコールで統合できます。1つのキー、1つの統一エンドポイント、そしてApiframe上のすべてのモデルで共通の請求。

model: "flux-fill-pro"

Flux Fill Pro の特長

  • 画像から画像への編集と参照画像に対応。
  • 高速処理 — 1回の生成あたり平均約15秒。
  • Black Forest Labs のアカウント不要の従量課金。成功した生成分だけお支払いいただきます。
  • Apiframe のすべてのモデルで、1つのAPIキー・統一請求・冪等性・Webhookに対応。

Flux Fill Pro で試したいプロンプト

Apiframeの Flux Fill Pro API で実行できるプロンプト例です。

Mask the old sign on the storefront and replace it with a clean blue sign reading 'OPEN'.

Remove the parked car from the driveway and fill the space with matching pavement.

Extend this portrait outward to a wider 16:9 frame, continuing the background naturally.

Paint over the model's jacket and change it to a tan trench coat, keeping the lighting consistent.

Fill the empty wall behind the sofa with a large framed landscape painting.

Expand the top of this product photo to add headroom for a banner headline.

概要

エンドポイント
POST /v2/images/edit
モデルID
flux-fill-pro
パラメータキー
fluxFillParams
モダリティ
画像
プロバイダー
Black Forest Labs
平均完了時間
~15s

機能

画像入力対応
平均時間~15秒

クイックスタート

APIキーを添えて POST /v2/images/edit に1回リクエストを送るだけで Flux Fill Pro による生成が始まります。レスポンスには、ポーリングまたはWebhookで受け取れる jobId が返ります。

curl -X POST https://api.apiframe.ai/v2/images/edit \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-fill-pro",
        "fluxFillParams": {
            "image": "https://example.com/input.jpg",
            "mode": "inpaint",
            "mask": "https://example.com/input.jpg",
            "outpaint": "Zoom out 1.5x"
        }
    }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/edit",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-fill-pro",
        "fluxFillParams": {
            "image": "https://example.com/input.jpg",
            "mode": "inpaint",
            "mask": "https://example.com/input.jpg",
            "outpaint": "Zoom out 1.5x"
        }
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }
const response = await fetch("https://api.apiframe.ai/v2/images/edit", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
    "model": "flux-fill-pro",
    "fluxFillParams": {
      "image": "https://example.com/input.jpg",
      "mode": "inpaint",
      "mask": "https://example.com/input.jpg",
      "outpaint": "Zoom out 1.5x"
    }
  }),
});
const { jobId } = await response.json();
console.log(jobId);

レスポンスとジョブのライフサイクル

生成は非同期で行われます。送信が成功すると 202 AcceptedjobId が返ります。ステータスが COMPLETED になるまで GET /v2/jobs/{id} をポーリングする(または webhook_url を指定する)と、result フィールドに出力URLが格納されます。

1. 送信レスポンス (202)

{
  "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "status": "QUEUED"
}

2. 結果をポーリング

curl https://api.apiframe.ai/v2/jobs/JOB_ID \
  -H "X-API-Key: afk_your_api_key_here"
import requests, time

while True:
    job = requests.get(
        "https://api.apiframe.ai/v2/jobs/JOB_ID",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)
print(job["result"])
let job;
do {
  await new Promise((r) => setTimeout(r, 2000));
  job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
    headers: { "X-API-Key": "afk_your_api_key_here" },
  }).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);

入力スキーマ

Flux Fill Pro エンドポイントが受け付けるリクエストパラメータです。モデル固有のオプションは、下記のパラメータオブジェクトの中にネストされます。

パラメータ 必須 デフォルト 許可値 / 範囲 説明
prompt string 必須 生成する内容のテキスト説明。
model string 必須 "flux-fill-pro" "flux-fill-pro" このエンドポイントのモデル識別子。
fluxFillParams.image string (URL) 任意 Source image (URL)
fluxFillParams.mode string 任意 "inpaint" "inpaint", "outpaint" Mode
fluxFillParams.mask string (URL) 任意 White = repaint, black = keep. Required for inpaint.
fluxFillParams.outpaint string 任意 "Zoom out 1.5x" "Zoom out 1.5x", "Zoom out 2x", "Make square", "Left outpaint", "Right outpaint", "Top outpaint", "Bottom outpaint" Required for outpaint mode.
fluxFillParams.prompt string 任意 Prompt
fluxFillParams.prompt_upsampling boolean 任意 false Prompt upsampling
fluxFillParams.steps number 任意 50 min 1, max 50, step 1 Steps
fluxFillParams.guidance number 任意 3 min 2, max 5, step 0.1 Guidance
fluxFillParams.safety_tolerance number 任意 2 min 1, max 6, step 1 1 = strictest, 6 = most permissive.
fluxFillParams.output_format string 任意 "jpg" "jpg", "png" Output format
fluxFillParams.seed number 任意 step 1 Reuse a number to reproduce the same result.

よくある質問

Flux Fill Pro APIに関するよくある質問をまとめました。

Flux Fill Pro の API はありますか?

はい。Apiframe は単一の REST エンドポイント(`POST /v2/images/edit`、`model: "flux-fill-pro"`)で Flux Fill Pro を提供します。対応するすべてのモデルで、統一されたAPI・キー・請求をご利用いただけ、Black Forest Labs の個別アカウントは不要です。

Flux Fill Pro API の料金はいくらですか?

Flux Fill Pro は Apiframe のシンプルな従量課金制で、成功した生成分のみお支払いいただきます。プランと数量割引は料金ページをご覧ください。

Flux Fill Pro API はどのように呼び出しますか?

`X-API-Key` と、`model: "flux-fill-pro"` を含む JSON ボディを添えて `/v2/images/edit` に POST リクエストを送ります。レスポンスで返る `jobId` を `GET /v2/jobs/{id}` でポーリングするか、Webhook で結果を受け取ります。

Flux Fill Pro はどんなパラメータに対応していますか?

Flux Fill Pro は、共通の `prompt`・`webhook_url` に加えて、`fluxFillParams` の下にネストされた 11 個のモデル固有パラメータを受け付けます。型やデフォルト値を含む一覧は上記の入力スキーマをご覧ください。

解決しませんでしたか?

Flux Fill Pro API で開発を始めよう

APIキーを取得すれば数分で Flux Fill Pro を統合できます — 従量課金。

無料クレジットですぐに開始
すべてのモデルを1つのAPIで
Webhook・SDK・冪等性に対応
プロバイダーのアカウント不要

ご質問はありますか? Discordに参加 または 営業に問い合わせる