Rivya AI Docs
Model API Pages

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 کے ساتھ استعمال کریں۔

API کے ذریعے availableText یا URL ready؛ reference modes Files API استعمال کرتے ہیںویڈیو
API model id

wan-2-2-a14b-turbo

Inputs

text, file

Files API

Reference modes کے لیے required

Base credits

12

Capability

ویڈیو

Billing

FIXED

Prompt limit

5000 characters

Request contract

model id کو top level پر بھیجیں۔ Model-specific controls params میں رہتے ہیں۔

KeyTypeRequiredDefaultDescription
modelstringYeswan-2-2-a14b-turbowan-2-2-a14b-turbo API model id استعمال کریں۔
promptstringYes-اس model کے لیے زیادہ سے زیادہ 5000 characters۔
paramsobjectNo-Model-specific parameter object۔ allowed keys کے لیے نیچے والی rows استعمال کریں۔
client_request_idstringNo-آپ کے system میں requests trace کرنے کے لیے optional client-side id۔

Model parameters

KeyTypeRequiredDefaultRangeOptionsDescription
resolutionselectNo720p-480p, 580p, 720pText اور image runs فی الحال `480p / 720p` پر رہتے ہیں، جبکہ image-plus-audio-driven path `580p` بھی expose کرتا ہے۔ Rivya current mode کی بنیاد پر unsupported tiers automatically filter کرتا ہے۔
aspect_ratioselectNo16:9-16:9, 9:16یہ صرف text-to-video میں available رہتا ہے کیونکہ current public image اور image-plus-audio-driven endpoints stable `aspect_ratio` field expose نہیں کرتے۔
enable_prompt_expansionselectNofalse-false, trueیہ تب on کریں جب آپ چاہتے ہیں کہ upstream service generation سے پہلے rough text prompt expand کرے۔ یہ text اور image runs تک limited رہتا ہے۔
seednumberNo-min 0 / max 2147483647-ہر بار نیا random result چاہیے ہو تو اسے empty چھوڑیں۔ اسی integer کو دوبارہ use کرنے سے previous result reproduce یا fine-tune کرنا آسان ہوتا ہے۔ Result صرف اسی وقت زیادہ قریب رہتا ہے جب prompt اور دوسرے key settings بھی similar رہیں، اور یہ guaranteed 1:1 match نہیں ہوتا۔
accelerationselectNonone-none, regularایک lighter acceleration control جو public text اور image modes تک limited رہتا ہے۔
num_framesnumberNo80min 40 / max 120 / step 1-صرف image-plus-audio-driven۔ Valid values 40 سے 120 ہیں، اور number کو 4 سے divisible ہونا چاہیے۔ Typical starting point 80 ہے۔
frames_per_secondnumberNo16min 4 / max 60 / step 1-صرف image-plus-audio-driven۔ Valid values 4 سے 60 ہیں۔ Higher FPS عموما smoother لگتا ہے، مگر generation pressure بھی بڑھاتا ہے۔
negative_prompttextNo---صرف image-plus-audio-driven۔ اسے motion failures، unwanted artifacts، یا visual elements بیان کرنے کے لیے استعمال کریں جن سے آپ بچنا چاہتے ہیں۔
num_inference_stepsnumberNo27min 2 / max 40 / step 1-صرف image-plus-audio-driven۔ Valid values 2 سے 40 ہیں۔ Higher steps quality improve کر سکتے ہیں، مگر runtime بھی بڑھاتے ہیں۔
guidance_scalenumberNo3.5min 1 / max 10 / step 0.1-صرف image-plus-audio-driven۔ Valid values 1 سے 10 ہیں۔ Higher values prompt کو زیادہ closely follow کرتی ہیں، مگر motion کو stiffer بھی بنا سکتی ہیں۔
shiftnumberNo5min 1 / max 10 / step 0.1-صرف image-plus-audio-driven۔ Valid values 1 سے 10 ہیں۔ یہ generation کے temporal offset feel کو change کرتا ہے، اس لیے default کے قریب start کرنا safest ہے۔
enable_safety_checkerselectNotrue-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 rule

Reference media: 2 assets تک upload کریں۔ Text mode کو none چاہیے، image-to-video ایک image استعمال کرتا ہے، اور image-plus-audio-driven path ایک image plus ایک audio clip استعمال کرتا ہے۔

Max files

2

Accepted file kinds

image, audio

Duration token

duration verification required ہو تو video اور audio references کو /api/v1/files سے durationToken ساتھ رکھنا چاہیے۔

kindMax sizeMIME types
image10 MBimage/jpeg, image/png, image/webp
audio10 MBaudio/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 درکار ہوتے ہیں۔