ヘッドスワップ(画像)
namifusion/head-swap/image-edit
Swap the head in a photo with the head from a reference image. Upload the target photo first, then the head reference.
パラメータ
| 名前 | 型 | 既定 | 制約 | 説明 |
|---|---|---|---|---|
| images *Images | image_upload_group | — | 2–2 items | Exactly 2 images: [0] target photo, [1] head reference |
出力フィールド
| フィールド | 型 | 説明 |
|---|---|---|
| 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/namifusion/head-swap/image-edit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"images": [
"https://example.com/input.jpg"
]
}
}'
# 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/namifusion/head-swap/image-edit",
headers=HEADERS,
json={
"input": {
"images": [
"https://example.com/input.jpg"
]
}
},
)
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 600s server-side.
deadline = time.time() + 660
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/namifusion/head-swap/image-edit", {
method: "POST",
headers: { ...HEADERS, "Content-Type": "application/json" },
body: JSON.stringify({
"input": {
"images": [
"https://example.com/input.jpg"
]
}
}),
});
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 600s server-side.
const deadline = Date.now() + 660 * 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);ドキュメント
Head Swap (Image)
Swaps the head in a photo with the head from a reference image.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
| images | array of exactly 2 image URLs | yes | [0] target photo, [1] head reference |
The order matters: upload the target photo first, then the head reference image second.
Output
images[0]: the edited image URL (1024x1024)
Pricing: 15 credits per image.
関連モデル
Nami Qwen I2I Spicy
自然言語の指示で参照画像を編集し、変更を指定していない部分をできるだけ保持します。
Nano Banana 画像編集
高速・低価格な編集。 マスキング不要で、直感的なオブジェクト置換やスタイル変換が可能。
Nano Banana Pro 画像編集
4K セマンティック編集。自然言語で画像を修正。文脈認識と画像内多言語テキスト編集に対応。
Nano Banana 2 画像編集
4K セマンティック編集。自然言語で画像を修正。文脈認識と画像内多言語テキスト編集に対応。
Seedream V5.0 Pro Edit 画像編集・生成 API
ByteDance の Seedream V5.0 Pro Edit は、単一画像または複数の参照画像をもとに画像の編集・生成を行えます。最大 10 枚の参照画像に対応し、アスペクト比の選択と 1K / 2K の出力階層をサポートしています。すぐに使える REST 推論 API で、高性能、コールドスタートなし、手頃な価格です。
Seedream 5.0 Lite Edit Sequential
Seedream 5.0 Lite Edit Sequentialは、複数画像の編集を行いながら、キャラクターやオブジェクトの一貫性をショット間で維持します。主要な被写体を検出し、連続性を保ちながら制御された編集を適用し、最大4K出力に対応しています。すぐに使用可能なREST推論APIを提供し、最高のパフォーマンス、コールドスタートなし、手頃な価格を実現。
Seedream 5.0 Edit
Seedream 5.0 Lite Edit は、参照画像の顔の特徴、照明、色調を保持する最先端の画像編集モデルです。高忠実度の編集をサポートし、プロフェッショナル品質、優れたプロンプト対応能力、最大 4K 解像度に対応しています。すぐに使用可能な REST 推論 API を提供し、優れたパフォーマンス、コールドスタートなし、手頃な価格を実現しています。
Seedream 4.5 Edit Sequential
Seedream 4.5 Edit Sequential は、複数画像の編集を行いながら、キャラクターやオブジェクトの一貫性をショット間で維持します。主要な被写体を検出し、連続性を保ちながら制御された編集を実現し、最大 4K 出力に対応しています。すぐに使用可能な REST 推論 API を提供し、最高のパフォーマンス、コールドスタートなし、手頃な価格を実現。