flux-2-flex/edit(画像編集)
flux-2-flex/edit
FLUX.2 [flex] Edit は Black Forest Labs による高精度な画像編集モデルです。自然言語の指示と16進カラーコードの正確な制御に対応し、一貫したスタジオ品質の結果を実現します。すぐに使える REST 推論 API を提供し、高性能・コールドスタートなし・手頃な価格で利用できます。
サンプル
パラメータ
| 名前 | 型 | 既定 | 制約 | 説明 |
|---|---|---|---|---|
| prompt *プロンプト | textarea | — | ≤ 5000 chars | 生成に使用するポジティブプロンプトです。 |
| images *画像 | image_upload | — | image/* · 1–3 items | 編集用の入力画像 URL の一覧です。入力できる画像は最大3枚です。 |
| sizeサイズ | text | — | ≤ 500 chars | 生成されるメディアのピクセルサイズ(幅×高さ)。 |
| seedシード値 | number | — | step 1 | 生成に使用するシード値です。-1 を指定するとランダムなシード値が使われます。 |
出力フィールド
| フィールド | 型 | 説明 |
|---|---|---|
| images | array<string> |
API
統一 REST API でこのモデルを呼び出せます。API Keys ページでキーを取得してください。
cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/flux-2-flex/edit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "Edit the product photo to create a clean studio-style result: change the background to soft light gray, make the packaging matte white with the accent stripe in #2E7DFF, remove minor reflections and dust, keep the logo and overall shape unchanged, and preserve realistic lighting and shadows.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/a1ab22050817.jpeg"
],
"size": "1024*1024",
"seed": -1
}
}'
# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
-H "Authorization: Bearer YOUR_API_KEY"Python
import time, requests
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# 1) Submit
resp = requests.post(
"https://www.namifusion.com/api/v1/marketplace/run/flux-2-flex/edit",
headers=HEADERS,
json={
"input": {
"prompt": "Edit the product photo to create a clean studio-style result: change the background to soft light gray, make the packaging matte white with the accent stripe in #2E7DFF, remove minor reflections and dust, keep the logo and overall shape unchanged, and preserve realistic lighting and shadows.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/a1ab22050817.jpeg"
],
"size": "1024*1024",
"seed": -1
}
},
)
resp.raise_for_status() # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()
# 2) Poll until a terminal state (completed / failed / cancelled).
# This model is allowed up to 1800s server-side.
deadline = time.time() + 1860
while task.get("status") not in ("completed", "failed", "cancelled"):
if time.time() > deadline:
raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
time.sleep(3)
poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
poll.raise_for_status()
task = poll.json()
print(task["status"], task.get("output"))JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };
// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/flux-2-flex/edit", {
method: "POST",
headers: { ...HEADERS, "Content-Type": "application/json" },
body: JSON.stringify({
"input": {
"prompt": "Edit the product photo to create a clean studio-style result: change the background to soft light gray, make the packaging matte white with the accent stripe in #2E7DFF, remove minor reflections and dust, keep the logo and overall shape unchanged, and preserve realistic lighting and shadows.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/a1ab22050817.jpeg"
],
"size": "1024*1024",
"seed": -1
}
}),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();
// 2) Poll until a terminal state (completed / failed / cancelled).
// This model is allowed up to 1800s server-side.
const deadline = Date.now() + 1860 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
await new Promise((r) => setTimeout(r, 3000));
const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
task = await poll.json();
}
console.log(task.status, task.output);ドキュメント
flux-2-flex/edit(画像編集)
flux-2-flex/edit
FLUX.2 [flex] Edit は Black Forest Labs による高精度な画像編集モデルです。自然言語の指示と16進カラーコードの正確な制御に対応し、一貫したスタジオ品質の結果を実現します。すぐに使える REST 推論 API を提供し、高性能・コールドスタートなし・手頃な価格で利用できます。
パラメータ
| パラメータ | 型 | 必須 | 既定値 | 制限・説明 |
|---|---|---|---|---|
prompt | string | はい | — | max 5000 chars; 生成に使用するポジティブプロンプトです。 |
images | array | はい | — | 1–3 URLs; 編集用の入力画像 URL の一覧です。入力できる画像は最大3枚です。 |
size | string | いいえ | — | max 500 chars; 生成されるメディアのピクセルサイズ(幅×高さ)。 |
seed | integer | いいえ | — | 生成に使用するシード値です。-1 を指定するとランダムなシード値が使われます。 |
Nami の画像入力は単一画像もURL配列です。複数画像の編集は1〜3枚に対応します。
料金
生成画像1枚あたり $0.12(12クレジット)。このエンドポイントは固定料金です。
WaveSpeed 標準定価と同額です。1米ドル=100クレジット。アカウントの割引は別途適用されます。
API
curl -X POST https://www.namifusion.com/api/v1/marketplace/run/flux-2-flex/edit \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input": {
"prompt": "Edit the product photo to create a clean studio-style result: change the background to soft light gray, make the packaging matte white with the accent stripe in #2E7DFF, remove minor reflections and dust, keep the logo and overall shape unchanged, and preserve realistic lighting and shadows.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/a1ab22050817.jpeg"
],
"size": "1024*1024",
"seed": -1
}
}'
curl 'https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID' \
-H "Authorization: Bearer $API_KEY"
送信応答の task_uuid で completed または failed までポーリングします。成功時の出力:output.images(URL配列)。このAPIは非同期でURLを返します。
関連モデル
xAI Grok Imagine Image v2.0 画像編集
xAI Grok Imagine Image V2.0 Edit は、テキストによるプロンプトを使って入力画像を編集できるモデルです。解像度と品質を設定でき、精密な画像編集、ビジュアル調整、クリエイティブなバリエーション、SNS コンテンツ、マーケティング素材、制作ワークフローに適しています。すぐに使える REST 推論 API を提供し、高性能・コールドスタートなし・手頃な価格で利用できます。
qwen-image-edit-spicy
テキスト指示で画像を精密に編集。要素の追加・削除・変更、スタイル変換、背景置換に対応し、写真補正やビジュアルデザインに適しています。
Qwen Image 3.0 Pro Edit|高速画像編集
Qwen Image 3.0 Pro Edit は、優れた画質と高度な指示理解を備えたプロ向けの画像編集モデルです。最大 2k に対応。すぐに使える REST inference API を提供し、高性能、コールドスタートなし、手頃な価格で利用できます。
OpenAI GPT Image 2.5 Sunburst 画像編集
最大 16 枚の参照画像を使用し、高精細で正確な画像編集を行います。
OpenAI GPT Image 2.5 Flare 画像編集
自然言語の指示と最大 16 枚の参照画像を使用して、高速でバランスの取れた画像編集を行います。
ヘッドスワップ(画像)
namifusion/head-swap/image-edit. 画像・動画・顔交換のモデル API を閲覧。試してから統一 REST API で統合。
Nano Banana 画像編集
高速・低価格な編集。 マスキング不要で、直感的なオブジェクト置換やスタイル変換が可能。
Nano Banana Pro 画像編集
4K セマンティック編集。自然言語で画像を修正。文脈認識と画像内多言語テキスト編集に対応。