Kling 4.0 Reference to Videoの使い方
-
素材を用意する:image_urls(最大10件)、video_urls(最大5件、各2~30秒、合計30秒)、elements(最大7件)、voices(最大3件)を指定します。
-
プロンプト内で素材を指定する:@image_1と@video_1は配列順に対応します。@Heroや@Narratorには、要素または音声のnameを使います。指定する素材はすべてリクエスト内に含めてください。
-
出力を設定する:duration(3~30s)、resolution(720pまたは1080p)、aspect_ratio(auto、16:9、9:16、1:1、21:9)、keep_original_soundを指定します。
-
送信して結果を取得する:エンドポイントは非同期です。/api/v1/predictions/{request_id}/resultをポーリングするか、webhook_urlを渡します。
curl -X POST https://api.muapi.ai/api/v1/kling-4.0-reference-to-video \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"prompt": "@Hero sits at the desk, picks up the doll from @image_1, and greets using @Narrator", "image_urls": ["https://example.com/doll.png"], "elements": [{"name": "Hero", "image_urls": ["https://example.com/hero-front.jpg", "https://example.com/hero-side.jpg"], "tag": "character"}], "voices": [{"name": "Narrator", "audio_url": "https://example.com/narrator.mp3"}], "duration": 10, "resolution": "1080p"}'