كيفية استخدام Kling 4.0 لتحويل المراجع إلى فيديو
-
اجمع المواد: قدّم أيًا من image_urls (حتى 10)، وvideo_urls (حتى 5، مدة كل منها 2-30s وبإجمالي 30s)، و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"}'