メインコンテンツへスキップ
POST
cURL
POST /omni-video/{model}を使用して、非同期のKling Omni動画タスクを作成します。URLにモデルIDを指定し、contentsに入力を指定します。

モデルを選択する

  • kling-4.0: 720p または1080p。3〜30秒。audioフィールドなし。固定のアスペクト比に加えてadaptiveのアスペクト比をサポートし、middle_frameコンテンツを受け付けます。
  • kling-3.0-omni: 720p, 1080p、または4k。3〜15秒。音声はnative、original、またはoff。
  • kling-o1: 720p または1080p。3〜10秒。音声はoriginalまたはoff。
テキストのみの例ではkling-3.0-omniを使用します。無音の動画を作成するには、settings.audioをoffに設定します。

リクエストパラメータ

kling-4.0では、base_videoコンテンツ項目は最大1つまでです。kling-3.0-omniでは、feature_video入力にsettings.multi_shot: trueとsettings.audio: offが必要です。base_video入力にはsettings.multi_shot: falseが必要で、settings.audio: nativeは使用できません。base_videoを最初または最後のフレームと組み合わせないでください。 kling-3.0-omniの公式デフォルト値はmulti_shot: trueです。ショットモードを明示的に指定する必要がある場合は、このフィールドを設定してください。kling-o1では、プロンプト(Prompt)は最大2500文字までです。リクエストにfirst_frameのみが含まれ、他の参照画像や動画がない場合は、長さを5秒または10秒にしてください。 5秒間のテキストのみの動画を作成するには、次のリクエスト本文をPOST /omni-video/kling-3.0-omniに送信します:
レスポンスには、非同期タスクのidが返されます:
data.idの値を指定して、 Klingタスクを取得 をタスクが完了するまで実行します。完成した動画のURLは、タスクのoutputs配列から取得します。継続的にアクセスする必要がある場合は、動画を自身のストレージに保存してください。 OpenAPIパネルには、対応するShell、Python、JavaScriptのリクエストが含まれています。入力の組み合わせについて詳しくは、次を参照してください: Kling 3.0 Omni動画APIリファレンス または Kling O1 Omni動画APIリファレンス.

承認

Authorization
string
header
必須

Authenticate with your CometAPI API key.

パスパラメータ

model
enum<string>
必須

Kling Omni model ID. The selected model controls resolution, duration, and audio choices. kling-4.0 adds the adaptive ratio and the middle_frame input role.

利用可能なオプション:
kling-4.0,
kling-3.0-omni,
kling-o1

ボディ

application/json

Omni video request fields exposed by the CometAPI route. The model ID is a path parameter, not a body field.

contents
object[]
必須

Video input items. Send a prompt item for text-only generation.

Minimum array length: 1
settings
object

Output settings exposed by the CometAPI route. Set model-specific fields explicitly for the intended result.

options
object

Optional task fields exposed by the CometAPI route.

レスポンス

200 - application/json

Task created. Store data.id for a GET /tasks query.

code
必須

Result code. 0 indicates task creation.

message
string
必須

Result message.

data
object
必須

Task identification and submission status.

msg
string

Additional result message, when included.

最終更新日 2026年11月13日