# Kling 2.6 Motion Control API

> Kling 2.6 Motion Control — high-quality AI video generation.

- **Provider**: Kling
- **Model id**: `kling-2-6-motion-control`
- **Modality**: video
- **Price**: 6.44–10.54 credits /sec

## Overview

Kling 2.6 Motion Control is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `kling-2-6-motion-control` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL to receive a signed webhook on completion |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | No | A text description of the desired output. Maximum length is 2500 characters. (default: A vintage motorcycle leans through a rain-slicked mountain bend, headlight streaking the wet asphalt as the camera tracks smoothly alongside in a controlled pan.) |
| input_urls | string[] | Yes | Reference image. The characters, backgrounds, and other elements in the generated video are based on the reference image. Supports .jpg/.jpeg/.png, max 10MB, size needs to be greater than 300px, aspect ratio 2:5 to 5:2. (image URL) |
| video_urls | string[] | Yes | Reference video. The character actions in the generated video are consistent with the reference video. Supports .mp4/.mov, max 100MB, 3-30 seconds duration depending on character_orientation. (image URL) |
| character_orientation | string | Yes | Generate the orientation of the characters in the video. 'image': same orientation as the person in the picture (max 10s video). 'video': consistent with the orientation of the characters in the video (max 30s video). (options: image | video) (default: video) |
| mode | string | Yes | Output resolution mode. Use 'std' for 720p or 'pro' for 1080p. (options: 720p | 1080p) (default: 720p) |

### Request example

```json
{
  "modelId": "kling-2-6-motion-control",
  "input": {
    "prompt": "A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.",
    "input_urls": [
      "https://example.com/input.jpg"
    ],
    "video_urls": [
      "https://example.com/input.jpg"
    ],
    "character_orientation": "video",
    "mode": "720p"
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 24
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=kling-2-6-motion-control`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, check API Key |
| 402 | Insufficient account balance |
| 422 | Parameter validation failed |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |
