Docs Rivya AI
Trang API mô hình

Tích hợp API Kling V2.5 Turbo Pro

Dùng Kling V2.5 Turbo Pro qua Rivya Public API v1 với model id kling-v2-5-turbo-pro, input được hỗ trợ, tham số, quy tắc Files API, tín dụng và ví dụ response.

Khả dụng qua APIText hoặc URL sẵn sàng; reference modes dùng Files APIVideo
ID mô hình API

kling-v2-5-turbo-pro

Input

text, file

Files API

Bắt buộc cho reference modes

Tín dụng cơ bản

42

Năng lực

Video

Thanh toán

FIXED

Giới hạn prompt

2500 ký tự

Hợp đồng yêu cầu

Gửi model id ở top level. Điều khiển riêng của mô hình nằm trong params.

KeyTypeBắt buộcDefaultMô tả
modelstringkling-v2-5-turbo-proDùng API model id kling-v2-5-turbo-pro.
promptstring-Tối đa 2500 ký tự cho mô hình này.
paramsobjectKhông-Object tham số riêng của mô hình. Dùng các dòng bên dưới để xem key được phép.
client_request_idstringKhông-Client-side id tùy chọn để trace request trong hệ thống của bạn.

Tham số mô hình

KeyTypeBắt buộcDefaultRangeOptionsMô tả
durationselectKhông5-5, 10Thời lượng
aspect_ratioselectKhông16:9-16:9, 9:16, 1:1Tỷ lệ khung hình
negative_prompttextKhông---Prompt âm
cfg_scalenumberKhông0.5min 0 / max 1-Kiểm soát mức độ kết quả bám sát prompt. Giá trị cao hơn thường gần prompt hơn, nhưng cũng có thể làm chuyển động hoặc bố cục cứng hơn.

Chính sách tải lên

Upload reference files trước, rồi đặt URL và duration token được trả về vào params.referenceMediaItems.

Quy tắc tham chiếu

Ảnh tham chiếu: Tùy chọn tải lên tối đa 2 ảnh để chuyển sang chế độ image-to-video; ảnh thứ hai được ánh xạ thành khung cuối.

Số file tối đa

2

Loại file được chấp nhận

image

Token thời lượng

Tham chiếu video và audio nên mang durationToken từ /api/v1/files khi cần xác minh duration.

kindKích thước tối đaMIME types
image10 MBimage/jpeg, image/png, image/webp

Yêu cầu tối thiểu

{
  "model": "kling-v2-5-turbo-pro",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "duration": "5",
    "aspect_ratio": "16:9",
    "negative_prompt": "Mô tả những gì video nên tránh",
    "cfg_scale": 0.5
  }
}

Yêu cầu có tệp tham chiếu

{
  "model": "kling-v2-5-turbo-pro",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "duration": "5",
    "aspect_ratio": "16:9",
    "negative_prompt": "Mô tả những gì video nên tránh",
    "cfg_scale": 0.5,
    "referenceMediaItems": [
      {
        "url": "https://cdn.example.com/reference-image.png",
        "kind": "image",
        "name": "reference-image.png",
        "mimeType": "image/png"
      }
    ]
  }
}

Phản hồi tạo

Create endpoint trả về public task id. Poll status endpoint cho đến khi task succeeded hoặc failed.

{
  "id": "task_kling_v2_5_turbo_pro_example",
  "status": "queued",
  "model": "kling-v2-5-turbo-pro",
  "reserved_credits": 42,
  "final_credits": 0,
  "created_at": "2026-05-11T00:00:00.000Z",
  "updated_at": "2026-05-11T00:00:00.000Z",
  "result": null,
  "error": null
}

Lỗi thường gặp

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

Một số mode cần Files API reference uploads.