Model API

Wan 2.1

Wan-2.1 is a image-to-video model that generates high-quality videos with high visual quality and motion diversity from images

Model id

Use this in every request
wan-i2v

Run it

Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan-i2v",
  "input": {
    "prompt": "A red ceramic cup on a wooden table, soft morning light",
    "image_url": "https://example.com/input.png"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "wan-i2v", "quote_id": "QUOTE_ID", "input": {"prompt":"A red ceramic cup on a wooden table, soft morning light","image_url":"https://example.com/input.png"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Input

Input fields for wan-i2v
NameTypeDescription
promptrequiredstring
The text prompt to guide video generation.
negative_promptstring
Negative prompt for video generation.

Default: bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards

image_urlrequiredstring (image URL)
URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped.
num_framesnumber (enum)
Number of frames to generate. Must be between 81 to 100 (inclusive). If the number of frames is greater than 81, the video will be generated with 1.25x more billing units.

Default: 81

One of: 81

frames_per_secondnumber (enum)
Frames per second of the generated video. Must be between 5 to 24.

Default: 16

One of: 16

seedinteger
Random seed for reproducibility. If None, a random seed is chosen.
resolutionstring (enum)
Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit.

Default: 720p

One of: 480p, 720p

num_inference_stepsnumber (enum)
Number of inference steps for sampling. Higher values give better quality but take longer.

Default: 30

One of: 30

guide_scalenumber
Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality.

Default: 5

shiftnumber
Shift parameter for video generation.

Default: 5

enable_prompt_expansionboolean
Whether to enable prompt expansion.

Default: false

accelerationstring (enum)
Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'.

Default: regular

One of: none, regular

aspect_ratiostring (enum)
Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image.

Default: auto

One of: auto, 16:9, 9:16, 1:1

Output

A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.

Job excerpt
"outputs": [
  { "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]

Pricing

  • 480p$0.32/ video
  • 720p$0.64/ video

The exact charge for your input comes from a quote. How charges settle