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

# Kling Image to Video

> Kling first-frame, first/last-frame, Element and voice inputs.

Authenticate with your MixRoute API Key using `Authorization: Bearer $MIXROUTE_API_KEY` and send JSON. The model ID belongs in the URL, not a body `model` field. Do not add `/v1` or wrap the request in `metadata`.

## Supported Models

| Model ID | Resolution | Standard Generation Duration (s) |
| - | - | - |
| [kling-3.0](/model-api/kuaishou/kling-3.0) | 720p / 1080p / 4k | 3-15 |
| [kling-3.0-turbo](/model-api/kuaishou/kling-3.0-turbo) | 720p / 1080p | 3-15 |
| [kling-2.6](/model-api/kuaishou/kling-2.6) | 720p / 1080p | 5 / 10 |
| [kling-2.5-turbo](/model-api/kuaishou/kling-2.5-turbo) | 720p / 1080p | 5 / 10 |

## Contents

| Field | Type | Required | Description |
| - | - | - | - |
| `contents` | object\[] | Yes | Input collection. A first frame is required; last-frame-only input is unsupported. Keep each type and its fields in one object. |
| `contents[].type` | string | Yes | Required per item. prompt, first\_frame; last\_frame for 3.0/2.6/2.5 Turbo; element for 3.0 only; voice for 2.6 only. |
| `contents[].text` | string | By type | Required for prompt items. 3.0: maximum 3072 characters (2500 recommended); other models: maximum 2500. |
| `contents[].url` | string | By type | Required for first\_frame/last\_frame: public image URL or Base64. |
| `contents[].element_id` | string | By type | Required for element items; 3.0 supports up to 3 Elements. |
| `contents[].voice_id` | string | By type | Required for voice items; 2.6 supports up to 2 voices with audio=native and 1080p. |
| `contents[].id` | string | By type | Required for element/voice items, unique within the task; reference as @id in the prompt. |

## Generation Settings

| Field | Type | Required | Description |
| - | - | - | - |
| `settings.resolution` | string | No | Defaults to 720p. 3.0: 720p/1080p/4k; other models: 720p/1080p. First/last-frame mode requires 1080p for 2.6/2.5 Turbo. |
| `settings.duration` | integer | No | Defaults to 5. 3-15 for 3.0/3.0 Turbo; only 5 or 10 for 2.6/2.5 Turbo. |
| `settings.audio` | string | No | 3.0/2.6 support off (default) or native. 2.6 native audio requires 1080p. Omit for 3.0 Turbo and 2.5 Turbo. |
| `settings.multi_shot` | boolean | No | 3.0 only, defaults to true. false prevents multi-shot output even with storyboard prompts. |

The standard image-to-video endpoint has no `aspect_ratio`; framing follows the image. 3.0 Turbo accepts only a first frame, not a last frame, Element or voice reference. Reference 3.0 Elements as `@id`, avoiding overlapping names; storyboard syntax matches text-to-video.

## Image Limits

JPG/JPEG/PNG, at most 50 MB per image, both dimensions at least 300 px, aspect ratio between 1:2.5 and 2.5:1. Supply a first frame or first+last frames, never a last frame alone. Asset IDs must be accessible to the routed upstream account.

## Request Example

Set the `MIXROUTE_API_KEY` environment variable. Replace `example.com` media URLs with real, publicly accessible files.

```bash theme={null}
curl --request POST "https://api.mixroute.ai/kling/image-to-video/kling-3.0" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "contents": [
    {
      "type": "prompt",
      "text": "A closed gift box slowly opens to reveal a ceramic mug."
    },
    {
      "type": "first_frame",
      "url": "https://example.com/first.png"
    },
    {
      "type": "last_frame",
      "url": "https://example.com/last.png"
    }
  ],
  "settings": {
    "resolution": "1080p",
    "duration": 5,
    "audio": "native",
    "multi_shot": false
  }
}'
```

See [Kling Overview](/api-reference/endpoint/kling).

## Submission Response

```json theme={null}
{
  "code": 0,
  "message": "",
  "request_id": "REQUEST_ID",
  "data": {
    "id": "task_example",
    "status": "submitted"
  }
}
```

Keep `data.id` and use [Query Kling Task](/api-reference/endpoint/kling-tasks) until `succeeded` or `failed`. Successful submission does not mean generation has finished.


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