Skip to main content
POST
cURL
このエンドポイントは、セッションと選択内容の準備が完了した後に、最終的なマルチモーダル動画編集ジョブを送信するために使用します。

完全なワークフロー

1

編集セッションを初期化する

編集したいクリップの session_id を取得するには、まず 動画編集の初期化 を行います。
2

選択領域を作成する

動画選択を追加 を使用し、必要に応じて 選択した動画領域をプレビュー を行って編集領域を調整します。
3

最終タスクを送信する

このエンドポイントを通じて session_idedit_mode、最終的な prompt、および必要に応じた生成設定を送信し、返されたタスク id をステータス確認用に保存します。

呼び出し前の確認事項

  • 選択セッションがすでに初期化されていることを確認してください
  • 生成呼び出しを消費する前に、領域選択が正しいことを確認してください
  • 選択後の関連呼び出しは、初期化で返された正確な session_id を使用し、同じアカウントで実行してください
  • edit_modeadditionswap、または removal に設定してください
  • addition および swap では image_list を指定し、removal では image_list を省略してください
  • duration"5""10" のような文字列で送信してください。例では明示的に "5" を渡しています
  • このルートはセットアップ手順ではなく、最終的な生成ステップとして扱ってください
  • image_listnegative_promptmodedurationcallback_url、または external_task_id は、編集ワークフローで必要な場合にのみ追加してください
完全なパラメータリファレンスについては、Kling API ドキュメント を参照してください。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

application/json
session_id
string
必須

Selection session id returned by init-selection. Follow-up calls must use the same account and exact session id.

edit_mode
enum<string>
必須

Editing operation for the selected video region. Use addition to add an element, swap to replace a selected element, or removal to remove it.

利用可能なオプション:
addition,
swap,
removal
prompt
string
必須

Instruction describing the desired edit. Reference the source video as <<<video_1>>> and any reference image as <<<image_1>>>.

model_name
enum<string>
デフォルト:kling-v1-6

Kling model variant for the final edit task. Omit to use kling-v1-6.

利用可能なオプション:
kling-v1-6
image_list
object[]

Image references used by addition and swap tasks. Omit this field for removal tasks.

Minimum array length: 1
negative_prompt
string

Elements to avoid in the edited result.

mode
enum<string>

Generation mode. Use std or pro.

利用可能なオプション:
std,
pro
duration
string

Requested output duration in seconds.

callback_url
string

Webhook URL to receive task status updates.

external_task_id
string

Custom task id for your own tracking. Must be unique per account.

レスポンス

200 - application/json

Task accepted.

code
integer
必須
message
string
必須
data
object
必須