Skip to main content
POST
/
kling
/
v1
/
videos
/
multi-elements
Create a Kling multimodal edit task
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/multi-elements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "session_id": "784914037360041984",
  "edit_mode": "replace",
  "prompt": "Replace the selected object with a red paper boat."
}
'
{
  "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, and final prompt 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
  • Treat this route as the final generation step, not the setup step
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
default:784914037360041984
required

Session id returned by the video initialization endpoint.

edit_mode
string
default:replace
required

Editing operation to apply. Options: replace, remove.

prompt
string
default:Replace the selected object with a red paper boat.
required

Text prompt describing the desired edit for the selected region.

Response

200 - application/json

Task accepted.

code
integer
required
message
string
required
data
object
required