Kling Motion Control görevi oluşturma
Bir karakter görselinden ve referans hareket videosundan, uyumlu CometAPI rotasıyla Kling Motion Control görevi oluşturun.
Gerekli medya
image_url genel bir URL’yi veya ham bir Base64 dizesini kabul eder.
- 10 MB veya daha küçük bir JPG, JPEG ya da PNG görseli kullanın.
- Her görsel boyutunu 300 ile 65.536 piksel arasında tutun.
- 1:2,5 ile 2,5:1 arasında bir en-boy oranı kullanın.
- Base64’ü ham kodlanmış dize olarak, bir
data:image/...;base64,öneki olmadan gönderin. - Hareket referansıyla eşleşen vücut kadrajına sahip, engellenmemiş tek bir karakter gösterin.
video_url genel bir MP4 veya MOV URL’sini kabul eder.
- 100 MB veya daha küçük bir video kullanın.
- Kısa kenarı en az 340 piksel yapın.
- Uzun kenarı en fazla 3850 piksel yapın.
- Görünür tek bir karakter içeren kesintisiz bir çekim kullanın.
- Kesintilerden, kamera değişikliklerinden ve aşırı hızlı hareketlerden kaçının.
task_status değerini inceleyin. Bir
dış HTTP 200 veya yanıt code: 0, başarılı bir
üretim sonucunu değil, sorgu yanıtını doğrular.orientation değerini ayarlayın
character_orientation zorunludur ve image veya video değerlerini kabul eder.
element_list kullanırsanız character_orientation değerini video olarak ayarlayın.
Modeli ve modu seçin
Uyumlu rotakling-v2-6 ve kling-v3 değerlerini kabul eder. Her iki model değeri de
her iki mod değerini kabul eder:
model_name değerini atlarsanız istek kling-v2-6 değerini kullanır. mode değerini atlarsanız,
istek std değerini kullanır. kling-v3 değeri, uyumlu istek biçimini
bu sayfada açıklandığı şekilde korur; ayrı Kling 3.0 yol-sürüm
sözleşmesini seçmez.
Uyumlu sözleşme sabit bir çıktı çözünürlüğünü garanti etmez. Uygulamanız belirli boyutlar gerektiriyorsa
döndürülen her videoyu inceleyin.
keep_original_sound yes veya no değerlerini kabul eder. Bu alanı atlarsanız istek
yes değerini kullanır.
Görev akışı
Motion Control isteğini gönderin
task_id değerini saklayın.Görevi sorgulayın
task_id ile.
Durum succeed veya failed olana kadar devam edin.Sonucu saklayın
İsteğe bağlı alanlar
Geri çağırma yapısı
Legacy geri çağırma şeması aşağıdaki yapıya sahiptir:submitted, processing, succeed veya failed olabilir.
Terminal sonuç alanları yalnızca terminal durum için döndürüldüklerinde bulunur.
Sonuç alanları
submitted, processing, succeed veya failed olabilir.
Yetkilendirmeler
Bearer authentication. Use your CometAPI API key.
Gövde
Character image as a public URL or a raw Base64 string. Send raw Base64 without a data:image/...;base64, prefix; data-URI input is outside the compatible contract. Supported formats are JPG, JPEG, and PNG. The image must be 10 MB or smaller. Its width and height must each be from 300 through 65,536 pixels, and its aspect ratio must be between 1:2.5 and 2.5:1.
Public reference motion video URL. Use an MP4 or MOV file that is 100 MB or smaller. The short edge must be at least 340 pixels, and the long edge must not exceed 3850 pixels. The video must be at least 3 seconds long. The maximum duration depends on character_orientation.
Required compatible string enum. With image, the reference video can be 3 to 10 seconds long. With video, the reference video can be 3 to 30 seconds long.
image, video Model ID for this compatible Motion Control request. Omit this field to use kling-v2-6. The kling-v3 value keeps this compatible request shape; it does not select the separate Kling 3.0 path-version contract.
kling-v2-6, kling-v3 Optional text field in the compatible request structure. Maximum 2500 characters.
2500Compatible string enum. Accepted values are yes and no. Omitted requests use yes.
yes, no Both compatible models accept std and pro. Omitted requests use std.
std, pro Optional callback field in the compatible structure. Provide a URI, or omit the field or send an empty string when no callback URI is configured.
Optional ID for correlation in your application. The value must be unique for your account. Store the returned task_id for CometAPI status queries.
Optional compatible Element structure. Provide at most one object, and combine this field only with character_orientation: video.
1Optional compatible watermark structure.