Rivya AI ডকস
মডেল API পেজ

Kling V2.1 Master API ইন্টিগ্রেশন

Rivya Public API v1 দিয়ে Kling V2.1 Master ব্যবহার করুন: model id kling-v2-1-master, সমর্থিত ইনপুট, প্যারামিটার, Files API নিয়ম, ক্রেডিট এবং response উদাহরণসহ।

API দিয়ে উপলভ্যটেক্সট বা URL প্রস্তুত; reference modes Files API ব্যবহার করেভিডিও
API model id

kling-v2-1-master

ইনপুট

text, file

Files API

reference mode-এর জন্য প্রয়োজন

বেস ক্রেডিট

160

ক্ষমতা

ভিডিও

বিলিং

FIXED

প্রম্পট সীমা

5000 অক্ষর

রিকোয়েস্ট contract

model id top level-এ পাঠান। Model-specific control params-এ থাকবে।

Keyধরনপ্রয়োজনীয়ডিফল্টবিবরণ
modelstringহ্যাঁkling-v2-1-masterkling-v2-1-master API model id ব্যবহার করুন।
promptstringহ্যাঁ-এই model-এর জন্য সর্বোচ্চ 5000 অক্ষর।
paramsobjectনা-মডেল-নির্দিষ্ট প্যারামিটার object। অনুমোদিত key-এর জন্য নিচের row ব্যবহার করুন।
client_request_idstringনা-আপনার সিস্টেমে request trace করার ঐচ্ছিক client-side id।

মডেল প্যারামিটার

Keyধরনপ্রয়োজনীয়ডিফল্টপরিসরবিকল্পবিবরণ
durationselectনা5-5, 10সময়কাল
aspect_ratioselectনা16:9-16:9, 9:16, 1:1Aspect ratio
negative_prompttextনা---Negative prompt
cfg_scalenumberনা0.5min 0 / max 1-result আপনার prompt কতটা tightভাবে follow করবে তা control করে। higher value সাধারণত prompt-এর কাছাকাছি থাকে, কিন্তু motion বা composition stiff লাগতে পারে।

আপলোড নীতি

প্রথমে reference file upload করুন, তারপর ফেরত পাওয়া URL এবং duration token params.referenceMediaItems-এর মধ্যে দিন।

রেফারেন্স নিয়ম

Reference image: image-to-video mode-এ যেতে optionalভাবে একটি image upload করুন; text mode-এ থাকতে খালি রাখুন।

সর্বোচ্চ ফাইল

1

সমর্থিত ফাইল ধরন

image

Duration token

duration verification প্রয়োজন হলে video এবং audio reference /api/v1/files থেকে durationToken বহন করবে।

kindসর্বোচ্চ আকারMIME types
image10 MBimage/jpeg, image/png, image/webp

ন্যূনতম request

{
  "model": "kling-v2-1-master",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "duration": "5",
    "aspect_ratio": "16:9",
    "negative_prompt": "video যা এড়াবে তা বর্ণনা করুন",
    "cfg_scale": 0.5
  }
}

রেফারেন্স ফাইল রিকোয়েস্ট

{
  "model": "kling-v2-1-master",
  "prompt": "A cinematic product reveal with smooth camera movement",
  "params": {
    "duration": "5",
    "aspect_ratio": "16:9",
    "negative_prompt": "video যা এড়াবে তা বর্ণনা করুন",
    "cfg_scale": 0.5,
    "referenceMediaItems": [
      {
        "url": "https://cdn.example.com/reference-image.png",
        "kind": "image",
        "name": "reference-image.png",
        "mimeType": "image/png"
      }
    ]
  }
}

Create response

create endpoint public task id ফেরত দেয়। task succeeded বা failed না হওয়া পর্যন্ত status endpoint poll করুন।

{
  "id": "task_kling_v2_1_master_example",
  "status": "queued",
  "model": "kling-v2-1-master",
  "reserved_credits": 160,
  "final_credits": 0,
  "created_at": "2026-05-11T00:00:00.000Z",
  "updated_at": "2026-05-11T00:00:00.000Z",
  "result": null,
  "error": null
}

সাধারণ ত্রুটি

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

কিছু mode-এর জন্য Files API reference upload দরকার।