Generating video with the API
Render MP4, WebM, MOV, MKV and GIF with video, voiceovers, captions and multi-page slideshows.
Published ·Updated
Orshot generates videos from your Studio templates — turn static designs into animated content, add voiceovers, ambient audio, captions and waveforms, or combine pages into video slideshows. Set response.format to mp4, webm, mov, mkv, or gif.
Quick Start#
To generate a video, set the response.format to a video format and include videoOptions for any video-specific settings:
const response = await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<YOUR_TEMPLATE_ID>",
modifications: {
title: "Product Launch 2026",
subtitle: "Coming this April",
bgVideo: "https://example.com/product-demo.mp4",
},
response: {
format: "mp4",
type: "url",
},
}),
});
const data = await response.json();
console.log(data.data.content); // Video URLSupported Formats#
| Format | Best For | File Size |
|---|---|---|
mp4 | Social media, web, general purpose | Medium |
webm | Web-optimized video, modern browsers | Smaller |
mov | QuickTime / professional editing | Medium |
mkv | Matroska, flexible archival format | Medium |
gif | Short loops, thumbnails, previews | Larger |
How It Works#
- Design a template in Orshot Studio with video elements, text, images, and shapes
- Add audio & subtitles per page — upload audio, generate voiceovers or ambient sound, and add automatic captions or SRT files
- Call the API with a video format and pass content overrides in
modifications - Configure video settings using
videoOptionsfor trimming, audio control, subtitles, and optional page-combining transitions - Receive your video as a hosted URL —
response.typemust be"url"for video and GIF output
API Request Structure#
| Field | Type | Required | Description |
|---|---|---|---|
templateId | string | Yes | Your Studio template ID |
modifications | object | No | Content overrides (text, spoken narration, images, video URLs) |
response.format | string | Yes | "mp4", "webm", "mov", "mkv", or "gif" |
response.type | string | No | Must be "url" — "base64"/"binary" are not supported for video/GIF |
response.includePages | array | No | Specific pages for multi-page video slideshows |
videoOptions | object | No | Video controls (fps, quality, trim, audio, subtitles, combine pages) |
Replacing Video Content#
Replace video elements in your template by passing a new URL:
{
"modifications": {
"bgVideo": "https://example.com/new-background.mp4"
},
"response": {
"format": "mp4",
"type": "url"
}
}Multi-Page Video Slideshows#
Multi-page templates can be rendered as a single video, with each page becoming a segment of the final video:
{
"templateId": "<SLIDESHOW_TEMPLATE>",
"modifications": {
"page1@title": "Introduction",
"page1@bgVideo": "https://example.com/intro.mp4",
"page2@title": "Features",
"page2@bgVideo": "https://example.com/features.mp4",
"page3@title": "Get Started",
"page3@bgVideo": "https://example.com/cta.mp4"
},
"response": {
"format": "mp4",
"type": "url"
},
"videoOptions": {
"combinePages": true,
"pageTransition": "fade",
"pageTransitionDuration": 0.5
}
}videoOptions.combinePages is supported only for multi-page mp4, webm,
mov, and mkv renders. GIF does not support combined output.
For multi-page templates, response.type: "binary" is not supported for
non-PDF outputs. Use url (recommended) or base64.
Common videoOptions#
fps- output frame ratequality- encoder qualitytrimStart,trimEnd- trim output range in secondsmuted- mute/unmute output audio (includes page-level audio)subtitleSource,subtitleColor,subtitleBackground,subtitleFontSize,subtitleFontFamily,subtitlePosition,subtitleOffsetcombinePages,pageTransition,pageTransitionDuration- combine multi-page videos with optional transitions
Page-Level Audio & Subtitles#
You can add uploaded audio, generated voiceovers, ambient sound and subtitles to each page in Studio. Page audio is mixed into the video automatically. Generated voiceovers can also expose their script as a dynamic parameter for personalized narration. Page subtitles are used when no videoOptions.subtitleSource is provided.
See Video Options for details on how page audio interacts with API-level controls.
Credit Costs#
Video generation costs 1 credit per second of output video (billed per second or part thereof), so longer videos consume proportionally more credits than images or PDFs, which cost 1 credit each. New AI narration bills AI credits instead, 1 per started 10 seconds of speech (premium voices 2), from the same pool as AI video and AI images.
Check your workspace usage dashboard for current credit usage and limits.
Example: Social Media Clip#
const response = await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<SOCIAL_VIDEO_TEMPLATE>",
modifications: {
headline: "5 Tips for Better Productivity",
author: "Jane Smith",
bgVideo: "https://example.com/office-bg.mp4",
"bgVideo.trimStart": 0,
"bgVideo.trimEnd": 15,
"bgVideo.muted": true,
},
response: {
format: "mp4",
type: "url",
},
videoOptions: {
subtitleSource: "https://example.com/voiceover.mp3",
subtitleColor: "#ffffff",
subtitleBackground: "rgba(0,0,0,0.6)",
subtitleFontSize: "28px",
},
}),
});What's Next#
Ready to automate?
Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.
Get your API key- Image, PDF and video generation via API
- Visual editor with AI and smart layouts
- Zapier, Make, MCP and 50+ integrations
- White-label embed for your own app
- 100 free credits a month, no credit card required