> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Kling video selection

> Use Kling Delete Video Selection API to remove selected elements from a multi-elements video edit via CometAPI, supporting multimodal video workflows.

Use this utility endpoint to remove selection state from a multimodal editing session before you rebuild or abandon the current edit area.

## When to use it

* You want to remove the current selection record instead of continuing with it
* You are cleaning up an editing pass before marking a new target area

## Workflow role

* Requires the `session_id` from [Initialize Video for Editing](./initialize-video-for-editing)
* Requires the `frame_index` and 0-1 percentage `points` for the selection points you want to delete
* Typically followed by [Add Video Selection](./add-video-selection) or by ending the session without generating

<Tip>
  For the complete parameter reference, see the [Kling API documentation](https://kling.ai/document-api/apiReference/model/multiElements).
</Tip>


## OpenAPI

````yaml api/openapi/video/kling/multimodal-video-editing/post-delete-video-selection.openapi.json POST /kling/v1/videos/multi-elements/delete-selection
openapi: 3.1.0
info:
  title: Delete Video Selection API
  version: 1.0.0
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/multi-elements/delete-selection:
    post:
      summary: Delete Video Selection
      operationId: delete_video_selection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - session_id
                - frame_index
                - points
              properties:
                session_id:
                  type: string
                  description: >-
                    Selection session id returned by init-selection. Follow-up
                    calls must use the same account and exact session id.
                frame_index:
                  type: integer
                  description: Frame index where the selected point set applies.
                points:
                  type: array
                  description: Points to delete from the current selection.
                  items:
                    type: object
                    required:
                      - x
                      - 'y'
                    properties:
                      x:
                        type: number
                        description: Horizontal coordinate as a 0-1 frame percentage.
                      'y':
                        type: number
                        description: Vertical coordinate as a 0-1 frame percentage.
              default:
                session_id: <session_id>
                frame_index: 1
                points:
                  - x: 0.5
                    'y': 0.5
            examples:
              Default:
                summary: Delete selected points
                value:
                  session_id: <session_id>
                  frame_index: 1
                  points:
                    - x: 0.5
                      'y': 0.5
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    description: Response code. `0` means the request succeeded.
                  message:
                    type: string
                    description: Response message.
                  data:
                    type: object
                    description: Route-specific response payload when present.
                    additionalProperties: true
                additionalProperties: true
      x-codeSamples:
        - lang: Shell
          label: Default
          source: >
            curl
            https://api.cometapi.com/kling/v1/videos/multi-elements/delete-selection
            \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                  "session_id": "<session_id>",
                  "frame_index": 1,
                  "points": [
                    {
                      "x": 0.5,
                      "y": 0.5
                    }
                  ]
                }'
        - lang: Python
          label: Default
          source: |
            import os
            import requests

            response = requests.post(
                "https://api.cometapi.com/kling/v1/videos/multi-elements/delete-selection",
                headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
                json={
                  "session_id": "<session_id>",
                  "frame_index": 1,
                  "points": [
                    {
                      "x": 0.5,
                      "y": 0.5
                    }
                  ]
                },
            )

            result = response.json()
            print(result.get("code"), result.get("data"))
        - lang: JavaScript
          label: Default
          source: >
            const response = await
            fetch("https://api.cometapi.com/kling/v1/videos/multi-elements/delete-selection",
            {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "session_id": "<session_id>",
                "frame_index": 1,
                "points": [
                  {
                    "x": 0.5,
                    "y": 0.5
                  }
                ]
              }),
            });


            const result = await response.json();

            console.log(result.code, result.data);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````