Utwórz zadanie Kling Motion Control
Utwórz zadanie Kling Motion Control na podstawie obrazu postaci i referencyjnego filmu ruchu, korzystając ze zgodnej trasy CometAPI.
Wymagane multimedia
image_url akceptuje publiczny adres URL lub nieprzetworzony ciąg Base64.
- Użyj obrazu JPG, JPEG lub PNG o rozmiarze nie większym niż 10 MB.
- Każdy wymiar obrazu musi mieścić się w zakresie od 300 do 65 536 pikseli.
- Użyj proporcji obrazu w zakresie od 1:2,5 do 2,5:1.
- Przesyłaj Base64 jako nieprzetworzony zakodowany ciąg bez
data:image/...;base64,prefiksu. - Przedstaw jedną niezasłoniętą postać z kadrowaniem sylwetki zgodnym z ruchem referencyjnym.
video_url akceptuje publiczny adres URL pliku MP4 lub MOV.
- Użyj filmu o rozmiarze nie większym niż 100 MB.
- Ustaw krótszy bok na co najmniej 340 pikseli.
- Ustaw dłuższy bok na nie więcej niż 3850 pikseli.
- Użyj ciągłego ujęcia z jedną widoczną postacią.
- Unikaj cięć, zmian kamery i nadmiernie szybkiego ruchu.
task_status. Zewnętrzny
kod HTTP 200 lub odpowiedź code: 0 potwierdzają odpowiedź na zapytanie, a nie
pomyślny wynik generowania.Ustaw wartość orientacji
character_orientation jest wymagana i akceptuje image lub video.
element_list, ustaw character_orientation na video.
Wybierz model i tryb
Zgodna trasa akceptujekling-v2-6 i kling-v3. Obie wartości modelu
akceptują obie wartości trybu:
model_name, żądanie użyje kling-v2-6. Jeśli pominiesz mode,
żądanie użyje std. Wartość kling-v3 zachowuje zgodną strukturę żądania
opisaną na tej stronie; nie wybiera odrębnego kontraktu Kling 3.0 opartego na wersji ścieżki
API.
Zgodny kontrakt nie gwarantuje stałej rozdzielczości wyjściowej. Sprawdź
każdy zwrócony film, jeśli aplikacja wymaga określonych wymiarów.
keep_original_sound akceptuje yes lub no. Jeśli pominiesz to pole,
żądanie użyje yes.
Przepływ zadania
Wyślij żądanie Motion Control
task_id.Odpytuj zadanie
task_id.
Kontynuuj, aż status będzie miał wartość succeed lub failed.Zapisz wynik
Pola opcjonalne
Struktura callbacka
Schemat callbacka Legacy ma następującą strukturę:submitted, processing, succeed lub failed.
Pola wyniku końcowego są obecne tylko wtedy, gdy są zwracane dla stanu końcowego.
Pola wyniku
submitted, processing, succeed lub failed.
Autoryzacje
Bearer authentication. Use your CometAPI API key.
Treść
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.