Wan 2.2 A14B Turbo API Integration
Wan 2.2 A14B Turbo کو Rivya Public API v1 کے ذریعے model id wan-2-2-a14b-turbo، supported inputs، parameters، Files API rules، credits اور response examples کے ساتھ استعمال کریں۔
wan-2-2-a14b-turbo
text, file
Reference modes کے لیے required
12
ویڈیو
FIXED
5000 characters
Request contract
model id کو top level پر بھیجیں۔ Model-specific controls params میں رہتے ہیں۔
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | wan-2-2-a14b-turbo | wan-2-2-a14b-turbo API model id استعمال کریں۔ |
| prompt | string | Yes | - | اس model کے لیے زیادہ سے زیادہ 5000 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 | - | 480p, 580p, 720p | Text اور image runs فی الحال `480p / 720p` پر رہتے ہیں، جبکہ image-plus-audio-driven path `580p` بھی expose کرتا ہے۔ Rivya current mode کی بنیاد پر unsupported tiers automatically filter کرتا ہے۔ |
| aspect_ratio | select | No | 16:9 | - | 16:9, 9:16 | یہ صرف text-to-video میں available رہتا ہے کیونکہ current public image اور image-plus-audio-driven endpoints stable `aspect_ratio` field expose نہیں کرتے۔ |
| enable_prompt_expansion | select | No | false | - | false, true | یہ تب on کریں جب آپ چاہتے ہیں کہ upstream service generation سے پہلے rough text prompt expand کرے۔ یہ text اور image runs تک limited رہتا ہے۔ |
| seed | number | No | - | min 0 / max 2147483647 | - | ہر بار نیا بے ترتیب نتیجہ چاہیے ہو تو اسے خالی چھوڑیں۔ اسی عدد صحیح کو دوبارہ استعمال کرنے سے پچھلا نتیجہ دوبارہ بنانا یا باریک بہتر کرنا آسان ہوتا ہے۔ نتیجہ صرف اسی وقت زیادہ قریب رہتا ہے جب پرامپٹ اور دیگر اہم ترتیبات بھی ملتی جلتی رہیں، اور یہ 1:1 مماثلت کی ضمانت نہیں۔ |
| acceleration | select | No | none | - | none, regular | ایک lighter acceleration control جو public text اور image modes تک limited رہتا ہے۔ |
| num_frames | number | No | 80 | min 40 / max 120 / step 1 | - | صرف image-plus-audio-driven۔ Valid values 40 سے 120 ہیں، اور number کو 4 سے divisible ہونا چاہیے۔ Typical starting point 80 ہے۔ |
| frames_per_second | number | No | 16 | min 4 / max 60 / step 1 | - | صرف image-plus-audio-driven۔ Valid values 4 سے 60 ہیں۔ Higher FPS عموما smoother لگتا ہے، مگر generation pressure بھی بڑھاتا ہے۔ |
| negative_prompt | text | No | - | - | - | صرف image-plus-audio-driven۔ اسے motion failures، unwanted artifacts، یا visual elements بیان کرنے کے لیے استعمال کریں جن سے آپ بچنا چاہتے ہیں۔ |
| num_inference_steps | number | No | 27 | min 2 / max 40 / step 1 | - | صرف image-plus-audio-driven۔ Valid values 2 سے 40 ہیں۔ Higher steps quality improve کر سکتے ہیں، مگر runtime بھی بڑھاتے ہیں۔ |
| guidance_scale | number | No | 3.5 | min 1 / max 10 / step 0.1 | - | صرف image-plus-audio-driven۔ Valid values 1 سے 10 ہیں۔ Higher values prompt کو زیادہ closely follow کرتی ہیں، مگر motion کو stiffer بھی بنا سکتی ہیں۔ |
| shift | number | No | 5 | min 1 / max 10 / step 0.1 | - | صرف image-plus-audio-driven۔ Valid values 1 سے 10 ہیں۔ یہ generation کے temporal offset feel کو change کرتا ہے، اس لیے default کے قریب start کرنا safest ہے۔ |
| enable_safety_checker | select | No | true | - | true, false | صرف image-plus-audio-driven۔ Generation سے پہلے safety checks run کرنے کے لیے اسے on کریں، یا کم filtering چاہیے ہو اور trade-off accept ہو تو off کریں۔ |
Upload policy
Reference files پہلے upload کریں، پھر returned URL اور duration token کو params.referenceMediaItems کے اندر رکھیں۔
Reference media: 2 assets تک upload کریں۔ Text mode کو none چاہیے، image-to-video ایک image استعمال کرتا ہے، اور image-plus-audio-driven path ایک image plus ایک audio clip استعمال کرتا ہے۔
2
image, audio
duration verification required ہو تو video اور audio references کو /api/v1/files سے durationToken ساتھ رکھنا چاہیے۔
| kind | Max size | MIME types |
|---|---|---|
| image | 10 MB | image/jpeg, image/png, image/webp |
| audio | 10 MB | audio/mpeg, audio/mp4, audio/wav, audio/x-wav, audio/aac, audio/ogg, audio/flac, audio/x-ms-wma |
Minimal request
{
"model": "wan-2-2-a14b-turbo",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"resolution": "720p",
"aspect_ratio": "16:9",
"enable_prompt_expansion": "false",
"seed": 0,
"acceleration": "none",
"num_frames": 80,
"frames_per_second": 16,
"negative_prompt": "اختیاری exclusions یا failure modes جن سے بچنا ہے۔",
"num_inference_steps": 27,
"guidance_scale": 3.5,
"shift": 5,
"enable_safety_checker": "true"
}
}Reference-file request
{
"model": "wan-2-2-a14b-turbo",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"resolution": "720p",
"aspect_ratio": "16:9",
"enable_prompt_expansion": "false",
"seed": 0,
"acceleration": "none",
"num_frames": 80,
"frames_per_second": 16,
"negative_prompt": "اختیاری exclusions یا failure modes جن سے بچنا ہے۔",
"num_inference_steps": 27,
"guidance_scale": 3.5,
"shift": 5,
"enable_safety_checker": "true",
"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_2_a14b_turbo_example",
"status": "queued",
"model": "wan-2-2-a14b-turbo",
"reserved_credits": 12,
"final_credits": 0,
"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 درکار ہوتے ہیں۔