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

> Use Kling 2.6 through AnyFast's upgraded v2 text-to-video and image-to-video APIs.

Kling 2.6 uses the upgraded Kling v2 interface. The model is selected in the URL path; do not send `model_name` or Legacy flat fields.

## Capabilities

* **Text to video** — Generate 5- or 10-second videos from a prompt.
* **Image to video** — Animate a first frame with a prompt.
* **Task query** — Query accepted tasks through the shared v2 task endpoint.

| Capability | Endpoint | Main input |
| - | - | - |
| Text to video | `POST /kling/v2/text-to-video/kling-2.6` | `prompt` |
| Image to video | `POST /kling/v2/image-to-video/kling-2.6` | `contents` with a prompt and first frame |
| Query task | `GET /kling/v2/tasks?task_ids=TASK_ID` | System task ID |

## Text to video

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/kling/v2/text-to-video/kling-2.6 \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "A corgi runs along a wet beach at sunset",
    "settings": {"resolution": "720p", "duration": 5, "aspect_ratio": "16:9"}
  }'
```

## Image to video

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/kling/v2/image-to-video/kling-2.6 \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "contents": [
      {"type": "prompt", "text": "The person smiles and waves at the camera"},
      {"type": "first_frame", "url": "https://example.com/first-frame.png"}
    ],
    "settings": {"resolution": "720p", "duration": 5}
  }'
```

The v2 create response returns `data.id`. Poll `GET /kling/v2/tasks?task_ids=TASK_ID` until `data[].status` is `succeeded` or `failed`, then read `data[].outputs[]`.

> [!NOTE]
>
> For this model, `settings.duration` accepts 5 or 10. Use a numeric value. Native audio, reusable voices, motion control, and other resource workflows remain separate capabilities and are documented on their own pages.

## Additional Kling 2.6 controls

### Native audio and reusable voices

Kling 2.6 can generate synchronized audio when the supported request channel enables it. A reusable voice is selected with a `voice_list` item containing a `voice_id`; reference it in the prompt with `<<<voice_1>>>` or `<<<voice_2>>>`. Use at most two voices and keep the audio setting enabled when a voice is referenced. Voice IDs come from the [Voice Management](https://docs.anyfast.ai/guides/model-api/kling/kling-voice-management.md) workflow.

### Camera control

Camera control accepts a preset movement or a `simple` configuration. Preset values include `simple`, `down_back`, `forward_up`, `right_turn_forward`, and `left_turn_forward`. In `simple` mode, set one nonzero value among `horizontal`, `vertical`, `pan`, `tilt`, `roll`, and `zoom`; each value ranges from -10 to 10. End-frame input, motion brush, and camera control cannot be combined.

### Motion brush

Image-to-video supports a `static_mask` and up to six `dynamic_masks`. Dynamic masks contain a mask image and trajectories with 2–77 coordinates for a 5-second output. Mask dimensions must match the input image and one another. Use JPG, JPEG, or PNG images up to 10 MB, with both sides at least 300 px and an aspect ratio from 1:2.5 to 2.5:1.

### Motion control

Motion control transfers movement from an MP4 or MOV reference video to a character image. The image accepts URL or raw Base64 input up to 10 MB. The reference video is at most 100 MB, at least 3 seconds, and may be up to 10 seconds with image orientation or 30 seconds with video orientation. Fast or complex movement can produce a shorter result because only a continuous usable segment is extracted.

> [card] [Kling 2.6 API reference](https://docs.anyfast.ai/api-reference/model-api/kling/kling-2.6.md)
>
> View the v2 request and response fields.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.