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

# kling-v3 & kling-v3-omni

> Kling Legacy APIs for Kling 3.0 and Kling 3.0 Omni.

<Tabs>
  <Tab title="Text to Video">
    ## Create Task

    `POST /kling/v1/videos/text2video`

    Generate video from text with `model_name: "kling-3.0"`. Multi-shot storyboards, camera movement, sound, and voice references are supported.

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/videos/text2video \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model_name": "kling-3.0",
          "prompt": "A rabbit wearing glasses reads a newspaper at a table",
          "duration": "5",
          "mode": "pro",
          "sound": "on",
          "aspect_ratio": "1:1"
        }'
      ```

      ### Create response

      ```json 200 theme={null}
      {
        "id": "860260753860210752",
        "task_id": "860260753860210752",
        "object": "video",
        "model": "kling-v3",
        "status": "",
        "progress": 0,
        "created_at": 1773130665
      }
      ```
    </div>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ## Request parameters

    <ParamField body="model_name" type="string" required>Use `kling-3.0`.</ParamField>
    <ParamField body="prompt" type="string">Positive prompt, up to 2,500 characters; required for a single shot or intelligent storyboard.</ParamField>
    <ParamField body="negative_prompt" type="string">Negative prompt, up to 2,500 characters.</ParamField>
    <ParamField body="multi_shot" type="boolean" default={false}>Enable multi-shot generation.</ParamField>
    <ParamField body="shot_type" type="string">With multi-shot, use `customize` or `intelligence`.</ParamField>
    <ParamField body="multi_prompt" type="object[]">One to six custom shots whose durations add up to `duration`.</ParamField>
    <ParamField body="voice_list" type="object[]">Up to two voice references.</ParamField>
    <ParamField body="sound" type="string" default="off">Use `on` or `off`; voice references require `on`.</ParamField>
    <ParamField body="mode" type="string" default="std">`std` for 720p, `pro` for 1080p, or `4k`.</ParamField>
    <ParamField body="duration" type="string" default="5">Video duration from 3 to 15 seconds.</ParamField>
    <ParamField body="aspect_ratio" type="string" default="16:9">Use `16:9`, `9:16`, or `1:1`.</ParamField>
    <ParamField body="cfg_scale" type="number" default={0.5}>Prompt adherence from 0 to 1.</ParamField>
    <ParamField body="camera_control" type="object">Preset or custom camera movement.</ParamField>
    <ParamField body="watermark_info" type="object">Platform watermark configuration through `enabled`.</ParamField>

    ### Storyboards, voices, and camera movement

    When `multi_shot` is true, set `shot_type` to `customize` and supply `multi_prompt`, or use `intelligence` with `prompt`. Each custom shot contains `index`, `prompt`, and `duration`; each shot lasts at least 1 second and its prompt is at most 512 characters.

    Voice references use `<<<voice_1>>>` and `<<<voice_2>>>` in list order. Supply at most two `voice_id` values from voice management and set `sound` to `on`.

    `camera_control.type` supports `simple`, `down_back`, `forward_up`, `right_turn_forward`, and `left_turn_forward`. For `simple`, only one of `horizontal`, `vertical`, `pan`, `tilt`, `roll`, and `zoom` may be nonzero; every value ranges from -10 to 10.

    <Card title="Interactive request parameters" icon="code" href="/api-reference/model-api/kuaishou/kling-v3-t2v">
      Fill in and test the full Legacy request body.
    </Card>

    ## Query Task

    * Single task: `GET /kling/v1/videos/text2video/{task_id}`. Status progresses from `submitted` or `processing` to `succeed` or `failed`.
    * Task list: `GET /kling/v1/videos/text2video?pageNum=1&pageSize=30`. `pageNum` is 1–1000 and `pageSize` is 1–500.
  </Tab>

  <Tab title="Image to Video">
    ## Create Task

    `POST /kling/v1/videos/image2video`

    Generate video from a first frame, an end frame, or both with `model_name: "kling-3.0"`.

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/videos/image2video \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model_name": "kling-3.0",
          "image": "https://example.com/first-frame.png",
          "prompt": "The character turns and walks toward the window",
          "duration": "5",
          "mode": "pro",
          "sound": "off"
        }'
      ```

      ```json 200 theme={null}
      {"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v3","status":"","progress":0,"created_at":1773130665}
      ```
    </div>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ## Request parameters

    <ParamField body="model_name" type="string" required>Use `kling-3.0`.</ParamField>
    <ParamField body="image" type="string">First frame as URL or raw Base64; at least one frame is required.</ParamField>
    <ParamField body="image_tail" type="string">End frame; mutually exclusive with motion brush and camera control.</ParamField>
    <ParamField body="prompt" type="string">Positive prompt, up to 2,500 characters.</ParamField>
    <ParamField body="negative_prompt" type="string">Negative prompt, up to 2,500 characters.</ParamField>
    <ParamField body="multi_shot" type="boolean" default={false}>Enable multi-shot generation.</ParamField>
    <ParamField body="shot_type" type="string">Use `customize` or `intelligence`.</ParamField>
    <ParamField body="multi_prompt" type="object[]">One to six custom shots.</ParamField>
    <ParamField body="element_list" type="object[]">Up to three elements; mutually exclusive with `voice_list`.</ParamField>
    <ParamField body="voice_list" type="object[]">Up to two voices; requires `sound: "on"`.</ParamField>
    <ParamField body="static_mask" type="string">Static motion-brush mask.</ParamField>
    <ParamField body="dynamic_masks" type="object[]">Up to six dynamic masks.</ParamField>
    <ParamField body="camera_control" type="object">Preset or simple camera movement.</ParamField>
    <ParamField body="mode" type="string" default="std">Use `std`, `pro`, or `4k`.</ParamField>
    <ParamField body="duration" type="string" default="5">Video duration from 3 to 15 seconds.</ParamField>
    <ParamField body="cfg_scale" type="number" default={0.5}>Prompt adherence from 0 to 1.</ParamField>
    <ParamField body="watermark_info" type="object">Platform watermark setting.</ParamField>

    <ParamField body="multi_prompt[].index" type="integer" required>Shot index, starting from 1.</ParamField>
    <ParamField body="multi_prompt[].prompt" type="string" required>Shot prompt, up to 512 characters.</ParamField>
    <ParamField body="multi_prompt[].duration" type="string" required>Shot duration, at least 1 second; the sum must equal top-level `duration`.</ParamField>
    <ParamField body="element_list[].element_id" type="integer" required>Element ID returned by element management.</ParamField>
    <ParamField body="voice_list[].voice_id" type="string" required>Voice ID returned by voice management.</ParamField>
    <ParamField body="dynamic_masks[].mask" type="string" required>Dynamic mask URL or raw Base64.</ParamField>
    <ParamField body="dynamic_masks[].trajectories" type="object[]" required>Motion trajectory coordinates.</ParamField>
    <ParamField body="dynamic_masks[].trajectories[].x" type="integer" required>Horizontal coordinate from the bottom-left origin.</ParamField>
    <ParamField body="dynamic_masks[].trajectories[].y" type="integer" required>Vertical coordinate from the bottom-left origin.</ParamField>
    <ParamField body="camera_control.type" type="string" required>`simple` or one of four preset compound movements.</ParamField>
    <ParamField body="camera_control.config" type="object">Simple movement configuration; only one of six values may be nonzero.</ParamField>
    <ParamField body="watermark_info.enabled" type="boolean" default={false}>Add the platform watermark.</ParamField>

    ## Create response

    <ResponseField name="id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="task_id" type="string">Task ID, equal to `id`.</ResponseField>
    <ResponseField name="object" type="string">Always `video`.</ResponseField>
    <ResponseField name="model" type="string">Model used by the task.</ResponseField>
    <ResponseField name="status" type="string">Initial task status.</ResponseField>
    <ResponseField name="progress" type="integer">Initial progress.</ResponseField>
    <ResponseField name="created_at" type="integer">Creation Unix timestamp.</ResponseField>

    ### Image, storyboard, and motion-brush rules

    `image` and `image_tail` accept a public URL or raw Base64 without a data URI prefix. Use JPG, JPEG, or PNG up to 10 MB, at least 300 px per side, with an aspect ratio from 1:2.5 to 2.5:1. At least one frame is required. An end frame, motion brush, and camera control are mutually exclusive.

    Dynamic motion brush supports up to 6 masks. Mask dimensions must match the input image and each other. For a 5-second video, each trajectory contains 2–77 coordinates measured from the bottom-left corner.

    Multi-shot, voice, and camera-control rules are the same as text-to-video. `element_list` and `voice_list` cannot be used together.

    <Card title="Interactive request parameters" icon="code" href="/api-reference/model-api/kuaishou/kling-v3-i2v">
      Fill in and test every first/end-frame, storyboard, brush, element, voice, and camera field.
    </Card>

    ## Query Task

    ### Query by task ID

    `GET /kling/v1/videos/image2video/{task_id}`

    <ParamField path="task_id" type="string" required>Task ID returned by creation.</ParamField>

    The response includes AnyFast status fields and the original Kling `task_status`, `task_status_msg`, timestamps, and `task_result.videos[]`. A successful video contains `id`, `url`, `watermark_url`, and `duration`.

    ### Query task list

    `GET /kling/v1/videos/image2video?pageNum=1&pageSize=30`

    <ParamField query="pageNum" type="integer" default={1}>Page number, 1–1000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page, 1–500.</ParamField>
  </Tab>

  <Tab title="Omni Video Generation">
    ## Create Task

    `POST /kling/v1/videos/omni-video`

    Use `model_name: "kling-3.0-omni"` with text, images, video, and elements for generation or editing.

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/videos/omni-video \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model_name": "kling-3.0-omni",
          "prompt": "The character in <<<image_1>>> walks into a rainy neon street",
          "image_list": [{"image_url": "https://example.com/character.png"}],
          "duration": "5",
          "mode": "pro",
          "aspect_ratio": "16:9"
        }'
      ```

      ```json 200 theme={null}
      {"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v3-omni","status":"","progress":0,"created_at":1773130665}
      ```
    </div>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ## Request parameters

    <ParamField body="model_name" type="string" required>Use `kling-3.0-omni`.</ParamField>
    <ParamField body="prompt" type="string">Up to 2,500 characters; reference media with the official placeholders.</ParamField>
    <ParamField body="image_list" type="object[]">Reference images and optional first/end frames.</ParamField>
    <ParamField body="video_list" type="object[]">At most one reference video, including `refer_type` and `keep_original_sound`.</ParamField>
    <ParamField body="element_list" type="object[]">Element count depends on whether a video is supplied.</ParamField>
    <ParamField body="multi_shot" type="boolean" default={false}>Enable multi-shot generation.</ParamField>
    <ParamField body="shot_type" type="string">Use `customize` or `intelligence`.</ParamField>
    <ParamField body="multi_prompt" type="object[]">One to six custom shots.</ParamField>
    <ParamField body="mode" type="string" default="pro">Use `std`, `pro`, or `4k`.</ParamField>
    <ParamField body="aspect_ratio" type="string">Use `16:9`, `9:16`, or `1:1` when applicable.</ParamField>
    <ParamField body="duration" type="string" default="5">3–15 seconds; ignored for `refer_type: "base"`.</ParamField>
    <ParamField body="sound" type="string" default="off">Must be `off` when `video_list` is present.</ParamField>
    <ParamField body="watermark_info" type="object">Platform watermark setting.</ParamField>

    <ParamField body="image_list[].image_url" type="string" required>Reference image URL or raw Base64.</ParamField>
    <ParamField body="image_list[].type" type="string">`first_frame` or `end_frame`; an end frame requires a first frame.</ParamField>
    <ParamField body="video_list[].video_url" type="string" required>Reference video URL.</ParamField>
    <ParamField body="video_list[].refer_type" type="string" default="base">`base` edits the source video; `feature` references its characteristics.</ParamField>
    <ParamField body="video_list[].keep_original_sound" type="string">Use `yes` or `no`.</ParamField>
    <ParamField body="element_list[].element_id" type="integer" required>Element ID from element management.</ParamField>
    <ParamField body="multi_prompt[].index" type="integer" required>Shot index.</ParamField>
    <ParamField body="multi_prompt[].prompt" type="string" required>Shot prompt, up to 512 characters.</ParamField>
    <ParamField body="multi_prompt[].duration" type="string" required>Shot duration, at least 1 second.</ParamField>
    <ParamField body="watermark_info.enabled" type="boolean" default={false}>Add the platform watermark.</ParamField>

    ## Create response

    <ResponseField name="id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="task_id" type="string">Task ID, equal to `id`.</ResponseField>
    <ResponseField name="object" type="string">Always `video`.</ResponseField>
    <ResponseField name="model" type="string">`kling-v3-omni`.</ResponseField>
    <ResponseField name="status" type="string">Initial task status.</ResponseField>
    <ResponseField name="progress" type="integer">Initial progress.</ResponseField>
    <ResponseField name="created_at" type="integer">Creation Unix timestamp.</ResponseField>

    ### Media constraints

    Images accept URL or raw Base64, JPG/JPEG/PNG, up to 10 MB, at least 300 px per side, and aspect ratio 1:2.5 to 2.5:1. An end frame requires a first frame. Without a reference video, images plus multi-image elements total at most 7 and video-character elements at most 3. With a reference video, those limits become 4 and 1.

    Reference video accepts MP4/MOV, 3–15.5 seconds, up to 200 MB, 24–60 fps, dimensions 700–4553 px, no more than 8,294,400 pixels, and aspect ratio 1:2.5 to 2.5:1.

    `refer_type: "base"` edits the original video, preserves its duration, and disables multi-shot and first/end-frame controls. `refer_type: "feature"` references content, motion, style, or camera movement and can use intelligent multi-shot. `keep_original_sound` controls source audio; new sound generation is unavailable whenever a reference video is present.

    <Card title="Interactive request parameters" icon="code" href="/api-reference/model-api/kuaishou/kling-v3-omni">
      Fill in and test the complete Omni Legacy request body.
    </Card>

    ## Query Task

    ### Query by task ID

    `GET /kling/v1/videos/omni-video/{task_id}`
    <ParamField path="task_id" type="string" required>Task ID returned by creation.</ParamField>
    The result includes the AnyFast wrapper and original Kling `task_status`, `task_status_msg`, `task_result.videos[]`, and timestamps.

    ### Query task list

    `GET /kling/v1/videos/omni-video?pageNum=1&pageSize=30`
    <ParamField query="pageNum" type="integer" default={1}>Page number, 1–1000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page, 1–500.</ParamField>
  </Tab>

  <Tab title="Motion Control">
    ## Create Task

    `POST /kling/v1/videos/motion-control`

    Transfer movement from a reference video to a character image with `model_name: "kling-3.0"`.

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/videos/motion-control \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "model_name": "kling-3.0",
          "image_url": "https://example.com/character.png",
          "video_url": "https://example.com/motion.mp4",
          "prompt": "The character performs the reference action in a studio",
          "keep_original_sound": "yes",
          "character_orientation": "image",
          "mode": "pro"
        }'
      ```

      ```json 200 theme={null}
      {"id":"860260753860210752","task_id":"860260753860210752","object":"video","model":"kling-v3","status":"","progress":0,"created_at":1773130665}
      ```
    </div>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ## Request parameters

    <ParamField body="model_name" type="string" required>Use `kling-3.0`.</ParamField>
    <ParamField body="image_url" type="string" required>Character image as URL or raw Base64.</ParamField>
    <ParamField body="video_url" type="string" required>Motion reference video URL.</ParamField>
    <ParamField body="prompt" type="string">Scene, motion, or camera guidance, up to 2,500 characters.</ParamField>
    <ParamField body="element_list" type="object[]">At most one element.</ParamField>
    <ParamField body="keep_original_sound" type="string" default="yes">Use `yes` or `no`.</ParamField>
    <ParamField body="character_orientation" type="string" required>Use `image` or `video`.</ParamField>
    <ParamField body="mode" type="string" required>Use `std` or `pro`.</ParamField>
    <ParamField body="watermark_info" type="object">Platform watermark setting.</ParamField>

    <ParamField body="element_list[].element_id" type="integer" required>Element ID from element management; at most one.</ParamField>
    <ParamField body="watermark_info.enabled" type="boolean" default={false}>Add the platform watermark.</ParamField>

    ## Create response

    <ResponseField name="id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="task_id" type="string">Task ID, equal to `id`.</ResponseField>
    <ResponseField name="object" type="string">Always `video`.</ResponseField>
    <ResponseField name="model" type="string">`kling-v3`.</ResponseField>
    <ResponseField name="status" type="string">Initial task status.</ResponseField>
    <ResponseField name="progress" type="integer">Initial progress.</ResponseField>
    <ResponseField name="created_at" type="integer">Creation Unix timestamp.</ResponseField>

    The character image must be JPG/JPEG/PNG up to 10 MB, dimensions 300–65,536 px, and aspect ratio 1:2.5 to 2.5:1. The MP4/MOV motion video can be up to 100 MB with dimensions 340–3850 px. With `character_orientation: "image"`, the video may be 3–10 seconds; with `video`, it may be 3–30 seconds. Element references follow the video's orientation.

    <Warning>
      Complex or fast motion can produce a result shorter than the uploaded video because the model only extracts valid continuous action segments. Generation can proceed once at least 3 seconds of usable continuous motion is found. Credits consumed in this case are non-refundable, so reduce the motion complexity or speed when necessary.
    </Warning>

    <Card title="Interactive request parameters" icon="code" href="/api-reference/model-api/kuaishou/kling-v3-motion-control">
      Fill in and test the complete motion-control request body.
    </Card>

    ## Query Task

    ### Query by task ID

    `GET /kling/v1/videos/motion-control/{task_id}`
    <ParamField path="task_id" type="string" required>Task ID returned by creation.</ParamField>
    The response status and `task_result.videos[]` match the other Kling Legacy video operations.

    ### Query task list

    `GET /kling/v1/videos/motion-control?pageNum=1&pageSize=30`
    <ParamField query="pageNum" type="integer" default={1}>Page number, 1–1000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page, 1–500.</ParamField>
  </Tab>

  <Tab title="Element Management">
    ## Element APIs

    | Operation             | Method and path                          |
    | --------------------- | ---------------------------------------- |
    | Create custom element | `POST /kling/v1/general/custom-elements` |
    | List custom elements  | `GET /kling/v1/general/custom-elements`  |
    | List preset elements  | `GET /kling/v1/general/presets-elements` |

    ## Create a custom element

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/general/custom-elements \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "element_name": "my-character",
          "element_description": "The lead character",
          "element_frontal_image": "https://example.com/front.png",
          "element_refer_list": [
            {"image_url": "https://example.com/side.png"},
            {"image_url": "https://example.com/close-up.png"}
          ],
          "tag_list": [{"tag_id": "o_102"}]
        }'
      ```

      ```json 200 theme={null}
      {
        "code": 0,
        "message": "string",
        "request_id": "string",
        "data": {
          "element_id": 0,
          "element_name": "string",
          "element_description": "string",
          "element_frontal_image": "image_url_0",
          "element_refer_list": [{"image_url": "image_url_1"}],
          "tag_list": [{"id": "o_102", "name": "Character", "description": "string"}],
          "owned_by": "string"
        }
      }
      ```
    </div>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Use `application/json`.</ParamField>

    ## Request body

    <ParamField body="element_name" type="string" required>Element name, up to 20 characters.</ParamField>
    <ParamField body="element_description" type="string" required>Element description, up to 100 characters.</ParamField>
    <ParamField body="element_frontal_image" type="string" required>Front-view image as an accessible URL or raw Base64 without a data URI prefix.</ParamField>
    <ParamField body="element_refer_list" type="object[]" required>One to three alternate-angle reference images.</ParamField>
    <ParamField body="element_refer_list[].image_url" type="string" required>Reference image URL or raw Base64 without a data URI prefix.</ParamField>
    <ParamField body="tag_list" type="object[]">Element tags.</ParamField>
    <ParamField body="tag_list[].tag_id" type="string" required>`o_101` trend, `o_102` character, `o_103` animal, `o_104` item, `o_105` costume, `o_106` scene, `o_107` effect, or `o_108` other.</ParamField>

    Images support JPG, JPEG, and PNG, up to 10 MB each. Both dimensions must be at least 300 px and the aspect ratio must be between 1:2.5 and 2.5:1.

    ## Create response

    <ResponseField name="code" type="integer">Error code; `0` indicates success.</ResponseField>
    <ResponseField name="message" type="string">Error information or success message.</ResponseField>
    <ResponseField name="request_id" type="string">System-generated request ID for tracking and troubleshooting.</ResponseField>
    <ResponseField name="data.element_id" type="integer">Element ID used by supported video APIs.</ResponseField>
    <ResponseField name="data.element_name" type="string">Element name.</ResponseField>
    <ResponseField name="data.element_description" type="string">Element description.</ResponseField>
    <ResponseField name="data.element_frontal_image" type="string">Front-view reference image URL.</ResponseField>
    <ResponseField name="data.element_refer_list" type="object[]">Alternate-angle reference images.</ResponseField>
    <ResponseField name="data.element_refer_list[].image_url" type="string">Reference image URL.</ResponseField>
    <ResponseField name="data.tag_list" type="object[]">Element tags.</ResponseField>
    <ResponseField name="data.tag_list[].id" type="string">Tag ID.</ResponseField>
    <ResponseField name="data.tag_list[].name" type="string">Tag name.</ResponseField>
    <ResponseField name="data.tag_list[].description" type="string">Tag description.</ResponseField>
    <ResponseField name="data.owned_by" type="string">Element owner; `kling` identifies an official preset.</ResponseField>

    ## List custom elements

    `GET /kling/v1/general/custom-elements?pageNum=1&pageSize=30`

    <ParamField query="pageNum" type="integer" default={1}>Page number from 1 to 1,000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page from 1 to 500.</ParamField>

    The response contains `code`, `message`, `request_id`, and `data[]`. Each item contains all element fields from the create response plus `final_unit_deduction`, the final units deducted for creation.

    ```json 200 theme={null}
    {
      "code": 0,
      "message": "string",
      "request_id": "string",
      "data": [{
        "element_id": 0,
        "element_name": "string",
        "element_description": "string",
        "element_frontal_image": "image_url_0",
        "element_refer_list": [{"image_url": "image_url_1"}],
        "tag_list": [{"id": "o_102", "name": "Character", "description": "string"}],
        "final_unit_deduction": "string",
        "owned_by": "string"
      }]
    }
    ```

    ## List preset elements

    `GET /kling/v1/general/presets-elements?pageNum=1&pageSize=30`

    <ParamField query="pageNum" type="integer" default={1}>Page number from 1 to 1,000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page from 1 to 500.</ParamField>

    The response matches the custom list without `final_unit_deduction`. Official preset elements have `owned_by: "kling"`.

    <Note>This page strictly documents the Kling Legacy element API.</Note>
  </Tab>

  <Tab title="Voice Management">
    ## Voice APIs

    | Operation           | Method and path                            |
    | ------------------- | ------------------------------------------ |
    | Create custom voice | `POST /kling/v1/general/custom-voices`     |
    | Query custom voice  | `GET /kling/v1/general/custom-voices/{id}` |
    | List custom voices  | `GET /kling/v1/general/custom-voices`      |
    | List preset voices  | `GET /kling/v1/general/presets-voices`     |
    | Delete custom voice | `POST /kling/v1/general/delete-voices`     |

    ### Create and query

    `voice_name` is at most 20 characters. Supply at least one of `voice_url` or `video_id`. A voice URL may point to MP3, WAV, MP4, or MOV containing one clean speaker for 5–30 seconds. A qualifying historical generated video can be supplied through `video_id` under the same audio constraints.

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request POST \
        --url https://www.anyfast.ai/kling/v1/general/custom-voices \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "voice_name": "narrator",
          "voice_url": "https://example.com/voice.mp3"
        }'
      ```

      ```json 200 theme={null}
      {"code":0,"message":"SUCCEED","request_id":"request-id","data":{"task_id":"850087542757535834","task_status":"submitted"}}
      ```
    </div>

    ## Request headers

    <ParamField header="Authorization" type="string" required>Bearer authentication in the form `Bearer YOUR_API_KEY`.</ParamField>
    <ParamField header="Content-Type" type="string" default="application/json" required>Data exchange format. Use `application/json`.</ParamField>

    ## Request parameters

    <ParamField body="voice_name" type="string" required>Custom voice name, up to 20 characters.</ParamField>
    <ParamField body="voice_url" type="string">Public MP3, WAV, MP4, or MOV URL; at least one source is required.</ParamField>
    <ParamField body="video_id" type="string">Eligible historical generated-video ID; at least one source is required.</ParamField>

    ## Create response

    <ResponseField name="code" type="integer">`0` indicates success.</ResponseField>
    <ResponseField name="message" type="string">Response message.</ResponseField>
    <ResponseField name="request_id" type="string">Request ID.</ResponseField>
    <ResponseField name="data.task_id" type="string">Voice creation task ID.</ResponseField>
    <ResponseField name="data.task_status" type="string">`submitted`, `processing`, `succeed`, or `failed`.</ResponseField>
    <ResponseField name="data.task_status_msg" type="string">Failure reason.</ResponseField>
    <ResponseField name="data.task_result.voices" type="object[]">Created voices.</ResponseField>

    ### Query custom voice

    `GET /kling/v1/general/custom-voices/{id}`
    <ParamField path="id" type="string" required>Task ID returned by voice creation.</ParamField>
    Successful voice items contain `voice_id`, `voice_name`, `trial_url`, and `owned_by`.

    ### List custom voices

    `GET /kling/v1/general/custom-voices?pageNum=1&pageSize=30`
    <ParamField query="pageNum" type="integer" default={1}>Page number, 1–1000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page, 1–1000.</ParamField>

    ### List preset voices

    `GET /kling/v1/general/presets-voices?pageNum=1&pageSize=30`
    <ParamField query="pageNum" type="integer" default={1}>Page number, 1–1000.</ParamField>
    <ParamField query="pageSize" type="integer" default={30}>Items per page, 1–1000.</ParamField>
    Preset voices have `owned_by: "kling"` and cannot be deleted.

    ### Delete custom voice

    `POST /kling/v1/general/delete-voices`
    <ParamField body="voice_id" type="string" required>Custom voice ID to delete.</ParamField>
    The response contains `code`, `message`, `request_id`, and deletion task data.

    <Card title="Voice Management APIs" icon="microphone" href="/api-reference/model-api/kuaishou/kling-voice-management">
      Open the interactive reference for each voice operation.
    </Card>
  </Tab>
</Tabs>

<Note>
  These references use Kling's Legacy request structures. AnyFast adds the `/kling` route prefix while retaining the Legacy endpoint names and request fields.
</Note>

<script src="/feedback.js" />
