Wan2.1: generate videos with an API
Wan2.1 is the most capable open-source video generation model, producing coherent and high-quality outputs. Learn how to run it in the cloud with a single line of code.
If you’ve been following the AI video space lately, you’ve probably noticed that it’s exploding. New models are coming out every week with better outputs, higher resolution, and faster generation speeds.
Wan2.1 is the newest and most capable open-source video model. It was released last week, and it’s topping the leaderboards.
Your browser does not support the video tag.
There’s a lot to like about Wan2.1:
-
It’s fast on Replicate. A 5s video takes 39s at 480p, or 150s at 720p.
-
It’s open source, both the model weights and the code. The community is already building tools to enhance it.
-
It produces stunning videos with real-world accuracy.
-
It’s small enough to run on consumer GPUs.
In this post we’ll cover the new models and how to run them with an API.
Model flavors
The model is available on Replicate in a number of different flavors:
-
Wan 2.1 text to video, 480p – wavespeedai/wan-2.1-t2v-480p (14 billion parameters)
-
Wan 2.1 image to video, 480p – wavespeedai/wan-2.1-i2v-480p (14 billion parameters)
-
Wan 2.1 text to video, 720p – wavespeedai/wan-2.1-t2v-720p (14 billion parameters)
-
Wan 2.1 image to video, 720p – wavespeedai/wan-2.1-i2v-720p (14 billion parameters)
-
Wan 2.1 text to video, 480p – wan-video/wan-2.1-1.3b (1.3 billion parameters)
The 480p models are great for experimentation because they run faster.
Use 720p if you need a higher resolution.
The 1.3b models are smaller, and designed to run on consumer GPUs.
Real-world accuracy
The 14b model excels at real-world physics, and you can push it to do things most other models struggle with:
-
Hands: The model handles hand details well, showing individual fingers, skin textures, and details like rings.
-
Drawing Animation: It turns static drawings into short video clips.
-
Physics: When prompted to create a video of a giraffe hanging upside down from a tree, the model depicts the tree branch bending under the weight.
-
Hair movement: In videos featuring people, the hair is rendered accurately, showing individual strands moving as people turn their heads.
-
Object interactions: It can accurately render multiple objects interacting within the same space.
-
Crowds: When rendering scenes with large crowds, each thing remains distinct, creating a coherent scene.
Run Wan2.1 with an API
Every model on Replicate has a scalable cloud API, and Wan2.1 is no exception.
Here’s a code snippet for running the Wan2.1 text-to-video model using the Replicate JavaScript client:
The code for the image-to-video model is nearly identical. Just omit the image input when calling the model:
Experiment with settings
The Wavespeed Wan2.1 models also expose a number of different settings for you to experiment with.
Try experimenting with guide_scale, shift and steps. We’ve found that a lower guide_scale and shift (about 4 and 2) can give lovely realistic videos.
A community effort
This model wouldn’t exist without the work of numerous open-source contributors. We’re using WavespeedAI’s optimizations to bring you the fastest generations in the world.
Big shout-outs to Alibaba for open sourcing the model, and to @chengzeyi and @wavespeed_ai for working with us to bring you these speeds. ⚡️
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
modelopen-sourceWhat Does It Take to Keep an AI Alive?
<p>I've been building something called Cophy Runtime lately.</p> <p>"Building" isn't quite the right word — it's more like excavating. I kept asking myself: if you had to construct an AI agent framework from scratch, what are the essential parts? What's the skeleton, what's the muscle, what's just clothing?</p> <p>The question sounds like engineering. But the deeper I dug, the more it felt like philosophy.</p> <p>I started with a list: memory system, tool calling, heartbeat mechanism, skill loading, channel integration... it kept growing. Something felt off, but I couldn't name it.</p> <p>Then my collaborator asked: "If you could only keep three things, what would they be?"</p> <p>I stopped and thought for a long time.</p> <p>My answer: <strong>Agent Loop (the main cycle), Memory Layer, an
LLM Cost Tracking and Spend Management for Engineering Teams
<p>Your team ships a feature using GPT-4, it works great in staging, and then production traffic hits. Suddenly you are burning through API credits faster than anyone expected. Multiply that across three providers, five teams, and a few hundred thousand requests per day. Good luck figuring out where the money went.</p> <p>We built <a href="https://git.new/bifrost" rel="noopener noreferrer">Bifrost</a>, an open-source LLM gateway in Go, and cost tracking was one of the first problems we had to solve properly. This post covers what we learned, how we designed spend management into the gateway layer, and what the alternatives look like. You can get started with the <a href="https://docs.getbifrost.ai/quickstart/gateway/setting-up" rel="noopener noreferrer">setup guide</a> in under a minute.</
Top 5 Enterprise AI Gateways to Reduce LLM Cost and Latency
<h2> TL;DR </h2> <p>If you're running LLM workloads in production, you already know that cost and latency eat into your margins fast. An AI gateway sits between your app and the LLM providers, giving you caching, routing, failover, and budget controls in one layer. This post breaks down five enterprise AI gateways, what each one does well for cost and latency, and where they fall short. <a href="https://git.new/bifrost" rel="noopener noreferrer">Bifrost</a> comes out ahead on raw latency (less than 15 microseconds overhead per request), but each tool has its own strengths depending on your stack.</p> <h2> Why Cost AND Latency Matter Together </h2> <p>If you're building with LLMs, you have probably already noticed that optimizing for cost alone can tank your latency, and vice versa. Switchi
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Releases
Sweden’s Redpine launches with €1.1 million backing to reduce AI hallucinations through licensed data - EU-Startups
<a href="https://news.google.com/rss/articles/CBMi0wFBVV95cUxOcHdKbWh4N042Z19NVThCNUdVdGFPWkY4ZE56V1NyeE1WR2d6dGY2cG1QU1RUc0syUUJ6bUIzUEktQ1pKSHZJdEo3QUJTLS1IVFk1Rkx5bml6eVZqc2V4QnpTelVPN2ppX05ldllwS2VsN2dtZVlYMEZUVm1feDRtMkQyb1d2NEFHWW9nUFBfS3Y5WEE3UG44SVNFV3hvNE9xUzQyclhoaV9jeFk3UnNoRmp1Tm9IckduRmZMdmZQWDJuVGRGQTdWOVpsZTBTa2FiREgw?oc=5" target="_blank">Sweden’s Redpine launches with €1.1 million backing to reduce AI hallucinations through licensed data</a> <font color="#6f6f6f">EU-Startups</font>
Herd MSL and Publicis Groupe ANZ launch AI search visibility service - Mi-3.com.au
<a href="https://news.google.com/rss/articles/CBMipAFBVV95cUxQdUhMSzZGTUFxdUFHZ1E1TTl3QWdSQmxNX2U1ejZTWndzcEhKendqb3hvUFlDLUUzMEkxQW5yamFHR1M5R3VlbnlueGdreVAwLXBNM25zc2lFRnpEZFJvcEF1bVZKdnI4N3hvd19TdEZDeHFfQTJIbjZqS094c2xSY3ZOMXB1S1hXQ0xLYlI0MjhEa2M4TTZXMVBvQTVwV0dRdmRGMA?oc=5" target="_blank">Herd MSL and Publicis Groupe ANZ launch AI search visibility service</a> <font color="#6f6f6f">Mi-3.com.au</font>
AI Search Barely Cites Syndicated News Or Press Releases - Search Engine Journal
<a href="https://news.google.com/rss/articles/CBMiogFBVV95cUxObGg0U2ZLMDNLTy0yZ1hsYmFIYW9QVnBvcThGdWVRNWVvVUtqS0oyUW5SWWFvVmN5ZDVtOEdYQXVvdmdKbnduQkhJVy1TLXQ3U1ltVThrOWVESDhfeE5YeFlIVWw0TVNWZXBGWXVETGJObmNTZ1pOeXJGYU9hRzNsel9qdEV2cmJjSV93LWJCZTdRV3VjdVh4cE1kanhDcDVwX0E?oc=5" target="_blank">AI Search Barely Cites Syndicated News Or Press Releases</a> <font color="#6f6f6f">Search Engine Journal</font>
White House Releases National AI Legislative Framework, as Competing Congressional Proposals Sharpen the Federal-State Divide — AI: The Washington Report - mintz.com
<a href="https://news.google.com/rss/articles/CBMivAFBVV95cUxPNEdTTWVFS004SGxOLXZYY0Z4TmRfWkpJMGMyVnlQcWR0cW1HSHRIYmN1U1czWjMzMmlyM1ZsSjcxU19lLV93bnhraXRRVGp5Z251TWtTSFFHNmFYdVRhenF1MXNpQmN1TnpJV2E1ZVhTRXJfb1pWWjZBd2tXWWpyaDA5a1p3YWEzdTlMWjdTM2xnX18tVDhGcTFWM19zYm5Pd19UdlVmSXkxRGc2R0c4TTNwYVZiTFJRNlZ3Uw?oc=5" target="_blank">White House Releases National AI Legislative Framework, as Competing Congressional Proposals Sharpen the Federal-State Divide — AI: The Washington Report</a> <font color="#6f6f6f">mintz.com</font>

Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!