Kling 4.0 Flash 参照動画生成の使い方
-
素材を用意する:image_urls(最大10件)、video_urls(最大5件。動画要素と合わせて2-20秒)、elements(最大7件、動画要素は最大3件)を指定します。
-
プロンプトで素材を指定する:@image_1、@video_1は配列順に対応します。@Heroは要素のnameを使います。指定するすべての素材がリクエストに含まれている必要があります。
-
出力を設定する:duration(3-20s)、aspect_ratio(auto、16:9、9:16、1:1、21:9)、keep_original_soundを指定します。出力は常に720pです。
-
送信して結果を取得する:/api/v1/predictions/{request_id}/resultをポーリングするか、webhook_urlを指定します。
curl -X POST https://api.muapi.ai/api/v1/kling-4.0-flash-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 the camera", "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", "voice_url": "https://example.com/hero-voice.mp3"}], "duration": 10}'