> ## 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": "queued",
        "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 by ID

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

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

    ### Path parameters

    <ParamField path="task_id" type="string" required>Text-to-video task ID returned by the create endpoint.</ParamField>

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/kling/v1/videos/text2video/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": 0,
        "data": {
          "created_at": 1784720894000,
          "task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "task_result": {
            "videos": [{
              "duration": "5",
              "url": "https://example.com/generated-video.mp4"
            }]
          },
          "task_status": "succeed",
          "updated_at": 1784721103000
        },
        "message": ""
      }
      ```
    </div>

    ### Response fields

    <ResponseField name="code" type="integer">`0` indicates that the query was accepted.</ResponseField>
    <ResponseField name="message" type="string">Error information; empty for a successful query.</ResponseField>
    <ResponseField name="data.task_id" type="string">Queried 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 details when the task fails.</ResponseField>
    <ResponseField name="data.task_result.videos" type="object[]">Generated videos, returned after success.</ResponseField>
    <ResponseField name="data.task_result.videos[].url" type="string">Temporary generated-video URL.</ResponseField>
    <ResponseField name="data.task_result.videos[].duration" type="string">Actual duration in seconds.</ResponseField>
    <ResponseField name="data.created_at" type="integer">Creation Unix timestamp in milliseconds.</ResponseField>
    <ResponseField name="data.updated_at" type="integer">Last update Unix timestamp in milliseconds.</ResponseField>
  </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":"queued","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 by ID

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

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

    ### Path parameters

    <ParamField path="task_id" type="string" required>Image-to-video task ID returned by the create endpoint.</ParamField>

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/kling/v1/videos/image2video/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": 0,
        "data": {
          "created_at": 1784720894000,
          "task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "task_result": {
            "videos": [{
              "duration": "5",
              "url": "https://example.com/generated-video.mp4"
            }]
          },
          "task_status": "succeed",
          "updated_at": 1784721103000
        },
        "message": ""
      }
      ```
    </div>

    ### Response fields

    <ResponseField name="code" type="integer">`0` indicates that the query was accepted.</ResponseField>
    <ResponseField name="message" type="string">Error information; empty for a successful query.</ResponseField>
    <ResponseField name="data.task_id" type="string">Queried 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 details when the task fails.</ResponseField>
    <ResponseField name="data.task_result.videos" type="object[]">Generated videos, returned after success.</ResponseField>
    <ResponseField name="data.task_result.videos[].url" type="string">Temporary generated-video URL.</ResponseField>
    <ResponseField name="data.task_result.videos[].duration" type="string">Actual duration in seconds.</ResponseField>
    <ResponseField name="data.created_at" type="integer">Creation Unix timestamp in milliseconds.</ResponseField>
    <ResponseField name="data.updated_at" type="integer">Last update Unix timestamp in milliseconds.</ResponseField>
  </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":"queued","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 by ID

    `GET /kling/v1/videos/omni-video/{task_id}`

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

    ### Path parameters

    <ParamField path="task_id" type="string" required>Omni-video task ID returned by the create endpoint.</ParamField>

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/kling/v1/videos/omni-video/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": 0,
        "data": {
          "created_at": 1784516360000,
          "task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "task_result": {
            "videos": [{
              "duration": "5",
              "url": "https://example.com/generated-video.mp4"
            }]
          },
          "task_status": "succeed",
          "updated_at": 1784516573000
        },
        "message": ""
      }
      ```
    </div>

    ### Response fields

    <ResponseField name="code" type="integer">`0` indicates that the query was accepted.</ResponseField>
    <ResponseField name="message" type="string">Error information; empty for a successful query.</ResponseField>
    <ResponseField name="data.task_id" type="string">Queried 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 details when the task fails.</ResponseField>
    <ResponseField name="data.task_result.videos" type="object[]">Generated videos, returned after success.</ResponseField>
    <ResponseField name="data.task_result.videos[].url" type="string">Temporary generated-video URL.</ResponseField>
    <ResponseField name="data.task_result.videos[].duration" type="string">Actual duration in seconds.</ResponseField>
    <ResponseField name="data.created_at" type="integer">Creation Unix timestamp in milliseconds.</ResponseField>
    <ResponseField name="data.updated_at" type="integer">Last update Unix timestamp in milliseconds.</ResponseField>
  </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":"queued","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 by ID

    `GET /kling/v1/videos/motion-control/{task_id}`

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

    ### Path parameters

    <ParamField path="task_id" type="string" required>Motion-control task ID returned by the create endpoint.</ParamField>

    <div className="kling-api-example-panel">
      ```bash cURL theme={null}
      curl --request GET \
        --url https://www.anyfast.ai/kling/v1/videos/motion-control/TASK_ID \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json'
      ```

      ```json 200 theme={null}
      {
        "code": 0,
        "data": {
          "created_at": 1784720894000,
          "task_id": "asyntask_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "task_result": {
            "videos": [{
              "duration": "5",
              "url": "https://example.com/generated-video.mp4"
            }]
          },
          "task_status": "succeed",
          "updated_at": 1784721103000
        },
        "message": ""
      }
      ```
    </div>

    ### Response fields

    <ResponseField name="code" type="integer">`0` indicates that the query was accepted.</ResponseField>
    <ResponseField name="message" type="string">Error information; empty for a successful query.</ResponseField>
    <ResponseField name="data.task_id" type="string">Queried 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 details when the task fails.</ResponseField>
    <ResponseField name="data.task_result.videos" type="object[]">Generated videos, returned after success.</ResponseField>
    <ResponseField name="data.task_result.videos[].url" type="string">Temporary generated-video URL.</ResponseField>
    <ResponseField name="data.task_result.videos[].duration" type="string">Actual duration in seconds.</ResponseField>
    <ResponseField name="data.created_at" type="integer">Creation Unix timestamp in milliseconds.</ResponseField>
    <ResponseField name="data.updated_at" type="integer">Last update Unix timestamp in milliseconds.</ResponseField>
  </Tab>

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

    | Operation             | Method and path                                            |
    | --------------------- | ---------------------------------------------------------- |
    | Create custom element | `POST /kling/v1/general/advanced-custom-elements`          |
    | Query custom element  | `GET /kling/v1/general/advanced-custom-elements/{task_id}` |
    | List preset elements  | `GET /kling/v1/general/advanced-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/advanced-custom-elements \
        --header 'Authorization: Bearer YOUR_API_KEY' \
        --header 'Content-Type: application/json' \
        --data '{
          "element_name": "my-character",
          "element_description": "The lead character",
          "reference_type": "image_refer",
          "element_image_list": {
            "frontal_image": "https://example.com/front.png",
            "refer_images": [
              {"image_url": "https://example.com/side.png"}
            ]
          },
          "tag_list": [{"tag_id": "o_102"}]
        }'
      ```

      ```json 200 theme={null}
      {
        "id": "863121016086724692",
        "task_id": "863121016086724692",
        "object": "video",
        "model": "kling-element",
        "status": "queued",
        "progress": 0,
        "created_at": 1773812605
      }
      ```
    </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="reference_type" type="string" required>`image_refer` for image references or `video_refer` for one reference video.</ParamField>
    <ParamField body="element_image_list" type="object">Required when `reference_type` is `image_refer`.</ParamField>
    <ParamField body="element_image_list.frontal_image" type="string">Front-view image URL or raw Base64 without a data URI prefix.</ParamField>
    <ParamField body="element_image_list.refer_images" type="object[]">One to three alternate-angle or close-up images.</ParamField>
    <ParamField body="element_image_list.refer_images[].image_url" type="string">Reference image URL or raw Base64.</ParamField>
    <ParamField body="element_video_list" type="object">Required when `reference_type` is `video_refer`.</ParamField>
    <ParamField body="element_video_list.refer_videos" type="object[]">Exactly one reference video.</ParamField>
    <ParamField body="element_video_list.refer_videos[].video_url" type="string">Public MP4 or MOV URL. The video must be 3–8 seconds, 1080p, 16:9 or 9:16, and no larger than 200 MB.</ParamField>
    <ParamField body="element_voice_id" type="string">Optional voice ID to bind to the element.</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="id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="task_id" type="string">Task ID, identical to `id`.</ResponseField>
    <ResponseField name="object" type="string">Object type; currently `video`.</ResponseField>
    <ResponseField name="model" type="string">Fixed value `kling-element`.</ResponseField>
    <ResponseField name="status" type="string">Initial task status, normally `queued`.</ResponseField>
    <ResponseField name="progress" type="integer">Task progress from 0 to 100.</ResponseField>
    <ResponseField name="created_at" type="integer">Creation Unix timestamp.</ResponseField>

    ## Query a custom element

    `GET /kling/v1/general/advanced-custom-elements/{task_id}`

    ```bash cURL theme={null}
    curl --request GET \
      --url https://www.anyfast.ai/kling/v1/general/advanced-custom-elements/TASK_ID \
      --header 'Authorization: Bearer YOUR_API_KEY'
    ```

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

    The result uses `data.task_status` (`submitted`, `processing`, `succeed`, or `failed`). After success, read `data.task_result.elements[]`; each item includes `element_id`, name, description, reference media, optional voice information, tags, ownership, and status.

    ## List preset elements

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

    ```bash cURL theme={null}
    curl --request GET \
      --url 'https://www.anyfast.ai/kling/v1/general/advanced-presets-elements?pageNum=1&pageSize=30' \
      --header 'Authorization: Bearer YOUR_API_KEY'
    ```

    <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 returns task records in `data[]`. Read each record's preset elements from `task_result.elements[]`. Current preset elements return `owned_by: "vod"`.

    <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 preset voices  | `GET /kling/v1/general/presets-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}
      {"id":"850087542757535834","task_id":"850087542757535834","object":"video","model":"kling-voices","status":"queued","progress":0,"created_at":1773812605}
      ```
    </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="id" type="string">AnyFast task ID.</ResponseField>
    <ResponseField name="task_id" type="string">Task ID, identical to `id`.</ResponseField>
    <ResponseField name="object" type="string">Object type; currently `video`.</ResponseField>
    <ResponseField name="model" type="string">Fixed value `kling-voices`.</ResponseField>
    <ResponseField name="status" type="string">Initial task status, normally `queued`.</ResponseField>
    <ResponseField name="progress" type="integer">Task progress from 0 to 100.</ResponseField>
    <ResponseField name="created_at" type="integer">Creation Unix timestamp.</ResponseField>

    ### Query custom voice

    `GET /kling/v1/general/custom-voices/{id}`

    ```bash cURL theme={null}
    curl --request GET \
      --url https://www.anyfast.ai/kling/v1/general/custom-voices/TASK_ID \
      --header 'Authorization: Bearer YOUR_API_KEY'
    ```

    <ParamField path="id" type="string" required>Task ID returned by voice creation.</ParamField>
    The result uses `data.task_status`. After success, `data.task_result.voices[]` contains `voice_id`, `voice_name`, `trial_url`, `owned_by`, and `status`.

    ### List preset voices

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

    ```bash cURL theme={null}
    curl --request GET \
      --url 'https://www.anyfast.ai/kling/v1/general/presets-voices?pageNum=1&pageSize=30' \
      --header 'Authorization: Bearer YOUR_API_KEY'
    ```

    <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 records are returned in `data[]`; read voices from `task_result.voices[]`. Current preset voices return `owned_by: "vod"`.

    <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" />
