Kling 4.0 레퍼런스 기반 동영상 사용 방법
-
자료 준비: image_urls(최대 10개), video_urls(최대 5개, 각 2~30초, 총 30초), elements(최대 7개), voices(최대 3개) 중 원하는 항목을 제공합니다.
-
프롬프트에서 자료 지정: @image_1, @video_1은 배열 순서를 따릅니다. @Hero 또는 @Narrator는 요소나 음성의 name을 사용합니다. 프롬프트에 지정하는 모든 항목은 요청에 포함된 자료와 일치해야 합니다.
-
출력 설정: duration(3~30초), 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"}'