Bir Kling image-to-video görevi oluşturun
CometAPI POST /kling/v1/videos/image2video aracılığıyla tek bir görseli bir Kling videosuna dönüştürün; async görev oluşturma ve task ID ile ilerleme takibi içerir.
Çağırmadan önce
- Bir adet herkese açık görsel URL’si veya bir adet base64 görsel dizesi sağlayın
- Kling piksel gereksinimlerini karşılayan bir görsel kullanın; çok küçük küçük resimler generation görevi tarafından reddedilir
- Varsayılan
kling-v2-6örneğiyle başlayın, ardından farklı bir model hattına ihtiyaç duyduğunuzda OpenAPI enum içinden başka birmodel_nameseçin - İlk isteği basit tutun: bir giriş görseli, bir prompt, kuyruk karesi yok, hareket maskeleri yok
- Kontrollü yerel hareket gerektiğinde
dynamic_masksöğesini maske ve yörünge nesnelerinden oluşan bir dizi olarak kullanın - Üretilen sesi destekleyen model hatlarında, ses içermeyen deterministik bir ilk istek için
sound: offkullanın
Model adlandırma
Bu endpoint’te standart Kling video model ID’lerini kullanın. Omni model ID’lerini Omni Video için saklayın.Görev akışı
image-to-video isteğini gönderin
task_id değerini saklayın.Görevi sorgulayın
Sonucu saklayın
Yetkilendirmeler
Bearer token authentication. Use your CometAPI key.
Gövde
Source image URL or base64 image string. Use an image that meets Kling pixel requirements; very small thumbnails are rejected. For base64 input, send the encoded image string as the field value.
Text prompt describing the desired motion. Maximum 500 characters.
Elements to exclude from the video. Maximum 200 characters.
Webhook URL to receive task status updates when the task completes.
Generation mode. std for standard (faster), pro for professional (higher quality).
std, pro Model ID for this image-to-video request. Use kling-v3 for new requests. Use Omni model IDs only with the Omni Video endpoint.
kling-v1, kling-v1-5, kling-v1-6, kling-v2-master, kling-v2-1, kling-v2-1-master, kling-v2-5-turbo, kling-v2-6, kling-v3 Tail-frame reference image as a Base64 string or public URL. Same format requirements as image. Controls the last frame of the generated video.
Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1.
Output video length in seconds. Use 5 or 10; omit to use 5.
Static brush mask image as a Base64 string or public URL. White areas are frozen in place during video generation. Must match the aspect ratio and resolution of the input image.
Optional motion masks. Each entry contains a mask image and an ordered trajectory list.
Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user.
Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default.
on, off