Kling 4.0 Referanstan Videoya Nasıl Kullanılır
-
Materyalleri toplayın: image_urls (en fazla 10), video_urls (en fazla 5; her biri 2-30s, toplam 30s), elements (en fazla 7) ve voices (en fazla 3) sağlayın.
-
İstemde bunlara değinin: @image_1, @video_1 dizi sırasına göre kullanılır; @Hero veya @Narrator, öğenin ya da sesin name değerini kullanır. Her değinme, istekteki bir materyalle eşleşmelidir.
-
Çıktıyı yapılandırın: duration (3-30s), resolution (720p veya 1080p), aspect_ratio (auto, 16:9, 9:16, 1:1, 21:9) ve keep_original_sound.
-
İsteği gönderin ve sonucu alın: Uç nokta asenkrondur — /api/v1/predictions/{request_id}/result adresini sorgulayın veya bir webhook_url iletin.
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"}'