معاملات مرنة
اضبط 11 معاملاً موثَّقاً، بما يشمل aspect_ratio, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url.
إنشاء فيديو متعدد الاستخدامات موجّه بمراجع الصور والفيديو
curl -X POST https://runapi.ai/api/v1/kling/image_to_video \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-o1",
"image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
"prompt": "Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."
}'
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient();
const result = await client.imageToVideo.run({
model: "kling-o1",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/kling/image_to_video",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"kling-o1","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/kling/image_to_video");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'kling-o1',
'image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
'prompt' => 'Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.imageToVideo().run({"model":"kling-o1","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."});
task.waitForResult();
require "runapi/kling"
client = RunApi::Kling::Client.new
result = client.image_to_video.run(
model: "kling-o1",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.imageToVideo.Run({"model":"kling-o1","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Create a 10-second video of a person walking through an autumn forest, leaves falling, cinematic camera pan."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model kling-o1 \
--endpoint image_to_video \
--wait
18 إصدارات متاحة
اختر أي نموذج وابدأ التوليد في ثوانٍ.
اختر أي نموذج وابدأ التوليد في ثوانٍ.
| المزوّد | Kuaishou |
| معرّف النموذج | kling-o1 |
| النمط | Video |
| أنواع المهام | Asynchronous |
| نقطة نهاية API | /api/v1/kling/text_to_video, /api/v1/kling/image_to_video |
| وحدة الفوترة | second |
| معلمات الإدخال | aspect_ratio, callback_url, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url, mode, model, preserve_reference_video_audio, prompt, reference_image_urls, reference_video_type, reference_video_url |
| المدة القصوى | 5s |
| نسب العرض إلى الارتفاع | 16:9, 9:16, 1:1 |
| حالة الكتالوج | جاهز للتشغيل |
سجّل مجانًا وأنشئ مفتاح API لـ kling-o1 من لوحة التحكم.
أرسل طلب POST إلى /api/v1/kling/image_to_video باستخدام معرّف نموذج kling-o1 ومعلماتك.
استطلع المهمة أو اتبع الاستدعاء الراجع لاسترداد نتيجة kling-o1 المكتملة.
اضبط 11 معاملاً موثَّقاً، بما يشمل aspect_ratio, duration_seconds, enable_sound, first_frame_image_url, last_frame_image_url.
يعرض 2 endpoint(s) عامة: text_to_video, image_to_video.
تقبل المهام غير المتزامنة عنوان URL للاستدعاء عند اكتمال المهمة.
محسوبة بـ second دون اشتراط اشتراك.
modeGeneration mode. (std, pro)
promptVideo description; reference media with matching numbered markers.
aspect_ratioOutput aspect ratio. (16:9, 9:16, 1:1)
callback_urlWebhook URL for async notifications.
enable_soundSound generation must remain disabled.
duration_secondsDuration in seconds. (5)
reference_video_urlPublic HTTP(S) MP4 or MOV reference video URL; cannot be combined with last_frame_image_url.
last_frame_image_urlPublic HTTP(S) JPG, JPEG, or PNG final-frame image URL; cannot be combined with reference_image_urls or reference_video_url.
reference_image_urlsOrdered public HTTP(S) JPG, JPEG, or PNG reference image URLs; cannot be combined with last_frame_image_url.
reference_video_typeUse the video as a base edit or feature reference. (base, feature)
first_frame_image_urlPublic HTTP(S) JPG, JPEG, or PNG first-frame image URL.
preserve_reference_video_audioPreserve the reference video's original audio.
أنشئ مقاطع إطلاق المنتجات وإعلانات قصيرة من موجز نصي، وقلّص زمن الإنتاج من أسابيع إلى ساعات.
حوّل نصوص الدروس إلى فيديوهات شرح متحركة على نطاق واسع من دون كاميرا أو فريق إنتاج.
أنتج محتوى قصيرًا قابلًا للانتشار لمنصات التواصل مباشرةً من prompt.
مرّر معرّف النموذج الظاهر في دليل البدء السريع.
تتدرج حدود المعدل لكل مفتاح بحسب مستوى الاستخدام. راجع صفحة التسعير للاطلاع على الحدود الحالية.
نعم — المتغير مجرد خيار. بدّل عبر تغيير معامل model.
حيثما يتوفر البث، يقدّم RunAPI البث من البداية إلى النهاية.
افتح issue في مستودع GitHub العام أو راسل الدعم عبر البريد الإلكتروني.