Integrasi API Kling 3.0
Gunakan Kling 3.0 melalui Rivya Public API v1 dengan id model kling-3-0, input yang didukung, parameter, aturan Files API, kredit, dan contoh response.
kling-3-0
text, file
Diperlukan untuk mode referensi
90
Video
FIXED
2000 karakter
Kontrak request
Kirim id model di level atas. Kontrol khusus model berada di params.
| Key | Tipe | Wajib | Default | Deskripsi |
|---|---|---|---|---|
| model | string | Ya | kling-3-0 | Gunakan kling-3-0 sebagai id model API. |
| prompt | string | Ya | - | Maksimum 2000 karakter untuk model ini. |
| params | object | Tidak | - | Objek parameter khusus model. Gunakan baris di bawah untuk key yang diizinkan. |
| client_request_id | string | Tidak | - | ID sisi klien opsional untuk melacak request di sistem Anda. |
Parameter model
| Key | Tipe | Wajib | Default | Rentang | Opsi | Deskripsi |
|---|---|---|---|---|---|---|
| mode | select | Tidak | pro | - | std, pro | Mode generasi |
| multi_shots | select | Tidak | false | - | false, true | Mode adegan |
| duration | select | Tidak | 5 | - | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 | Durasi |
| sound | select | Tidak | false | - | false, true | Buat audio |
| aspect_ratio | select | Tidak | 16:9 | - | 16:9, 9:16, 1:1 | Rasio aspek |
Kebijakan unggahan
Unggah file referensi terlebih dahulu, lalu tempatkan URL dan duration token yang dikembalikan ke dalam params.referenceMediaItems.
Media referensi: Unggah total hingga 2 file gambar untuk proyek gambar-ke-video.
2
image
Referensi video dan audio harus membawa durationToken dari /api/v1/files saat verifikasi durasi diperlukan.
| kind | Ukuran maksimum | Tipe MIME |
|---|---|---|
| image | 10 MB | image/jpeg, image/png, image/webp |
Request minimal
{
"model": "kling-3-0",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"mode": "pro",
"multi_shots": "false",
"duration": "5",
"sound": "false",
"aspect_ratio": "16:9"
}
}Request file referensi
{
"model": "kling-3-0",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"mode": "pro",
"multi_shots": "false",
"duration": "5",
"sound": "false",
"aspect_ratio": "16:9",
"referenceMediaItems": [
{
"url": "https://cdn.example.com/reference-image.png",
"kind": "image",
"name": "reference-image.png",
"mimeType": "image/png"
}
]
}
}Response create
Endpoint create mengembalikan public task id. Poll endpoint status sampai tugas berhasil atau gagal.
{
"id": "task_kling_3_0_example",
"status": "queued",
"model": "kling-3-0",
"reserved_credits": 90,
"final_credits": 0,
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}Error umum
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
Beberapa mode membutuhkan unggahan referensi Files API.