Skip to main content
POST
/
kling
/
v1
/
videos
/
multi-elements
cURL
curl https://api.cometapi.com/kling/v1/videos/multi-elements \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "session_id": "<session_id>",
      "edit_mode": "removal",
      "prompt": "Delete the selected object from <<<video_1>>>",
      "mode": "std",
      "duration": "5"
    }'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "created_at": 123,
    "updated_at": 123
  }
}
Use this endpoint to submit the final multimodal video-editing job after your session and selections are ready.

Full workflow

1

Initialize the editing session

Start with Initialize Video for Editing to obtain the session_id for the clip you want to edit.
2

Build the selection area

Use Add Video Selection and, when needed, Preview Selected Video Area to refine the edit region.
3

Submit the final task

Send the session_id, edit_mode, final prompt, and any optional generation settings through this endpoint, then save the returned task id for status checks.

Before you call it

  • Make sure the selection session is already initialized
  • Confirm your region selection is correct before spending a generation call
  • Run selection follow-up calls on the same account and with the exact session_id returned by initialization
  • Set edit_mode to addition, swap, or removal
  • Provide image_list for addition and swap; omit image_list for removal
  • Send duration as a string such as "5" or "10"; examples pass "5" explicitly
  • Treat this route as the final generation step, not the setup step
  • Add image_list, negative_prompt, mode, duration, callback_url, or external_task_id only when the edit workflow needs them
For the complete parameter reference, see the Kling API documentation.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Body

application/json
session_id
string
required

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

edit_mode
enum<string>
required

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

Available options:
addition,
swap,
removal
prompt
string
required

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

model_name
enum<string>
default:kling-v1-6

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

Available options:
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.

Available options:
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.

Response

200 - application/json

Task accepted.

code
integer
required
message
string
required
data
object
required