Skip to main content
POST
Użyj tego endpointu dla zgodnego z O1 przepływu pracy Kling Omni udostępnianego przez CometAPI, obejmującego zarówno generowanie text-to-video, jak i generowanie z odniesieniem do obrazu pierwszej klatki.
Aby uzyskać pełne informacje o parametrach dostawcy, zobacz dokumentację Kling Omni Video.

Wybierz tryb wejścia

  • Text-to-video: wyślij prompt, mode, aspect_ratio i duration
  • Odniesienie do obrazu pierwszej klatki: dodaj elementy image_list z image_url i type: first_frame, a następnie odwołaj się do obrazu w prompt jako <<<image_1>>>
  • Wyjście ze znakiem wodnym: dodaj watermark_info.enabled: true, gdy potrzebujesz adresu URL wideo ze znakiem wodnym w odpowiedzi zapytania
  • Model ID: pomiń model_name, aby użyć domyślnej wartości ścieżki, albo wyślij przetestowany model ID Omni Video, taki jak kling-video-o1 lub kling-v3-omni

Czas trwania i proporcje obrazu

Kling Omni nie udostępnia dokładnego pola size. Traktuj aspect_ratio jako żądanie kształtu kadru; żądanie text-to-video 16:9 może zostać wyrenderowane jako full-HD 1920x1080.

Przepływ zadania

1

Utwórz zadanie Omni

Prześlij żądanie i zapisz zwrócone task_id.
2

Odpytuj zadanie Omni

Kontynuuj z Pobierz wideo Kling Omni, aż zadanie się zakończy.
3

Zapisz gotowe wideo

Przenieś zwrócony adres URL MP4 do własnego magazynu, jeśli potrzebujesz trwałego dostępu.

Autoryzacje

Authorization
string
header
wymagane

Bearer token authentication. Use your CometAPI key.

Nagłówki

Content-Type
string

Content type of the request body.

Treść

application/json
prompt
string
wymagane

Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.

model_name
string

Optional model ID for this Kling Omni video request. Omit this field to use the route default.

image_list
object[]

Optional first-frame image reference for image-referenced Omni generation.

sound
enum<string>
domyślnie:off

Whether to generate audio with the video. Use on or off.

Dostępne opcje:
on,
off
mode
enum<string>

Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.

Dostępne opcje:
std,
pro
aspect_ratio
enum<string>

Aspect ratio request for beta Kling Omni generation. The endpoint does not expose an exact size field; a 16:9 text-to-video request can render as 1920x1080.

Dostępne opcje:
16:9,
9:16,
1:1
duration
enum<string>
domyślnie:5

Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.

Dostępne opcje:
5,
10
watermark_info
object

Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.

callback_url
string<uri>

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

Odpowiedź

200 - application/json

Success

code
integer
wymagane

Response code. 0 means the task request was accepted.

message
string
wymagane

Response message.

data
object
wymagane
request_id
string

Request identifier returned by CometAPI when present.