Model API
Wan VACE 14B
VACE is a video generation model that uses a source image, mask, and video to create prompted videos with controllable sources.
Model id
wan-vace-14b/inpaintingRun 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-vace-14b/inpainting",
"input": {
"prompt": "A red ceramic cup on a wooden table, soft morning light",
"video_url": "https://example.com/input.mp4"
}
}'
# 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-vace-14b/inpainting", "quote_id": "QUOTE_ID", "input": {"prompt":"A red ceramic cup on a wooden table, soft morning light","video_url":"https://example.com/input.mp4"}}'
# 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. |
match_input_num_frames | boolean | If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. |
num_frames | integer | Number of frames to generate. Must be between 81 to 241 (inclusive). |
match_input_frames_per_second | boolean | If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. |
frames_per_second | integer | Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. |
seed | integer | Random seed for reproducibility. If None, a random seed is chosen. |
resolution | string (enum) | Resolution of the generated video. |
aspect_ratio | string (enum) | Aspect ratio of the generated video. |
num_inference_steps | integer | Number of inference steps for sampling. Higher values give better quality but take longer. |
guidance_scale | number | Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. |
sampler | string (enum) | Sampler to use for video generation. |
shift | number | Shift parameter for video generation. |
video_urlrequired | string (URL) | URL to the source video file. Required for inpainting. |
mask_video_url | string (URL) | URL to the source mask file. Required for inpainting. |
mask_image_url | string (image URL) | URL to the guiding mask file. If provided, the model will use this mask as a reference to create masked video using salient mask tracking. Will be ignored if mask_video_url is provided. |
ref_image_urls | array of image URLs | Urls to source reference image. If provided, the model will use this image as reference. |
first_frame_url | string (image URL) | URL to the first frame of the video. If provided, the model will use this frame as a reference. |
last_frame_url | string (image URL) | URL to the last frame of the video. If provided, the model will use this frame as a reference. |
enable_prompt_expansion | boolean | Whether to enable prompt expansion. |
preprocess | boolean | Whether to preprocess the input video. |
acceleration | string (enum) | Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. |
video_quality | string (enum) | The quality of the generated video. |
video_write_mode | string (enum) | The write mode of the generated video. |
num_interpolated_frames | integer | Number of frames to interpolate between the original frames. A value of 0 means no interpolation. |
temporal_downsample_factor | integer | Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. |
enable_auto_downsample | boolean | If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. |
auto_downsample_min_fps | number | The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. |
interpolator_model | string (enum) | The model to use for frame interpolation. Options are 'rife' or 'film'. |
sync_mode | boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
transparency_mode | string (enum) | The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. |
return_frames_zip | boolean | If true, also return a ZIP file containing all generated frames. |
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
- per second$0.1268/ second
The exact charge for your input comes from a quote. How charges settle