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

# Pembuatan Video Kontrol Gerak Kling v2.6

>  - Model kontrol gerak Kling (gambar referensi + video referensi)
- Dipanggil melalui endpoint terpadu `/v1/videos/generations`
- Mendukung orientasi karakter gambar/video, durasi maksimum masing-masing 10 dtk / 30 dtk
- Tugas asinkron — mengembalikan task_id saat dikirim 

```bash cURL theme={null}
curl --request POST \
  --url https://gccai.heqingsong.uk/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "kling-v2-6-motion-control",
    "prompt": "Keep the character consistent, perform a turn and wave following the reference video, cinematic lighting",
    "image_url": "https://example.com/ref-image.png",
    "video_url": "https://example.com/ref-video-8s.mp4",
    "keep_original_sound": "yes",
    "character_orientation": "image",
    "mode": "std",
    "watermark_info": {"enabled": false}
  }'
```

```python Python theme={null}
import requests

url = "https://gccai.heqingsong.uk/v1/videos/generations"

payload = {
    "model": "kling-v2-6-motion-control",
    "prompt": "Keep the character consistent, perform a turn and wave following the reference video, cinematic lighting",
    "image_url": "https://example.com/ref-image.png",
    "video_url": "https://example.com/ref-video-8s.mp4",
    "keep_original_sound": "yes",
    "character_orientation": "image",
    "mode": "std",
    "watermark_info": {"enabled": False}
}

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript JavaScript theme={null}
const url = "https://gccai.heqingsong.uk/v1/videos/generations";

const payload = {
  model: "kling-v2-6-motion-control",
  prompt: "Keep the character consistent, perform a turn and wave following the reference video, cinematic lighting",
  image_url: "https://example.com/ref-image.png",
  video_url: "https://example.com/ref-video-8s.mp4",
  keep_original_sound: "yes",
  character_orientation: "image",
  mode: "std",
  watermark_info: { enabled: false }
};

const headers = {
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(payload)
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

```json 200 theme={null}
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
    }
  ]
}
```

```json 400 theme={null}
{
  "error": {
    "code": 400,
    "message": "Invalid request parameters",
    "type": "invalid_request_error"
  }
}
```

```json 401 theme={null}
{
  "error": {
    "code": 401,
    "message": "Authentication failed. Please check your API key.",
    "type": "authentication_error"
  }
}
```

```json 402 theme={null}
{
  "error": {
    "code": 402,
    "message": "Insufficient account balance. Please top up and try again.",
    "type": "payment_required"
  }
}
```

```json 429 theme={null}
{
  "error": {
    "code": 429,
    "message": "Too many requests. Please try again later.",
    "type": "rate_limit_error"
  }
}
```

```json 500 theme={null}
{
  "error": {
    "code": 500,
    "message": "Internal server error. Please try again later.",
    "type": "server_error"
  }
}
```

## Autentikasi

**Authorization** `string` *required*

Semua request memerlukan autentikasi Bearer Token

Dapatkan API Key Anda:

Kunjungi [halaman Manajemen API Key](https://gccai.heqingsong.uk/keys) untuk memperoleh API Key Anda

Tambahkan header berikut ke setiap request:

```
Authorization: Bearer YOUR_API_KEY
```

## Parameter Request

**model** `string` *required*

Nama model: `kling-v3-motion-control` atau `kling-v2-6-motion-control`

**nsfw\_check** `boolean` (default: false)

Menentukan apakah moderasi konten dijalankan sebelum tugas video dikirim.

* `true`: periksa prompt dan gambar input dengan `omni-moderation-latest`
* `false` atau dihilangkan: tidak mengirim permintaan moderasi, tanpa biaya atau latensi moderasi tambahan (default)

**prompt** `string`

Prompt teks yang menjelaskan gerakan, pergerakan kamera, dan gaya yang diinginkan

Opsional tetapi direkomendasikan — deskripsi yang lebih spesifik menghasilkan hasil yang lebih stabil

Contoh: `"The character dances following the video referensi, smooth motion, realistic style"`

**image\_url** `string` *required*

URL gambar referensi

Harus berupa tautan yang dapat diakses publik

**video\_url** `string` *required*

URL video referensi

Harus berupa tautan langsung yang dapat diakses publik; mp4/mov direkomendasikan, di bawah 100MB

> [!WARNING]
>
> Server memeriksa durasi aktual `video_url`. Minimum 3 detik; maksimum ditentukan oleh `character_orientation`.

**keep\_original\_sound** `string` (default: yes)

Apakah mempertahankan trek audio asli dari video referensi

Opsi:

* `yes`: Pertahankan audio asli (default)
* `no`: Jangan pertahankan audio asli

**character\_orientation** `string` *required*

Kontrol orientasi karakter

Opsi:

* `image`: Gunakan orientasi karakter dari gambar referensi (durasi video referensi: `3~10 dtk`)
* `video`: Gunakan orientasi karakter dari video referensi (durasi video referensi: `3~30 dtk`)

**mode** `string` *required*

Mode pembuatan

Opsi:

* `std`: Mode standar (kecepatan dan kualitas seimbang)
* `pro`: Mode kualitas tinggi (latensi lebih tinggi)

**watermark\_info** `object`

Objek kontrol watermark (opsional)

**watermark\_info fields**

**enabled** `boolean` (default: false)

Apakah menambahkan watermark

* `true`: Tambahkan watermark
* `false`: Tanpa watermark (default)

## Aturan Durasi

| Kondisi | Durasi Video Referensi yang Diizinkan |
| - | - |
| `character_orientation = image` | `3 dtk ~ 10 dtk` |
| `character_orientation = video` | `3 dtk ~ 30 dtk` |

> [!NOTE]
>
> Durasi penagihan ditentukan oleh durasi aktual yang dideteksi dari `video_url` oleh server, bukan perkiraan sisi klien.

## Respons

**code** `integer`

Kode status respons, 200 jika berhasil

**data** `array`

Array data respons

**Array elements**

**status** `string`

Status tugas, `submitted` saat pengiriman awal

**task\_id** `string`

Pengidentifikasi tugas unik yang digunakan untuk mengueri status dan hasil tugas

## Contoh

### Contoh 1: orientasi gambar (dalam 10 dtk)

```json theme={null}
{
  "model": "kling-v2-6-motion-control",
  "prompt": "Keep character orientation consistent with the reference image, perform a turn and wave",
  "image_url": "https://example.com/ref-image.png",
  "video_url": "https://example.com/ref-video-8s.mp4",
  "character_orientation": "image",
  "mode": "std",
  "keep_original_sound": "yes",
  "watermark_info": {"enabled": false}
}
```

### Contoh 2: orientasi video (dalam 30 dtk)

```json theme={null}
{
  "model": "kling-v2-6-motion-control",
  "prompt": "Follow the character orientation and rhythm of the reference video, maintain fluid motion",
  "image_url": "https://example.com/ref-image.png",
  "video_url": "https://example.com/ref-video-12s.mp4",
  "character_orientation": "video",
  "mode": "pro",
  "keep_original_sound": "no",
  "watermark_info": {"enabled": false}
}
```


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