Video Generation API
LMU AI Video Generation API overview: choose between Seedance and Wan, plus shared rules for auth, async tasks, billing, concurrency limits and error codes.
LMU AI provides two kinds of asynchronous video generation APIs, both using the vendors' native protocols: replace the address in the official SDK or curl command with the LMU AI address and the key with your LMU AI API key, and the request body stays unchanged. This page is the overview: pick an API from the table below, then read its provider page. The rules both providers share (authentication, billing, concurrency limits and error codes) are on this page.
Base URL
https://api.lmuai.com| Provider | Create task | Query task | Docs |
|---|---|---|---|
| Seedance (Volcengine Ark) | POST /api/v3/contents/generations/tasks | GET /api/v3/contents/generations/tasks/{id} | Seedance Video Generation API |
| Wan (Alibaba DashScope) | POST /api/v1/services/aigc/video-generation/video-synthesis | GET /api/v1/tasks/{task_id} | Wan Video Generation API |
Video generation must be enabled for your group
The API key's group must have "Video generation" enabled; otherwise calls return 403. The models you can actually call depend on your API key; check them with GET /v1/models.
1. Choosing between the two
| Seedance (Volcengine Ark) | Wan (Alibaba DashScope) | |
|---|---|---|
| Example model | seedance-2.5 | wan3.0-video |
| Billing | By output tokens | By "actual seconds × resolution-tier unit price" |
| Resolution values | 480p / 720p / 1080p (lowercase) | 480P / 720P / 1080P (uppercase), default 1080P |
| Task status | queued → running → succeeded / failed / cancelled | PENDING → RUNNING → SUCCEEDED / FAILED / CANCELED |
| Video URL field | content.video_url | output.video_url |
| Cancelling a task | Queued (queued) tasks can be cancelled | No cancel endpoint; a submitted task always runs to completion |
The model name must match the name enabled for your group exactly (case-sensitive). The two APIs use similar field names but different casing and paths, so don't mix them up when copying examples.
2. Authentication
Send your API key in the header of every request:
Authorization: Bearer YOUR_API_KEYDo not put your API key in browser front-end code, public repositories, URL query strings, or logs. Call the API from your own server.
3. Asynchronous task flow
- Create:
POSTonly returns a task id; it does not wait for the video. - Poll:
GETthe task about every 10 seconds until it reaches a final state (succeeded / failed / cancelled). - Reference images: API calls must pass a publicly accessible image URL (JPG / PNG / WebP); the Video Generation page in the console accepts local image uploads.
- Download: on success, take the video link from the response. Upstream links are valid for 24 hours, so download promptly; the platform keeps a copy of each finished video, which you can play and download on the Video Tasks page in the console.
Billing settles even if you stop polling
After submission, the platform follows up on the task in the background and settles it normally even if you stop querying; failed and cancelled tasks are not charged.
For complete create-and-poll examples, see the Seedance and Wan pages.
4. Billing and watermarks
- An estimated amount is frozen when the task is created. If your balance is insufficient, the request is rejected outright (
402) and no video is generated. - On success, the task is settled once by actual usage, and any excess frozen amount is returned automatically; failed and cancelled tasks are fully refunded and not charged.
- Seedance is billed by output tokens; Wan is billed by "actual seconds × resolution-tier unit price".
- Finished videos carry the platform's "AI-generated" label, which clients cannot turn off.
5. Concurrency limits
Each user and each API key can have at most 5 tasks generating at the same time. Beyond that, requests return 429 with a Retry-After header (about 60 seconds); back off and retry.
6. Error codes
| HTTP | Meaning | What to do |
|---|---|---|
401 | The API key is invalid or disabled | Check your API key |
402 | Insufficient balance or quota to freeze the estimated amount | Top up and retry |
403 | Video generation is not enabled for the group, or the model is not available in the group | Use an API key that supports video generation |
404 model_not_found | The model is not available yet (a misspelled name also triggers this) | Use the exact name returned by GET /v1/models |
409 | The task has started generating and cannot be cancelled (Seedance cancel endpoint) | Wait for the task to finish |
429 | The number of in-flight tasks has reached the limit | Back off according to Retry-After and retry |
For general errors, see Error Codes.
7. Provider pages
- Seedance Video Generation API: create, query, list and cancel tasks, with parameters, notes on first-frame reference images, and a complete polling example.
- Wan Video Generation API: create and query tasks, with parameters and a complete polling example.
Last updated:
Get an LMU AI key and start using Claude, Codex and more
Free sign-up, flexible plans, one key across Claude Code, Codex CLI, Cursor, VS Code, OpenCode, Cherry Studio and other AI tools.
Sign upGemini Batch Image API
LMU AI async batch image API: submit many Gemini image tasks at once, poll status and details, download images or ZIP, with idempotency and cost estimates.
Seedance Video Generation API
Call Seedance (Volcengine Ark) video generation through LMU AI with the native async protocol: create, query, list and cancel tasks, plus a full polling example.