PopNowAPI ドキュメント
本文

OpenJutsu Object Swap API リファレンス

クリップ内のジャケット、髪、商品、背景全体を差し替え、動きと音声はそのまま

PopNow の API キー 1 つで、OpenJutsu Object Swap を自分のコードから呼び出せます。送るモデル ID、受け付ける入力フィールド、1 回あたりの料金(USD)、ターミナルに貼ってそのまま動くリクエストをこのページにまとめました。

パラメーターの説明はモデルの入力 schema から取っているため、英語のみです。

概要

開発元
ComfyUI
出力
動画
最安
$0.105 USD 出力 1 秒あたり
目安の所要時間
約 168 秒

料金は USD で表示され、PopNow の残高から差し引かれます。受付時に最大料金を確保し、完了後に実際の使用量で精算して差額を返却します。失敗したタスクは課金されません。実行前の正確な見積もりは POST /api/v1/jobs/quote で取得できます。

オブジェクト置き換え

comfyui/openjutsu-object-swap/video-edit

料金

オプションUSD
480p$0.105 出力 1 秒あたり
540p$0.119 出力 1 秒あたり
768p$0.14 出力 1 秒あたり
1080p$0.28 出力 1 秒あたり

パラメーター

フィールド型既定値指定できる値説明
video_url必須string——Source clip, one continuous shot. Up to 15 seconds; the camera, motion and the original audio are kept.
edit_target必須string—120 文字までWhat to change, in a word or two as it looks in the clip: hair, jacket, car. Separate several with commas. In background mode, what stays.
edit_mode任意stringchangechange, backgroundchange replaces the named thing. background keeps it and replaces everything around it.
prompt任意string—600 文字までWhat it becomes, such as "a black leather biker jacket"; in background mode, the new place. Required unless you send a reference image.
reference_image_url任意string——Optional picture to copy the look from: an outfit, a hairstyle, a product or a place.
resolution任意string768p480p, 540p, 768p, 1080pOutput resolution. Sets the per-second rate.
seed任意integer—0〜2147483647Random seed for controlled comparisons, not a frame-identical guarantee.

リクエスト例

このリクエストはそのまま実行できます。省略したフィールドには既定値が入ります。先にキーを環境変数 POPNOW_API_KEY に設定してください。

例の video_url には PopNow のサンプル素材を使っています。自分の公開 HTTPS リンク、アップロードしたファイル、保存済みアセットに置き換えてください。

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "comfyui/openjutsu-object-swap/video-edit",
  "input": {
    "prompt": "a black leather biker jacket",
    "video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
    "edit_target": "jacket",
    "resolution": "768p"
  }
}'

レスポンスにはすぐに taskId が入ります。結果は GET /api/v1/jobs/recordInfo で取得するか、callBackUrl を付けて通知を受け取ります。

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

次に読む

このページの内容