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

# KLING 4.0 Video: Routes & Request Parameters

> KLING 4.0 video generation on Channel MG in 720p and 1080p with multimodal reference support

> [!NOTE]
>
> **Key points for AI agents**
>
> * Endpoint: `POST https://1788.love/v1/videos` with `Authorization: Bearer YOUR_1788_API_KEY`. See [Async tasks](https://docs.1788.love/en/guides/async-tasks.md).
> * Two models on Channel MG: `kling-mg-720` (720p) and `kling-mg-1080` (1080p). Omit `resolution` or match the model name.
> * Supports up to 10 images (`first_frame` / `reference_image`) and 5 reference videos (`reference_video`). **Reference audio and `last_frame` are not supported.**
> * When passing reference videos, `reference_video_duration` (1–150 integer seconds) is required; billing is `ref seconds + output seconds`.
> * See the [Price List](https://1788.love/pricing) for live rates.

## Routes

| Model ID | Channel | Billing | Resolution | Duration (s) | Aspect ratios | Limits (img / vid / aud) | First / Last frame |
| - | - | - | - | - | - | - | - |
| `kling-mg-720` | MG | Per sec (`ref + output`) | Fixed `720p` | 3–30 | `16:9` `9:16` `1:1` `4:3` `3:4` `21:9` | 10 / 5 / **0** | First ✓ (as ref) / Last ✗ |
| `kling-mg-1080` | MG | Per sec (`ref + output`) | Fixed `1080p` | 3–30 | Same as above | 10 / 5 / **0** | Same as above |

## Examples

### Text-to-video (720p)

```bash theme={null}
curl https://1788.love/v1/videos \
  -H "Authorization: Bearer YOUR_1788_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-mg-720",
    "prompt": "A city rooftop at night, camera orbiting a girl playing acoustic guitar",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
```

### Multimodal reference (1080p)

```json theme={null}
{
  "model": "kling-mg-1080",
  "prompt": "The character from image 1 dances following the motion in video 1",
  "duration": 8,
  "aspect_ratio": "9:16",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_A.png", "role": "reference_image" }
  ],
  "video_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_C.mp4", "role": "reference_video" }
  ],
  "reference_video_duration": 6
}
```


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