Video Sound Effects API リファレンス
動画に合わせた効果音と環境音
PopNow の API キー 1 つで、Video Sound Effects を自分のコードから呼び出せます。送るモデル ID、受け付ける入力フィールド、1 回あたりの料金(USD)、ターミナルに貼ってそのまま動くリクエストをこのページにまとめました。
パラメーターの説明はモデルの入力 schema から取っているため、英語のみです。
概要
- 開発元
- PopNow
- 出力
- 音声
- 最安
- $0.0012 USD 出力 1 秒あたり
- 目安の所要時間
- 約 41 秒
料金は USD で表示され、PopNow の残高から差し引かれます。受付時に最大料金を確保し、完了後に実際の使用量で精算して差額を返却します。失敗したタスクは課金されません。実行前の正確な見積もりは POST /api/v1/jobs/quote で取得できます。
動画から音声
popnow/foley-v1/video-to-audio
料金
| オプション | USD |
|---|---|
既定 | $0.0012 出力 1 秒あたり |
パラメーター
| フィールド | 型 | 既定値 | 指定できる値 | 説明 |
|---|---|---|---|---|
video_url必須 | string | — | — | Clip to add sound to. The picture is kept; the returned clip carries the generated sound as its audio. |
prompt任意 | string | — | 1,000 文字まで | The sounds you want, as a short list. If omitted, a general request for sounds that match the on-screen action is used. |
duration_seconds任意 | integer | 8 | 1〜30 | Seconds of sound to generate, from 1 to 30. The returned clip is cut to this length and these seconds are billed. |
negative_prompt任意 | string | — | 1,000 文字まで | Sounds to keep out, such as music or speech. |
ignore_visual_semantics任意 | boolean | false | — | Choose the sounds from the prompt alone instead of from what the picture shows; timing still follows the motion. |
guidance_scale任意 | number | 4.5 | 0〜20 | How closely the sound follows the description, from 0 to 20. |
steps任意 | integer | 25 | 4〜50 | Refinement passes, from 4 to 50. More passes take longer. |
リクエスト例
このリクエストはそのまま実行できます。省略したフィールドには既定値が入ります。先にキーを環境変数 POPNOW_API_KEY に設定してください。
例の video_url には PopNow のサンプル素材を使っています。自分の公開 HTTPS リンク、アップロードしたファイル、保存済みアセットに置き換えてください。
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "popnow/foley-v1/video-to-audio",
"input": {
"prompt": "Soft wind, rustling petals and distant birdsong",
"video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
"duration_seconds": 8
}
}'レスポンスにはすぐに taskId が入ります。結果は GET /api/v1/jobs/recordInfo で取得するか、callBackUrl を付けて通知を受け取ります。
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
