메인 콘텐츠로 건너뛰기
POST
/
kling
/
v1
/
videos
/
omni-video
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/omni-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "The boy in <<<image_1>>> is wearing <<<element_1>>> and, together with the girl in <<<image_2>>>, sits side by side in <<<element_2>>>, playfully and intimately chatting, close-up shot."
}
'
{}
이 beta 엔드포인트는 일반 텍스트-투-비디오, 이미지 참조 생성, 비디오 변환 흐름을 포함한 Kling Omni 워크플로에 사용합니다.

입력 모드 선택

  • 텍스트-투-비디오: prompt, mode, aspect_ratio, duration을 전송합니다.
  • 이미지 참조 생성: image_list를 추가합니다.
  • 요소 안내 생성: element_list를 추가합니다.
  • 비디오 변환: refer_type: base와 함께 video_list를 추가합니다.

기간 및 종횡비

SettingSupported valuesDefaultBoundary behavior
duration for text or first-frame video5, 105두 개의 고정 생성 길이 중 하나를 사용합니다.
duration with reference video inputinput video length from 3 to 10 secondsinput length생성된 duration은 기준 비디오를 따르며 요청 값은 무시됩니다.
aspect_ratio16:9, 9:16, 1:116:9첫 프레임 이미지나 기준 비디오가 프레임을 제어하지 않을 때 필요합니다.
modestd, propropro는 Omni Video의 기본값입니다.
Kling Omni는 정확한 size 필드를 제공하지 않습니다. aspect_ratio를 프레임 형태 요청으로 간주하세요. 16:9 텍스트-투-비디오 요청은 풀 HD 1920x1080으로 렌더링될 수 있습니다.

작업 흐름

1

Omni 작업 생성

요청을 전송하고 반환된 task_id를 저장합니다.
2

Omni 작업 폴링

작업이 완료될 때까지 Omni Query로 계속 진행합니다.
3

완료된 비디오 저장

지속적인 접근이 필요하면 반환된 MP4 URL을 자체 저장소로 옮깁니다.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

헤더

Content-Type
string

Content type of the request body.

본문

application/json
prompt
string
기본값:Hello
필수

Text prompt describing the desired video. Max 2500 characters. Reference images or elements inline using <<<image_1>>>, <<<element_1>>>, <<<video_1>>> syntax.

model_name
string

Model to use for Omni Video. Use kling-video-o1 for this endpoint.

image_list
object[]

Reference images for the generation. Each entry can optionally include a type field set to first_frame or end_frame to pin the image as the video's start or end frame. Accepts URLs or Base64 strings. Formats: JPG, JPEG, PNG. Max 10 MB per image, minimum 300 px per side, aspect ratio 1:2.5-2.5:1. When used with reference videos, image + element count must not exceed 4; without reference videos, the limit is 7.

element_list
object[]

Pre-registered element references by ID. Combined with images, the total count must not exceed 4 (with reference video) or 7 (without).

mode
string

Generation mode. std (standard, faster and more cost-effective) or pro (professional, higher quality output). The default is pro.

aspect_ratio
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.

duration
string

Video length in seconds. Values: 3-10. Text-to-video and first-frame-to-video only support 5 and 10. When editing an existing video, duration matches the input and this parameter is ignored.

video_list
string[]

Reference video for style transfer or the base video to edit. Use refer_type to distinguish: feature for style reference, base for the video to modify. Set keep_original_sound to yes or no to control audio retention. Only MP4/MOV, 3-10 seconds, 720-2160 px, 24-60 fps, max 200 MB. Only one video is accepted.

callback_url
string

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.

응답

200 - application/json

Success

The response is of type object.