> ## 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.

# حذف تحديد فيديو Kling

> استخدم واجهة برمجة تطبيقات Kling Delete Video Selection لإزالة العناصر المحددة من تعديل فيديو متعدد العناصر عبر CometAPI، مع دعم سير عمل الفيديو متعدد الوسائط.

استخدم نقطة النهاية المساعدة هذه لإزالة حالة التحديد من جلسة تحرير متعددة الوسائط قبل إعادة البناء أو التخلي عن منطقة التحرير الحالية.

## متى تستخدمها

* تريد إزالة سجل التحديد الحالي بدلًا من المتابعة به
* تقوم بتنظيف مرحلة تحرير قبل تحديد منطقة هدف جديدة

## دورها في سير العمل

* يتطلب `session_id` من [Initialize Video for Editing](./initialize-video-for-editing)
* يتطلب `frame_index` و`points` كنِسَب مئوية من 0 إلى 1 لنقاط التحديد التي تريد حذفها
* يتبعها عادةً [Add Video Selection](./add-video-selection) أو إنهاء الجلسة دون توليد

<Tip>
  للاطلاع على المرجع الكامل للمعلمات، راجع [توثيق Kling API](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.

````