Generate a video
generate_videoGenerate a short video from a text prompt. Costs $1.00 per 5-second 540x960 clip, payable by card over the Machine Payments Protocol -- no account needed. Returns immediately with a video id; rendering takes 30-90 seconds, so poll get_video_status until it is READY or ERROR.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducibility | |
| image | No | Optional https URL or base64 photo. When set, the clip is that photo animated for one purchase: duration and resolution are locked to the clip offer. | |
| prompt | Yes | Text prompt describing the video you want to generate | |
| duration | No | Duration of the video in seconds (5-60) | |
| resolution | No | Quality tier key (540x960 or 720x1280). These are tier identifiers, not the output size. On the Wan backend 540x960 renders at 480x832 and is stored upscaled to 540x960, and 720x1280 produces 720x1280 portrait. Read output_width/output_height on the video for the actual dimensions. Omitting the field selects 540x960. The 180x320 and 360x640 tiers are retired: they produced the same 480x832 file as 540x960 and are no longer accepted. | 540x960 |
| negative_prompt | No | Negative prompt to avoid certain content | |
| payment_credential | No | Machine Payments Protocol credential answering the challenge from an earlier payment_required result. Omit it when calling with an API key that has credits. |