Replicate: Run Video Models via API (2026)
๐ Quick start
- Create a Replicate account and get an API token.
- Choose a video model (e.g., CogVideo, Mochi) and copy its version ID.
- Send a POST request with your prompt to start a prediction.
- Poll the prediction endpoint until the video is ready, then download the MP4.
๐ก Why use Replicate for this
Replicate is a platform that lets you run open-source machine learning models through a simple HTTP API, including video generation models like CogVideo and Mochi. Instead of downloading model weights, configuring GPU drivers, or managing infrastructure, you send a POST request with a text prompt and receive a video file. This guide walks through the practical workflow: selecting a model, authenticating, making the API call, and polling for results. Note that Replicate's free tier is limited and may not include access to all video models; you may need to add a credit card or upgrade to a paid plan for production use. Pricing and features checked on 2026-10-15.
๐ ๏ธ How to Run Video Models via API (5 steps)
Step 1
Go to replicate.com and sign up or log in. Navigate to the 'Explore' page and search for 'CogVideo' or 'Mochi'. Click on the model you want to use.
Step 2
On the model page, click the 'API' tab. Copy the 'Version' ID (a long hash) and note the API endpoint URL. Also, go to your account settings and copy your API token from the 'API tokens' section.
Step 3
Open your terminal. Set your API token as an environment variable: export REPLICATE_API_TOKEN='your_token_here'. Then, use curl to send a POST request to https://api.replicate.com/v1/predictions with headers 'Authorization: Token $REPLICATE_API_TOKEN' and 'Content-Type: application/json', and a JSON body containing 'version' and 'input' with your prompt and parameters.
Step 4
The API returns a JSON response with an 'id' and 'status'. Copy the 'id' and poll the prediction endpoint: GET https://api.replicate.com/v1/predictions/{id} with your token. Repeat every 2-3 seconds until 'status' is 'succeeded'.
Step 5
Once succeeded, the response includes an 'output' field with a URL to the generated video. Download the MP4 file using curl or your browser.
๐ฆ What you'll get
You receive a downloadable MP4 video file matching your prompt, typically 3-10 seconds long depending on the model and parameters. The video quality varies by model and prompt.
๐ฐ Pricing (checked 2026-10-15)
| Plan | Price | What you get for this workflow | Official link |
|---|---|---|---|
| Free | $0 |
Limited free credits, may not include all video models | pricing โ |
| Pay-as-you-go | Varies by model |
Pay per second of GPU time; video models cost more | pricing โ |
๐ Copy-paste prompts
"a sleek smartphone floating in a dark studio, rotating slowly, with dramatic lighting and a reflective surface, high quality, 4k"
"a close-up of a hummingbird hovering near a red flower, slow motion, shallow depth of field, vibrant colors"
"a futuristic city skyline at dusk, flying cars, neon lights, rain, cinematic, wide shot"
โ ๏ธ Common mistakes
โ๏ธ Replicate vs Alternatives
| Tool | Price | Best For | Verdict |
|---|---|---|---|
Free tier; Standard $12/month; Pro $28/month; Unlimited $76/month (checked 2026-10-15) |
No-code video generation with a user-friendly interface. | ||
Free tier; Standard $10/month; Pro $30/month (checked 2026-10-15) |
Quick text-to-video generation with a simple Discord bot. |
โ Frequently Asked Questions
Q: What is Replicate?
Replicate is a platform that lets you run open-source machine learning models via a cloud API, including video generation models.
Q: How much does Replicate cost?
Replicate offers a free tier with limited credits, and pay-as-you-go pricing based on GPU time. Video models typically cost more than text models.
Q: Can I use Replicate for free?
Yes, there is a free tier, but it may not include access to all video models or may have limited usage. Check the pricing page for current details.
Q: What video models are available on Replicate?
Popular models include CogVideo and Mochi, but availability and versions change. Check the Replicate model library for the latest.
Q: How long does it take to generate a video?
Generation time varies by model and length, typically from a few seconds to a minute or more. Polling is required to get the result.
๐ Level up your AI toolkit
Understand AI in 5 minutes a day. No jargon. No hype. Unsubscribe anytime.