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
wan-i2vRun 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
| Name | Type | Description |
|---|---|---|
promptrequired | string | The text prompt to guide video generation. |
negative_prompt | string | Negative prompt for video generation. |
image_urlrequired | string (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_frames | number (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. |
frames_per_second | number (enum) | Frames per second of the generated video. Must be between 5 to 24. |
seed | integer | Random seed for reproducibility. If None, a random seed is chosen. |
resolution | string (enum) | Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit. |
num_inference_steps | number (enum) | Number of inference steps for sampling. Higher values give better quality but take longer. |
guide_scale | number | Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. |
shift | number | Shift parameter for video generation. |
enable_prompt_expansion | boolean | Whether to enable prompt expansion. |
acceleration | string (enum) | Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. |
aspect_ratio | string (enum) | Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. |
Output
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"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