Kling 2.6 API-integratie
Gebruik Kling 2.6 via Rivya Public API v1 met model-id kling-2-6, ondersteunde inputs, parameters, Files API-regels, credits en responsevoorbeelden.
kling-2-6
text, file
Vereist voor referentiemodi
55
Video
FIXED
1000 tekens
Requestcontract
Stuur de model-id op topniveau. Modelspecifieke controles horen in params.
| Key | Type | Vereist | Standaard | Beschrijving |
|---|---|---|---|---|
| model | string | Ja | kling-2-6 | Gebruik de API-model-id kling-2-6. |
| prompt | string | Ja | - | Maximaal 1000 tekens voor dit model. |
| params | object | Nee | - | Modelspecifiek parameterobject. Gebruik de rijen hieronder voor toegestane keys. |
| client_request_id | string | Nee | - | Optionele client-side id voor requesttracing in je systeem. |
Modelparameters
| Key | Type | Vereist | Standaard | Bereik | Opties | Beschrijving |
|---|---|---|---|---|---|---|
| duration | select | Nee | 5 | - | 5, 10 | Duur |
| sound | select | Nee | false | - | false, true | Audio genereren |
| aspect_ratio | select | Nee | 1:1 | - | 1:1, 16:9, 9:16 | Beeldverhouding |
Uploadbeleid
Upload eerst referentiebestanden en plaats daarna de teruggegeven URL en duration token in params.referenceMediaItems.
Referentiebeeld: Upload maximaal 1 beeldbestand voor beeldprojecten.
1
image
Video- en audioreferenties moeten durationToken uit /api/v1/files bevatten wanneer duurverificatie vereist is.
| kind | Max. grootte | MIME-types |
|---|---|---|
| image | 10 MB | image/jpeg, image/png, image/webp |
Minimale request
{
"model": "kling-2-6",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"duration": "5",
"sound": "false",
"aspect_ratio": "1:1"
}
}Request met referentiebestand
{
"model": "kling-2-6",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"duration": "5",
"sound": "false",
"aspect_ratio": "1:1",
"referenceMediaItems": [
{
"url": "https://cdn.example.com/reference-image.png",
"kind": "image",
"name": "reference-image.png",
"mimeType": "image/png"
}
]
}
}Create-response
Het create-endpoint geeft een publieke taak-id terug. Poll het statusendpoint totdat de taak slaagt of mislukt.
{
"id": "task_kling_2_6_example",
"status": "queued",
"model": "kling-2-6",
"reserved_credits": 55,
"final_credits": 0,
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}Veelvoorkomende fouten
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
Sommige modi vereisen referentie-uploads via Files API.