flux-2-klein-4b/edit
flux-2-klein-4b/edit
FLUX.2 [klein] 4B Edit は、自然言語の指示による高精度な画像編集と、複数の参照画像入力に対応しています。すぐに使える REST 推論 API を提供し、高性能・コールドスタートなし・手頃な価格で利用できます。
サンプル
パラメータ
| 名前 | 型 | 既定 | 制約 | 説明 |
|---|---|---|---|---|
| prompt *プロンプト | textarea | — | ≤ 5000 chars | |
| images *画像 | image_upload | — | image/* · 1–3 items | 参照画像の URL リスト(1〜3枚)。 |
| sizeサイズ | text | — | ≤ 500 chars | |
| seedシード値 | number | — | step 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-klein-4b/edit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "Edit the reference image to create a clean, modern product-style portrait while preserving the subject'\''s identity and overall composition. Replace the background with a softly lit neutral studio backdrop, enhance facial detail naturally, improve lighting balance, and refine colors for a polished professional look. Keep the clothing and pose consistent with the original image.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/05/0c0ed13e8e0f.jpeg"
],
"size": "1024*1024",
"seed": 42
}
}'
# 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-klein-4b/edit",
headers=HEADERS,
json={
"input": {
"prompt": "Edit the reference image to create a clean, modern product-style portrait while preserving the subject's identity and overall composition. Replace the background with a softly lit neutral studio backdrop, enhance facial detail naturally, improve lighting balance, and refine colors for a polished professional look. Keep the clothing and pose consistent with the original image.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/05/0c0ed13e8e0f.jpeg"
],
"size": "1024*1024",
"seed": 42
}
},
)
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-klein-4b/edit", {
method: "POST",
headers: { ...HEADERS, "Content-Type": "application/json" },
body: JSON.stringify({
"input": {
"prompt": "Edit the reference image to create a clean, modern product-style portrait while preserving the subject's identity and overall composition. Replace the background with a softly lit neutral studio backdrop, enhance facial detail naturally, improve lighting balance, and refine colors for a polished professional look. Keep the clothing and pose consistent with the original image.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/05/0c0ed13e8e0f.jpeg"
],
"size": "1024*1024",
"seed": 42
}
}),
});
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-klein-4b/edit
flux-2-klein-4b/edit
FLUX.2 [klein] 4B Edit は、自然言語の指示による高精度な画像編集と、複数の参照画像入力に対応しています。すぐに使える REST 推論 API を提供し、高性能・コールドスタートなし・手頃な価格で利用できます。
パラメータ
| パラメータ | 型 | 必須 | 既定値 | 制限・説明 |
|---|---|---|---|---|
prompt | string | はい | — | max 5000 chars |
images | array | はい | — | 1–3 URLs; 参照画像の URL リスト(1〜3枚)。 |
size | string | いいえ | — | max 500 chars |
seed | integer | いいえ | — |
Nami の画像入力は単一画像もURL配列です。複数画像の編集は1〜3枚に対応します。
料金
生成画像1枚あたり $0.012(1.2クレジット)。このエンドポイントは固定料金です。
WaveSpeed 標準定価と同額です。1米ドル=100クレジット。アカウントの割引は別途適用されます。
API
curl -X POST https://www.namifusion.com/api/v1/marketplace/run/flux-2-klein-4b/edit \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input": {
"prompt": "Edit the reference image to create a clean, modern product-style portrait while preserving the subject'"'"'s identity and overall composition. Replace the background with a softly lit neutral studio backdrop, enhance facial detail naturally, improve lighting balance, and refine colors for a polished professional look. Keep the clothing and pose consistent with the original image.",
"images": [
"https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/05/0c0ed13e8e0f.jpeg"
],
"size": "1024*1024",
"seed": 42
}
}'
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 セマンティック編集。自然言語で画像を修正。文脈認識と画像内多言語テキスト編集に対応。