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

# Preview Kling video selection

> Use the Preview Selected Video Area endpoint to render a fast preview for chosen regions in Kling multimodal video edits via CometAPI.

Use this endpoint to preview the selected region before you submit the final multimodal edit task.

## Why preview matters

* It lets you verify that the selection points cover the intended object or area
* It helps catch bad masks before you spend a generation call
* It is the safest checkpoint between selection editing and final task creation

## Workflow role

<Steps>
  <Step title="Initialize the session">
    Start with [Initialize Video for Editing](./initialize-video-for-editing) and keep the returned `session_id` on the same account.
  </Step>

  <Step title="Add selection points">
    Use [Add Video Selection](./add-video-selection) until the region is close to correct.
  </Step>

  <Step title="Preview before generating">
    Call this endpoint, then continue to [Create Task](./create-task) only after the selection looks right.
  </Step>
</Steps>

<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-preview-selected-video-area.openapi.json POST /kling/v1/videos/multi-elements/preview-selection
openapi: 3.1.0
info:
  title: Preview Selected Video Area API
  version: 1.0.0
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/multi-elements/preview-selection:
    post:
      summary: Preview Selected Video Area
      operationId: preview_selected_video_area
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - session_id
              properties:
                session_id:
                  type: string
                  description: Session id returned by the video initialization endpoint.
              default:
                session_id: <session_id>
            examples:
              Default:
                summary: Default
                value:
                  session_id: <session_id>
      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/preview-selection
            \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                  "session_id": "<session_id>"
                }'
        - lang: Python
          label: Default
          source: |
            import os
            import requests

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

            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/preview-selection",
            {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "session_id": "<session_id>"
              }),
            });


            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.

````