Skip to main content

Overview

This page documents the Wan video generation API on LaoZhang. The API uses a DashScope-compatible asynchronous task flow: create a task, persist task_id, poll task status, then download the MP4 from result_url after completion.
Do not use the Sora / Veo /v1/videos endpoint for Wan. Wan image-to-video, reference-to-video, and video editing requests require the native DashScope input.media[] payload, so task creation must use /wan/api/v1/services/aigc/video-generation/video-synthesis.

Authentication

Create a dedicated token in Token Management:
Wan requests must use a Wan group token with pay-as-you-go billing enabled. Default, Veo, Sora, or other video groups can return unavailable-channel, model-routing, or billing-group errors.

Billing And Pricing

The table below uses the official upstream public pricing as a cost-estimation baseline. LaoZhang API billing is determined by the console model price and call logs. The Wan group currently shows a 0.15x ratio in the console. This is a pricing conversion coefficient between the upstream RMB price and LaoZhang’s USD pricing basis. At the fixed 1:7 exchange rate, 0.15 × 7 = 1.05, so the current price is approximately 105% of Alibaba Cloud’s official RMB list price. The 0.15x ratio is not an additional discount to multiply against the “Actual Deduction” shown in the call log.
Official reference: Alibaba Cloud Model Studio pricing.
duration and resolution directly affect cost. Production clients should estimate cost before task creation and reconcile actual billing from console call logs after task completion.

Flow

1

Create task

Send POST /wan/api/v1/services/aigc/video-generation/video-synthesis with a JSON body. Set model to a Wan model ID, input.prompt to the prompt, and input.media[] for i2v, r2v, and video editing inputs.
2

Poll status

Send GET /v1/tasks/{task_id}. Client logic should branch on the top-level status field instead of upstream-specific nested fields.
3

Download result

When status=completed, download the top-level result_url. This is a signed object-storage URL; do not send the LaoZhang Authorization header to it.

API Reference

Request Conventions

Endpoints

Status Machine

Wan / DashScope progress is coarse-grained. It is normal for progress to stay at 30% for a while and then jump to 100%.

Models And Input Modes

wan2.7-image-pro is an image model, not a video-generation model for this endpoint.

Request Body

input.media[]

Media URLs must be publicly reachable HTTPS direct links. Login-only URLs, cookie-gated URLs, private network URLs, or temporarily inaccessible links can cause task failure.

Environment Variables

Examples below use:

Text To Video

Image To Video

Reference To Video

Video Editing

Poll And Download

Completed tasks return status=completed and result_url. Client logic should rely on these top-level fields:
Do not send the LaoZhang Authorization header when downloading result_url. It is a signed upstream object-storage URL and extra auth headers can cause 403 errors.

Minimal Python Client

Troubleshooting