機能 · ゴーストマネキン
ゴーストマネキン API ゴーストマネキン商品写真向け
要約
Photta のゴーストマネキン API は、マネキン着用の衣服写真を受け取り、衣服の内部を再構築したインビジブルマネキン画像を返します。3d または flat_lay のスタイルを選択し、POST 送信、3秒ごとにポーリングし、completed 時にダウンロードします。
- 所要時間の目安: 1.5–4 min
- Credits: 2Kで4 credits · 4Kで5 credits
- 処理方式: 非同期、ポーリング
- 制限: 600 リクエスト/分
- 認証: Bearerキー
このページに記載されている数値はすべて以下に基づきます: Photta APIドキュメント · 確認済み
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front",
"angle": "side",
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, cream interior lining",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/ghost-mannequin", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front",
"angle": "side",
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, cream interior lining",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/ghost-mannequin",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front",
"angle": "side",
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, cream interior lining",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
},
)
data = res.json()["data"] # data["id"], data["status"]
概要
概要
- エンドポイント
- POST /api/v1/ghost-mannequin
- 認証
- Bearer APIキー
- 処理方式
- 非同期 — ステータスエンドポイントをポーリング
- 所要時間の目安
- 1.5–4 min
- Credits
- 2Kで4 credits · 4Kで5 credits
- アスペクト比
- 3:4 · 1:1 · 4:3 · 9:16 · 16:9
- 入力制限
- 1画像あたり最大10 MB、JPEG, PNG, WebP
- 冪等性
- なし
リクエストとレスポンス
リクエスト
RESPONSE=$(curl -s -X POST https://api.photta.app/api/v1/ghost-mannequin \
-H "Authorization: Bearer $PHOTTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front",
"angle": "side",
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, cream interior lining",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}')
ID=$(echo "$RESPONSE" | jq -r '.data.id')const res = await fetch("https://api.photta.app/api/v1/ghost-mannequin", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PHOTTA_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front",
"angle": "side",
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, cream interior lining",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
}),
});
const { data } = await res.json(); // data.id, data.statusimport os, requests
res = requests.post(
"https://api.photta.app/api/v1/ghost-mannequin",
headers={"Authorization": f"Bearer {os.environ['PHOTTA_API_KEY']}"},
json={
"product_image": "https://cdn.yourstore.com/products/jacket-front.jpg",
"back_image": "https://cdn.yourstore.com/products/jacket-back.jpg",
"image_side": "front",
"angle": "side",
"style": "3d",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"user_instruction": "closed front, cream interior lining",
"brand_label_id": "7cc9f988-068b-44cd-8004-22f486b10e67"
},
)
data = res.json()["data"] # data["id"], data["status"]202 Accepted / Completed
{
"data": {
"id": "gm_d4e5f6",
"status": "processing",
"style": "3d",
"angle": "side",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"credits_used": 4,
"created_at": "2026-04-10T16:00:00Z"
},
"request_id": "req_gm001"
}{
"data": {
"id": "gm_d4e5f6",
"status": "completed",
"style": "3d",
"angle": "side",
"background_color": "white",
"resolution": "2K",
"aspect_ratio": "3:4",
"output_url": "https://cdn.photta.app/generated/gm_d4e5f6.jpg",
"thumbnail_url": "https://cdn.photta.app/generated/gm_d4e5f6-thumb.jpg",
"credits_used": 4,
"created_at": "2026-04-10T16:00:00Z",
"completed_at": "2026-04-10T16:00:48Z",
"duration_ms": 48000
},
"request_id": "req_gm002"
}リクエストパラメータ
product_image型: string必須
URL or base64 data URI of the garment photo (front or back, on a mannequin or flat).
back_image型: string
URL or base64 data URI of the opposite side — helps the AI reconstruct the interior of the garment for a more realistic 3D effect.
image_side型: string
Which side product_image represents.
= front
値:frontbackangle型: string
Camera angle for the output. "side" is worth calling out: the side view is reconstructed from the front photo (plus the back photo when provided), giving you a third catalog view without a third photoshoot — and it works well even on textured garments (crochet, lace, embroidery).
= straight
値:straightbacksidestyle型: string
Output style: "3d" (ghost mannequin with 3D body shape) or "flat_lay" (garment laid flat, mannequin removed).
= 3d
値:3dflat_laybackground_color型: string
Background color.
= white
値:whitegraybeigeblackresolution型: string
Output resolution. "2K" costs 4 credits per image; "4K" costs 5 credits per image. 4K is produced natively in a single generation — pick it upfront; the resolution cannot be changed after creation. Note: 4K cannot be combined with aspect_ratio 1:1 — that combination returns 400.
= 2K
値:2K4Kaspect_ratio型: string
Output aspect ratio. Note: 1:1 is not available at 4K resolution — 1:1 combined with 4K returns 400.
= 3:4
値:3:41:14:39:1616:9user_instruction型: string
Optional free-form note, max 400 characters (anything longer is silently truncated). A guarded steer for ambiguous rendering choices — e.g. "closed front", "cream interior lining", "buttoned up" — it never overrides the source garment, brand label, or structural reconstruction, and it is explicitly NOT a determinism/seed control.
brand_label_id型: string
Brand label UUID returned by the Brand Labels API. Applied to the generated garment when present. API v1 request fields use snake_case; use brand_label_id.
エラー
- 400
invalid_request_error - The request is malformed or contains invalid parameters.
- 401
authentication_error - The API key is missing, invalid, or expired.
- 402
insufficient_credits_error - Your account does not have enough credits.
- 404
not_found_error - The requested resource does not exist.
- 409
conflict_error - The request conflicts with current state — e.g. your concurrent-batch cap is reached.
- 429
rate_limit_error - Too many requests. Slow down and retry.Retry-After: 30
- 500
api_error - An internal server error occurred. Retry later.
制限
- APIキーごとに毎分600リクエスト (固定ウィンドウ方式。制限値はすべてのプランで共通です)
- 429にはRetry-After: 30 secondsが含まれます
- 1画像あたり最大10 MB
- フォーマット: JPEG, PNG, WebP
- プランごとの同時実行バッチ数: Free 1 · Hobby 2 · Seller 3 · Brand 4 · Studio 6
- ポーリングのみ — APIはWebhookを送信しません。
写真1枚の入力で、ゴーストマネキン写真1枚を出力
元画像をアップロードし、スタイルを選択、送信、ポーリング、ダウンロード。
ステップ 1
APIキーを生成
ゴーストマネキンは他のすべてのPhotta機能と同じ認証情報を使用します — 1つのキー、共通のクレジット残高。
ステップ 2
元写真をアップロード
`product_image`に公開URLまたはbase64データURIを渡します。背面ビューがある場合は`back_image`を追加します。画像1枚につき10 MBまでのJPEG、PNG、WebPに対応。
ステップ 3
ゴーストマネキンのジョブをPOST
`/api/v1/ghost-mannequin`に`product_image`、`style`(`3d`または`flat_lay`)、および任意の`angle`、`background_color`、`resolution`を指定してPOSTします。完了通知はポーリングのみです — APIはWebhookを送信しません。
ステップ 4
ジョブが完了するまでポーリング
`data.status`が`completed`または`failed`になるまで、3秒ごとにGET `/api/v1/ghost-mannequin/:id`を実行します。一般的な所要時間は1.5〜4分です。
ステップ 5
ダウンロードして永続化
出力は、マネキンが除去され衣服の内側が再構築されたPNGです。PDPのゴーストショット、立体感のある商品ギャラリー、平置きインサートに最適です。
Node.js、Python、cURLで共通のエンドポイント
Node.js
Node.jsでのゴーストマネキン API
ネイティブのfetchを使用してNode.jsバックエンドからPhottaのゴーストマネキン APIを呼び出します。SDKは不要です。キーを保存し、ジョブを送信して、結果をポーリングするだけです。
読むPython
Python での ゴーストマネキン API
requests ライブラリを使用して Python で Photta の ゴーストマネキン API を呼び出します。30行のラッパーで、httpx による非同期対応も可能であり、Django、FastAPI、Celery で動作します。
読むcURL
cURLによるゴーストマネキン API
cURLを使用してシェルから直接Phottaのゴーストマネキン APIを呼び出します。送信、ポーリング、ダウンロード — すべてのスニペットはスクリプトパイプライン向けにjqと連携可能です。
読む
ゴーストマネキンの実装前によくある質問
ゴーストマネキン撮影とは何ですか?
衣服が見えないマネキンに着用されているように見せ、形状と内側の構造を同時に確認できるPDP向けの処理です。従来はスタジオで撮影した複数の写真を合成していましたが、PhottaのAPIならマネキン着用の写真1枚から、1回のAPI呼び出しで生成できます。
ゴーストマネキンの料金はいくらですか?
2Kで4 credits、4Kで5 creditsです — 各ティアともtry-onより1 credit低価格です。失敗したジョブのクレジットは自動的に返金されます。
3Dスタイルと平置きスタイルの違いは何ですか?
`3d`スタイルはマネキンの立体的な体型を維持します — 衣服のボリュームが保たれ、肩や袖が自然に見え、内側が再構築されます。`flat_lay`は衣服をすっきりとした2Dの平置きレイアウトに変換し、統一された正面形状が求められるカプセルコレクションやマーケットプレイスの出品に最適です。
複数の写真をバッチ処理できますか?
はい。元画像の配列を指定して`/api/v1/ghost-mannequin/batch`にPOSTします。レスポンスとしてバッチIDとアイテムごとの生成IDが返されます。全体のステータスは`/api/v1/ghost-mannequin/batch/:id`で、または各アイテムを個別にポーリングします。
内側の縫い目やラベルは維持されますか?
はい — モデルは一般的なテクスチャを推測生成するのではなく、衣服の内側(襟ぐりの内側、袖口の内側、ウエストバンドの裏地)を再構築します。元の写真に見えているタグやプリントラベルも可能な限り維持されます。
結果はどのようにポーリングしますか?
3秒ごとにGET `/api/v1/ghost-mannequin/:id`を実行します。バッチジョブの場合は親エンドポイントをポーリングすると、全体のステータスとアイテムごとの詳細が返されます。
関連機能
機能一覧
バーチャルtry-on API アパレル向け
AIマネキンにアパレルを着せるREST API。非同期処理、生成時間は1.5〜4分、2Kで5クレジット、4Kで6クレジット。cURL、Node.js、Pythonのサンプルコードあり。
エンドポイントを見る機能一覧
ジュエリー try-on API ネックレス、リング、ブレスレット、イヤリングに対応
REST 経由でネックレス、指輪、ブレスレット、イヤリングを AI モデルに配置。2K で 5 credits、クローズアップマネキンを内蔵、Photta のドキュメントに基づく反射を考慮したレンダリング。
エンドポイントを見る実装
カタログのゴーストマネキン抽出を自動化する
夜間カタログ自動化のレシピ: 前日の製品更新を取得し、PhottaのゴーストマネキンAPIへバッチ送信、親バッチをポーリングして、データベースに永続化します。
エンドポイントを見る比較
Photta vs Pixazo — ファーストパーティパイプラインか、モデルアグリゲーターか
Photta vs Pixazoの比較:ファーストパーティ製ファッションパイプラインとマルチモデルアグリゲーター。エンドポイント、レイテンシ、無料枠、トレードオフ。2026-04-19取得。
エンドポイントを見るクイックスタート
5 分以内に最初の Photta 画像を生成。
サインアップ、API キーの生成、最初の cURL 呼び出しの実行、完了までのポーリング、結果の保存。エンドツーエンドで文書化された 5 つのステップ。
エンドポイントを見るリファレンス
Photta APIのエラー
ステータスコード別のPhotta APIエラータイプ一覧、エラーボディの構造、およびリトライすべき障害。
エンドポイントを見るリファレンス
Photta APIのレートリミット
Photta APIのレートリミット、ウィンドウ幅、Retry-Afterヘッダー、ポーリング間隔、プラン別の同時実行上限など、APIドキュメントに記載された仕様です。
エンドポイントを見る
このページに記載されている数値はすべて以下に基づきます: Photta APIドキュメント · 確認済み
5分でAPIを試す
Photta APIキーを生成し、上記のcURLスニペットを貼り付ければ、コーヒーが淹れ終わる前に最初のモデル着用画像が手に入ります。
- 1.5–4 min
- 2Kで4 credits · 4Kで5 credits
- 非同期、ポーリング
- 600 リクエスト/分
- Bearerキー