Kling Omni 動画を作成する
CometAPI の POST /kling/v1/videos/omni-video を使用して Kling O1 の動画タスクを作成し、Omni クエリルートでステータスを追跡します。
入力モードを選択する
- テキストから動画:
prompt、mode、aspect_ratio、durationを送信します - 最初のフレーム画像参照:
image_urlとtype: first_frameを含むimage_list項目を追加し、その後prompt内で画像を<<<image_1>>>として参照します - ウォーターマーク付き出力: クエリレスポンスでウォーターマーク付き動画 URL が必要な場合は、
watermark_info.enabled: trueを追加します - Model ID: ルートのデフォルトを使用するには
model_nameを省略するか、kling-video-o1やkling-v3-omniなど、テスト済みの Omni Video model ID を送信します
長さとアスペクト比
size フィールドを公開していません。aspect_ratio はフレーム形状の指定として扱ってください。16:9 のテキストから動画へのリクエストは、フル HD の 1920x1080 としてレンダリングされる場合があります。
タスクの流れ
Omni タスクを作成する
task_id を保存します。Omni タスクをポーリングする
完成した動画を保存する
承認
Bearer token authentication. Use your CometAPI key.
ヘッダー
Content type of the request body.
ボディ
Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.
Optional model ID for this Kling Omni video request. Omit this field to use the route default.
Optional first-frame image reference for image-referenced Omni generation.
Whether to generate audio with the video. Use on or off.
on, off Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.
std, pro 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.
16:9, 9:16, 1:1 Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.
5, 10 Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.
Webhook URL for task status notifications. The server sends a callback when the task status changes.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.