Text-to-video API
Turn a text prompt into a video clip with Seedance, Wan, HappyHorse, Grok Imagine, Kling, or MiniMax, several with generated audio. Requests are asynchronous: you get a task, then the video.
Models
Every model below takes mode "text_to_video" at POST /v1/videos/generations. Prices are per second of video on the default route, at the resolution shown; Seedance prices are estimates from its token billing.
| Model and API model ID | Options | Price on official-cheap (default) |
|---|---|---|
Seedance 2.5bytedance/seedance-2.5 | Sizes: 480p, 720p, 1080p4–30 second clips | $0.213 per second of 720pofficial: $0.231 |
Seedance 2.0bytedance/seedance-2.0 | Sizes: 480p, 720p, 1080p, 4K4–15 second clips | $0.139 per second of 720pofficial: $0.151 |
Seedance 2.0 Fastbytedance/seedance-2.0-fast | Sizes: 480p, 720p4–15 second clips | $0.111 per second of 720pofficial: $0.121 |
Seedance 2.0 Minibytedance/seedance-2.0-mini | Sizes: 480p, 720p4–15 second clips | $0.07 per second of 720pofficial: $0.076 |
Wan 3.0alibaba/wan-3.0 | Sizes: 480p, 720p, 1080p2–15 second clips | $0.083 per second of 720pofficial: $0.092 |
Wan 3.0 Primealibaba/wan-3.0-prime | Sizes: 480p, 720p, 1080p2–15 second clips | $0.125 per second of 720pofficial: $0.138 |
HappyHorse 1.1alibaba/happyhorse-1.1 | Sizes: 480p, 720p, 1080p3–15 second clips | $0.125 per second of 720pofficial: $0.138 |
HappyHorse 1.0alibaba/happyhorse-1.0 | Sizes: 720p, 1080p3–15 second clips | $0.125 per second of 720pofficial: $0.138 |
Grok Imagine Video 1.5xai/grok-imagine-video-1.5 | Sizes: 480p, 720p, 1080p1–15 second clips | $0.126 per second of 720pofficial: $0.14 |
Grok Imagine Video 1.5 Litexai/grok-imagine-video-1.5-lite | Sizes: 480p, 720p, 1080p1–15 second clips | $0.027 per second of 720pofficial: $0.03 |
Kling 4.0kwaivgi/kling-4.0 | Sizes: 720p, 1080p3–30 second clips | $0.138 per second of 720pofficial: $0.154 |
MiniMax H3minimax/h3 | Sizes: 480p, 768p, 2K5–15 second clips | $0.072 per second of 768pofficial: $0.08 |
MiniMax H3 Maxminimax/h3-max | Sizes: 480p, 768p5–15 second clips | $0.072 per second of 768pofficial: $0.08 |
MiniMax H3 Max Turbominimax/h3-max-turbo | Sizes: 480p, 768p5–15 second clips | $0.036 per second of 768pofficial: $0.04 |
Quick start
- Create an API key
Create a key in the console and save it as the MLMUX_API_KEY environment variable.
Create an API key - Send a request
The example sends Seedance 2.0 (bytedance/seedance-2.0) to https://api.mlmux.com/v1/videos/generations. Change the model ID to any model in the table above.
- Read the result
The response is a task. Poll its poll_url every few seconds until status is succeeded, then download the video, or set up a webhook to be notified.
Video API reference
curl https://api.mlmux.com/v1/videos/generations \
-H "Authorization: Bearer $MLMUX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.0",
"route_mode": "official-cheap",
"prompt": "A red fox walks through fresh snow at sunrise, slow tracking shot, cinematic light",
"mode": "text_to_video",
"ratio": "16:9",
"resolution": "720p",
"duration": 5,
"generate_audio": true
}'
# The response is a task. Poll it until "status" is "succeeded", then read "video".
curl https://api.mlmux.com/v1/videos/generations/TASK_ID \
-H "Authorization: Bearer $MLMUX_API_KEY"Frequently asked questions
Which model should I use for text to video?
Seedance 2.0 is a good default for production work. Seedance 2.5 and Wan 3.0 Prime give the most cinematic results, Kling 4.0 makes the longest clips (up to 30 seconds), and Grok Imagine Video 1.5 Lite is the lowest-cost option for drafts and high volume.
How much does the text-to-video API cost?
From about $0.027 per second of video (Grok Imagine Video 1.5 Lite) on the default official-cheap route. Seedance is billed on the tokens a clip uses and the other models per second; both depend on resolution and length.
How long does a video take?
Video generation is asynchronous. The request returns a task right away; poll its poll_url every few seconds or receive a webhook when the video is ready.
Am I charged for failed requests, and is there a limit?
Failed requests are not charged, and the credits held for them return to your balance. Each account can run up to 60 tasks at the same time; email support@mlmux.com if you need more.