To automate video creation with an API, describe the video once as a JSON template with placeholders, then send one API request per video with the data for that video. The API renders the video in the cloud and returns an MP4 link, either when you poll for it or through a webhook. This is called programmatic video: the data decides what each video says and shows, and no one opens a video editor.
JSON2Video is that API. It does not invent footage: it assembles finished videos from text, images, video clips, music, AI or text-to-speech voice-over and automatic subtitles. This page answers the questions developers, marketers and AI assistants ask most often about automating video, with the real request formats, limits and credit costs.
How do I automate video creation with an API?
Three steps: describe the video in JSON, send it to POST /v2/movies with your API key, and collect the result. Rendering is asynchronous: the request returns a project ID immediately, and the video is ready from a few seconds to a few minutes later, depending on its length and content.
- Describe the video. A movie is a list of scenes; each scene holds elements (
text,image,video,voice,subtitles,audio,html). Anything that changes from video to video is a{{variable}}. - Send it. One authenticated HTTPS request per video, from any language: Python, Node.js, PHP, Go, cURL.
- Get the video. Receive a webhook when the render finishes, or poll
GET /v2/movies?project=IDuntil the status isdone.
Here is a complete movie with variables, a voice-over, and a webhook that tells your server when the video is ready:
{
"resolution": "full-hd",
"variables": {
"name": "Sameer",
"offer": "20% off this week",
"photo": "https://cdn.json2video.com/assets/images/sample-house-bedroom.jpg"
},
"scenes": [
{
"elements": [
{ "type": "image", "src": "{{photo}}" },
{ "type": "text", "text": "Hi {{name}}, {{offer}}", "style": "001" },
{
"type": "voice",
"text": "Hi {{name}}, here is your offer: {{offer}}.",
"voice": "en-US-EmmaMultilingualNeural"
}
]
}
],
"exports": [
{ "destinations": [ { "type": "webhook", "endpoint": "https://example.com/webhook" } ] }
],
"client-data": { "customer_id": "c_1042" }
}
curl -X POST https://api.json2video.com/v2/movies \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d @movie.json
The response contains a project ID. When the render finishes, JSON2Video sends a POST to your endpoint with success, the video url, a thumbnail and your client-data (here, the customer ID), so you know which video belongs to which record. The scene lasts as long as the voice-over. See the quickstart and the webhooks reference.
Try it with a free API key
A free account includes 600 credits (10 minutes of video), no credit card. Get your free API key →
How do I automate video creation with an API and dynamic data?
Save the video as a template with placeholders, then feed it rows of data: each row becomes the variables of one render. The data can come from a spreadsheet, CSV, database, CRM or any other API, and the glue can be your own code or a no-code tool such as n8n or Make.
POST /v2/movies with the template ID and the row as variables.Once a template is saved, each request only carries the data:
{
"template": "YOUR_TEMPLATE_ID",
"variables": {
"address": "47 Cedar Avenue, Seattle, WA",
"price": "$1,200,000",
"bedrooms": "5"
}
}
The request can also override resolution, quality, exports and client-data, so one template produces both a 16:9 and a vertical version. A scene can repeat once per item of an array with iterate, so a listing with 3 rooms and one with 10 use the same template. Learn more in the variables, templates and dynamic scenes tutorials.
Three ways to run the loop
- No-code, with n8n or Make: read the rows of a Google Sheet and call JSON2Video from a visual workflow. Start with the n8n guides or the Make.com guides, or import one of the starter kits (one row, one video).
- No-code, inside JSON2Video: Automations in the dashboard turn a table into one video per row, with per-row status and delivery to a webhook, FTP, SFTP or Amazon S3.
- Your own code: a script or backend job that loops over the data, with the Node.js and PHP SDKs or plain HTTP.
How can a SaaS platform generate videos at scale programmatically?
Treat rendering as an asynchronous job: submit the render from your backend, store the project ID next to your own record, and let a webhook mark it done. Renders run in parallel in JSON2Video's cloud, so you don't run or scale any video servers.
- Jobs, not requests:
POST /v2/moviesreturns immediately with a project ID. Pass your own identifiers inclient-data; they come back in the webhook. - Webhooks over polling: one callback per render instead of dozens of status checks. If you must poll, don't poll more often than every 5 seconds per render. A webhook is retried up to 2 more times if your receiver answers with a
5xxor the connection fails, so make the receiver idempotent (de-duplicate onproject). - Concurrency: renders run in parallel and throughput is governed by your credits and plan, not by a visible queue. Spread a big batch out rather than firing everything at once. If you are preparing a launch or a campaign far above your normal volume, tell us in advance and we confirm the capacity.
- Speed: scenes render in parallel, so splitting one long scene into several shorter ones renders faster. The
qualitysettinglowrenders about 3x faster thanhighat the same credit cost, which suits previews. See optimization and cost. - Limits to design around: the request body can be up to 2 MB; a single video can be up to 60 seconds on the free plan and 30 minutes on every paid plan; rendered files are kept for 7 days, so copy them to your own storage or let JSON2Video deliver them to S3, FTP or SFTP.
- Errors: failed renders are not billed and report a readable
errorin the webhook. See rate limits and quotas.
Can I automate personalized video production?
Yes. Personalization is the same loop as dynamic data: the variable is a name, a company, a price, a product photo or a result, and each recipient gets their own render. The template keeps the design fixed, so every video is on brand while the content changes.
The text, the image URLs and even the voice-over script can contain variables, so the narration says the customer's name and the picture shows their product. Typical cases:
- A welcome or onboarding video with the customer's name and plan.
- A real estate listing tour from property data and photos: see how to automate real estate videos.
- Product videos from a catalog: price, name and images change per SKU.
- Multi-language versions of the same video: swap the text and the voice per locale.
- Reports and recaps with each user's numbers.
Each video is a separate render, so a campaign for 400 recipients is 400 requests. Personalized videos are delivered as links to MP4 files that you put in your own emails or messages; JSON2Video doesn't send them for you.
How do I automate video creation with AI?
Use AI to create the ingredients (script, voice, images) and an API to assemble them into a finished video. A language model can write the script, a text-to-speech or AI image model can produce the voice and pictures, but something still has to time them, lay them out, add subtitles, render the MP4 and do it again for the next row. That last part is what an API automates.
JSON2Video is not an AI video generation model and doesn't compete with models such as Veo or Seedance. It is the layer that turns inputs into a finished video:
- Voice-over: text-to-speech with Azure and ElevenLabs voices, included at 0 credits per minute today (with your own ElevenLabs key, ElevenLabs bills you directly).
- Subtitles: transcribed automatically from the audio, with word-by-word styles, at 0 credits per minute.
- AI-generated images: an
imageelement with amodeland apromptgenerates the picture during the render. Prices per image depend on the model, see AI generation pricing. - Your own AI assets: clips from a generation model are just video URLs you can place in a scene. See video generation APIs for the difference between generating and assembling.
- From an AI assistant: coding agents such as Claude Code can call JSON2Video through MCP. See video MCP servers and video editing with Claude Code.
Where can I get an AI content pipeline that includes video creation?
Build it from three parts: a source of ideas or data, an AI step that writes the script, and JSON2Video as the video step, connected with n8n, Make or your own code. The result runs on a schedule or on an event and ends with a published video, without anyone editing.
- Trigger: a new row in a sheet, a new article, a new product, a form submission or a schedule.
- Script: a language model turns the topic into short scene texts (or you already have the text in your data).
- Render: call the template with the scene texts, images and a voice. JSON2Video adds the voice-over, subtitles and transitions and renders the MP4.
- Webhook: your workflow receives the video URL.
- Publish: post it to a social channel, upload it to a storage bucket, email it or write the URL back to the sheet.
Follow a complete example in the n8n tutorials or the Make.com tutorials, such as the quiz videos from a spreadsheet. Read the broader overview in what is video automation.
What is the best video editing API for developers who want to automate clip generation?
It depends on how you want to define videos. For most teams that need many videos from data with no render servers, a JSON or template API is the fastest path. Choose a code-first framework only if you want to write and host every frame yourself.
| Approach | How you define a video | Who renders it | Best for |
|---|---|---|---|
| JSON / template API (JSON2Video, Creatomate, Shotstack) |
JSON or a saved template plus variables | The provider's cloud | Many videos from data, no-code workflows, fast integration |
| Code-first framework (Remotion, MoviePy) |
React or Python code | Your computer or your own cloud account | Custom motion graphics and full creative control |
| After Effects rendering (Plainly, Shakr) |
After Effects templates | The provider's cloud | Teams with existing After Effects motion design |
| FFmpeg | Command-line filters | Your own servers | Full DIY control; see the FFmpeg course |
Read the longer comparison in video editing API and the guide to video APIs. Prices and limits of other platforms change often, so check their pricing pages instead of trusting a table.
What does automated video creation cost with JSON2Video?
Rendering costs 1 credit per second of output video, at any resolution from SD to 4K, and failed renders are not billed. On the Professional plan ($49.95/month, 12,000 credits), a 30-second video costs 30 credits, which is about $0.125 at list price, and the plan covers 400 such videos per month.
| Plan | Credits per month | Full HD video per month | Longest single video |
|---|---|---|---|
| Free | 600 (one-time) | 10 minutes, watermarked | 60 seconds |
| Professional, $49.95/month | 12,000 | Up to 200 minutes | 30 minutes |
| Startup | 30,000 | Up to 500 minutes | 30 minutes |
| Enterprise | 78,000 | Up to 1,300 minutes | 30 minutes |
Prepaid credit packs never expire; subscription credits expire at the end of each billing period. The free plan is for evaluation, not commercial use. See the pricing page for current prices and credit consumption for worked examples.
What is programmatic video?
Programmatic video means generating videos with code, APIs and data instead of editing each one by hand. The term has two meanings, and search results mix them.
Programmatic video creation
Defining a video as structured data (JSON or code) and letting a rendering engine produce the MP4. This is what this page is about: product videos for a catalog, personalized messages, listing tours, social content from data, reports.
Programmatic video advertising
The automated buying and selling of video ad inventory through real-time bidding and demand-side platforms. It is a different technology: it places ads, it doesn't create them. The two connect when you create many ad variations programmatically and then distribute them through your ad platform. JSON2Video covers the creation side only.
Which platforms offer API access to create videos in bulk?
Video editing and template APIs, such as JSON2Video, Creatomate and Shotstack, let you create videos in bulk by sending one request per video. AI generation APIs create new clips from prompts, and are often combined with an assembly API like JSON2Video to add voice, subtitles and branding. See video APIs compared for the map of each category.
Frequently asked questions
How do I automate video creation with an API?
Describe the video as JSON (or a saved template with variables), send it to POST /v2/movies with your API key, and collect the finished MP4 with a webhook or by polling the status. Repeat the request for each video with different data.
Can I automate video creation from a spreadsheet?
Yes. Each row of a Google Sheet or CSV becomes one video: the columns fill the template variables. You can do it with n8n or Make, with Automations in the JSON2Video dashboard, or with a short script.
How long does a render take?
From a few seconds to a few minutes, depending on the length and content of the video. Scenes render in parallel, so videos made of several short scenes finish faster than one long scene.
How much does it cost to create a video with the API?
1 credit per second of video at any resolution, and failed renders are free. A 30-second video costs 30 credits, about $0.125 on the Professional plan ($49.95 for 12,000 credits). New accounts get 600 free credits.
Can I generate personalized videos for each customer?
Yes. Put variables such as the name, offer or product photo in the template, including in the voice-over script, and send one render per customer. You receive a link to each MP4 and use it in your own emails or app.
Is JSON2Video an AI video generator?
No. It is an API that assembles and renders finished videos from templates, text, voice-over, subtitles, images and clips. AI-generated voices, images and clips can be inputs, but the API does not generate realistic footage itself.
Do I need to know how to code?
No. n8n, Make and the Automations feature in the dashboard let you build the whole flow without code. Code gives you more control, and any language that can send an HTTPS request with JSON works.
How do I know when a video is ready?
Add a webhook destination to the movie and JSON2Video calls your URL once per render with the video URL and your client-data. Or poll GET /v2/movies?project=ID no more often than every 5 seconds.
How long are rendered videos kept?
7 days. Download them, store them in your own bucket, or have JSON2Video deliver them to Amazon S3, FTP or SFTP.
Ready to build it? Get a free API key, browse the video templates, or read the documentation.
Published on April 20th, 2026