Wan 2.7 Video API ইন্টিগ্রেশন
Rivya Public API v1 দিয়ে Wan 2.7 Video ব্যবহার করুন: model id wan-2-7-video, সমর্থিত ইনপুট, প্যারামিটার, Files API নিয়ম, ক্রেডিট এবং response উদাহরণসহ।
wan-2-7-video
text, file
reference mode-এর জন্য প্রয়োজন
80
ভিডিও
FIXED
5000 অক্ষর
রিকোয়েস্ট contract
model id top level-এ পাঠান। Model-specific control params-এ থাকবে।
| Key | ধরন | প্রয়োজনীয় | ডিফল্ট | বিবরণ |
|---|---|---|---|---|
| model | string | হ্যাঁ | wan-2-7-video | wan-2-7-video API model id ব্যবহার করুন। |
| prompt | string | হ্যাঁ | - | এই model-এর জন্য সর্বোচ্চ 5000 অক্ষর। |
| params | object | না | - | মডেল-নির্দিষ্ট প্যারামিটার object। অনুমোদিত key-এর জন্য নিচের row ব্যবহার করুন। |
| client_request_id | string | না | - | আপনার সিস্টেমে request trace করার ঐচ্ছিক client-side id। |
মডেল প্যারামিটার
| Key | ধরন | প্রয়োজনীয় | ডিফল্ট | পরিসর | বিকল্প | বিবরণ |
|---|---|---|---|---|---|---|
| resolution | select | না | 720p | - | 720p, 1080p | Resolution |
| duration | select | না | 5 | - | 5, 10, 15 | Text ও image run 5, 10 বা 15 seconds ব্যবহার করতে পারে। Video editing বর্তমানে 10 seconds পর্যন্ত যায়, এবং এই mode-এ Rivya longer selection স্বয়ংক্রিয়ভাবে normalize করে। |
| aspect_ratio | select | না | 16:9 | - | 16:9, 9:16, 1:1, 4:3, 3:4 | Text-to-video এবং video-editing run সরাসরি এই parameter ব্যবহার করে। Image-to-video বর্তমানে আলাদা aspect-ratio switch expose না করে uploaded frame geometry অনুসরণ করে। |
| negative_prompt | text | না | - | - | - | Negative prompt |
| prompt_extend | select | না | true | - | true, false | Generation-এর আগে model আপনার prompt rewrite করবে কি না তা নিয়ন্ত্রণ করে। Convenience-এর জন্য on রাখুন, অথবা prompt খুব precise হলে off করুন। |
| watermark | select | না | false | - | false, true | Watermark |
| audio_setting | select | না | auto | - | auto, origin | Video-edit path-এ audio কীভাবে handled হবে তা নিয়ন্ত্রণ করে। Auto model-কে সিদ্ধান্ত নিতে দেয়, আর Keep original source video-র audio preserve করার চেষ্টা করে। |
| seed | number | না | - | min 0 / max 2147483647 | - | প্রতিবার নতুন random result চাইলে empty রাখুন। একই integer reuse করলে আগের result reproduce বা fine-tune করা সহজ হয়। Prompt এবং অন্য key setting একই রকম থাকলেই শুধু result কাছাকাছি থাকে, এবং এটি guaranteed 1:1 match নয়। |
আপলোড নীতি
প্রথমে reference file upload করুন, তারপর ফেরত পাওয়া URL এবং duration token params.referenceMediaItems-এর মধ্যে দিন।
Reference media: সর্বোচ্চ 2টি asset upload করুন। Image-to-video-এর জন্য সর্বোচ্চ 2টি image, অথবা video editing-এর জন্য 1টি video plus 1টি optional image ব্যবহার করুন।
2
image, video
duration verification প্রয়োজন হলে video এবং audio reference /api/v1/files থেকে durationToken বহন করবে।
| kind | সর্বোচ্চ আকার | MIME types |
|---|---|---|
| image | 20 MB | image/jpeg, image/png, image/webp |
| video | 95 MB | video/mp4, video/quicktime |
ন্যূনতম request
{
"model": "wan-2-7-video",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"resolution": "720p",
"duration": "5",
"aspect_ratio": "16:9",
"negative_prompt": "এড়াতে চান এমন optional exclusion বা failure mode লিখুন।",
"prompt_extend": "true",
"watermark": "false",
"audio_setting": "auto",
"seed": 0
}
}রেফারেন্স ফাইল রিকোয়েস্ট
{
"model": "wan-2-7-video",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"resolution": "720p",
"duration": "5",
"aspect_ratio": "16:9",
"negative_prompt": "এড়াতে চান এমন optional exclusion বা failure mode লিখুন।",
"prompt_extend": "true",
"watermark": "false",
"audio_setting": "auto",
"seed": 0,
"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_wan_2_7_video_example",
"status": "queued",
"model": "wan-2-7-video",
"reserved_credits": 80,
"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 দরকার।