Adding Subtitles
Learn how to add automated subtitles to your generated videos
Orshot allows you to automatically generate and overlay subtitles on your videos. You can configure subtitles directly in the Studio editor per page, or pass a subtitleSource via the API at render time.
Page-Level Subtitles#
You can attach subtitles to each page directly in the Studio editor:
- Upload an SRT file — subtitles are used as-is, no transcription needed
- Auto-generate from page audio — if the page has background audio attached, Orshot can automatically transcribe it using OpenAI Whisper
Page subtitles include full styling controls (font, color, background, position) that are configured visually in the editor. These styles are automatically applied during rendering.
API-level videoOptions.subtitleSource takes priority over page-level subtitles. If you pass a subtitleSource in the API request, it overrides whatever is set on the page.
API Usage#
You can also provide subtitles via the videoOptions.subtitleSource field in the render API request. This is useful for dynamic subtitle sources or when you want to override page-level settings.
Single Page Templates#
For single-page templates, pass a direct URL string to your source file.
{
"templateId": "your-template-id",
"modifications": {
"text": "Hello World"
},
"response": {
"format": "mp4"
},
"videoOptions": {
"subtitleSource": "https://example.com/audio.mp3",
"subtitleColor": "#ffffff",
"subtitleBackground": "rgba(0,0,0,0.5)",
"subtitleFontSize": "32px",
"subtitleOffset": "50px"
}
}Multi-Page Templates#
For multi-page templates (like carousels turned into video slideshows), you can specify different subtitle sources for each page. Each page's video segment will use its corresponding source.
Pass an array of objects, where each object specifies the page number and the url.
{
"templateId": "your-multipage-template-id",
"modifications": { ... },
"response": {
"format": "mp4",
"includePages": [1, 2]
},
"videoOptions": {
"subtitleSource": [
{
"page": 1,
"url": "https://example.com/intro-audio.mp3"
},
{
"page": 2,
"url": "https://example.com/part-2-audio.mp3"
}
],
// Styling applies globally to all pages
"subtitleColor": "#ffffff",
"subtitleBackground": "#000000"
}
}If a page number is omitted from the array, that specific page will render without subtitles.
If you also set videoOptions.combinePages: true, subtitles are still
processed per page first and then merged into the final combined video.
Supported Formats#
The subtitleSource URL can point to:
- Audio Files:
.mp3,.wav,.m4a(Automated transcription via OpenAI Whisper) - Video Files:
.mp4,.mov,.webm(Audio extracted & transcribed) - Subtitle Files:
.srt,.vtt(Used directly without transcription)
Styling Options#
When using page-level subtitles, styles are configured visually in the Studio editor. When using API-level subtitles, you can customize appearance with the following videoOptions properties:
| Property | Type | Default | Description |
|---|---|---|---|
subtitleColor | string | "white" | Text color (hex, rgb, or name) |
subtitleBackground | string | "transparent" | Background color of the subtitle box |
subtitleFontSize | string | "30px" | CSS font size value |
subtitleFontWeight | string | "700" | Font weight ("400" to "800") |
subtitleFontFamily | string | "Arial, sans-serif" | Font family (Google Fonts supported) |
subtitlePosition | string | "bottom" | "bottom" or "top" |
subtitleOffset | string | "50px" | Distance from the positioned edge |
subtitlePaddingX | string | "16px" | Horizontal padding |
subtitlePaddingY | string | "8px" | Vertical padding |
subtitleBorderRadius | string | "6px" | Corner radius of the subtitle box |
subtitleShadowX | number | 2 | Text shadow X offset (px) |
subtitleShadowY | number | 2 | Text shadow Y offset (px) |
subtitleShadowBlur | number | 4 | Text shadow blur radius (px) |
subtitleShadowColor | string | "rgba(0,0,0,0.8)" | Text shadow color |
API-level styling options override page-level subtitle styles. If a page has subtitles with custom styling configured in the editor, passing any of the above options in videoOptions will take precedence.
Font Support#
You can use any Google Font by specifying its name in subtitleFontFamily. The system will automatically fetch and load it.
"videoOptions": {
"subtitleFontFamily": "Inter, sans-serif"
}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
- 60 free renders — no credit card required