Kling 3.0 Turbo API Integration
Kling 3.0 Turbo کو Rivya Public API v1 کے ذریعے model id kling-3-turbo، supported inputs، parameters، Files API rules، credits اور response examples کے ساتھ استعمال کریں۔
kling-3-turbo
text, file
Reference modes کے لیے required
per_output_second · 720p=18 · 1080p=22.5 · ⌈total⌉
ویڈیو
METERED
2500 characters
Request contract
model id کو top level پر بھیجیں۔ Model-specific controls params میں رہتے ہیں۔
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | kling-3-turbo | kling-3-turbo API model id استعمال کریں۔ |
| prompt | string | Yes | - | اس model کے لیے زیادہ سے زیادہ 2500 characters۔ |
| params | object | No | - | Model-specific parameter object۔ allowed keys کے لیے نیچے والی rows استعمال کریں۔ |
| client_request_id | string | No | - | آپ کے system میں requests trace کرنے کے لیے optional client-side id۔ |
Model parameters
| Key | Type | Required | Default | Range | Options | Description |
|---|---|---|---|---|---|---|
| resolution | select | No | 720p | - | 720p, 1080p | منتخب ریزولیوشن ہر آؤٹ پٹ سیکنڈ کی کریڈٹ شرح بھی مقرر کرتا ہے۔ |
| duration | number | No | 5 | min 3 / max 15 / step 1 | - | 3 سے 15 سیکنڈ تک مکمل عدد پر مبنی آؤٹ پٹ دورانیہ منتخب کریں۔ |
| aspect_ratio | select | No | 16:9 | - | 1:1, 9:16, 16:9 | صرف متن سے ویڈیو کے لیے دستیاب؛ ایک تصویر استعمال ہونے پر یہ اختیار چھپ جاتا ہے۔ |
Upload policy
Reference files پہلے upload کریں، پھر returned URL اور duration token کو params.referenceMediaItems کے اندر رکھیں۔
اختیاری ابتدائی تصویر: تصویر سے ویڈیو کے لیے 10 MB تک کی بالکل ایک JPEG یا PNG تصویر اپ لوڈ کریں۔ متن سے ویڈیو میں کوئی میڈیا اپ لوڈ نہیں ہوتا۔
1
image
duration verification required ہو تو video اور audio references کو /api/v1/files سے durationToken ساتھ رکھنا چاہیے۔
| kind | Max size | MIME types |
|---|---|---|
| image | 10 MB | image/jpeg, image/png |
Minimal request
{
"model": "kling-3-turbo",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
}Reference-file request
{
"model": "kling-3-turbo",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"referenceMediaItems": [
{
"url": "https://cdn.example.com/reference-image.png",
"kind": "image",
"name": "reference-image.png",
"mimeType": "image/png",
"width": 1024,
"height": 1024,
"sizeBytes": 1048576,
"imageDimensionsToken": "image_dimensions_token_from_original_files_api_upload_response"
}
]
}
}Create response
create endpoint ایک public task id واپس کرتا ہے۔ task succeeded یا failed ہونے تک status endpoint poll کریں۔
{
"id": "task_kling_3_turbo_example",
"status": "queued",
"model": "kling-3-turbo",
"reserved_credits": 90,
"final_credits": 0,
"settlement_status": "RESERVED",
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}Common errors
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
کچھ modes کو Files API reference uploads درکار ہوتے ہیں۔