Documentation Index
Fetch the complete documentation index at: https://docs.slidevid.ai/llms.txt
Use this file to discover all available pages before exploring further.
Try it out! Use the API playground on the right to test the Add Captions endpoint directly.
Overview
Add Captions automatically transcribes your video and adds professional-looking captions with customizable styles. Perfect for:
- Social media content (TikTok, Instagram Reels, YouTube Shorts)
- Accessibility compliance
- Increasing video engagement
- Multi-language content
- Educational videos
Captions are automatically synced with your video’s audio and support multiple styling presets.
Endpoint
POST /v1/project/create/add-captions
Required Fields
Media ID of the video to add captions to (as a string)
Optional Fields
Custom name for the project (max 100 characters). If not provided, a name will be auto-generated.
Background music ID from /v1/music/list (max 30 characters)
Caption settings for the video
Caption preset style. Available presets: default, beast, umi, tiktok, wrap1, wrap2, ariel, hooked, classic, active, bubble, glass, comic, glow, pastel, neon, retroTV, red, marker, modern, blue, vivid.
Caption position on the video: top, middle, or bottom
Language code for the video (2 characters). Example: en, es
Webhook URL for status notifications (max 500 characters, must be HTTPS)
Custom metadata object (max 5KB JSON)
Request Examples
Basic Caption Addition
const response = await fetch('https://api.tryslidevid.ai/v1/project/create/add-captions', {
method: 'POST',
headers: {
'x-api-key': process.env.SLIDEVID_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
media: 'media_abc123'
})
});
const data = await response.json();
console.log('Video ID:', data.data.videoId);
console.log('Project ID:', data.data.projectId);
Advanced with Custom Styling
const addCaptionsAdvanced = async () => {
const response = await fetch('https://api.tryslidevid.ai/v1/project/create/add-captions', {
method: 'POST',
headers: {
'x-api-key': process.env.SLIDEVID_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Social Media Captioned Video',
media: 'media_xyz789',
language: 'en',
caption: {
preset: 'modern',
alignment: 'bottom'
},
addStickers: false,
musicId: 'upbeat_background_001',
webhook: 'https://yoursite.com/webhook',
metadata: {
campaignId: 'social-media-2024',
platform: 'tiktok'
}
})
});
return await response.json();
};
With Background Music
const addCaptionsWithMusic = async () => {
const response = await fetch('https://api.tryslidevid.ai/v1/project/create/add-captions', {
method: 'POST',
headers: {
'x-api-key': process.env.SLIDEVID_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Product Demo with Captions',
media: 'media_product_demo',
language: 'en',
addStickers: false,
caption: {
preset: 'modern',
alignment: 'bottom'
},
musicId: 'calm_background_music'
})
});
return await response.json();
};
Response
{
"success": true,
"data": {
"videoId": "vid_caption_abc123xyz",
"projectId": "proj_caption_abc123xyz",
"status": "STARTED"
}
}
Webhook Notification
When your captioned video is ready, we’ll POST to your webhook URL (if configured):
{
"status": "COMPLETED",
"data": {
"videoId": "vid_caption_abc123xyz",
"status": "COMPLETED",
"url": "https://cdn.tryslidevid.ai/videos/abc123xyz.mp4",
"shareUrl": "https://cdn.tryslidevid.ai/shared/abc123xyz.mp4",
"metadata": {
"projectId": "proj_caption_abc123xyz"
}
},
"message": "Video completed"
}
Caption Presets
Available caption presets for the caption.preset field:
| Preset | Description |
|---|
default | Default caption style with bold text and shadow effects |
beast | Bold uppercase style with Komika font |
umi | Yellow glowing text style |
tiktok | Viral & trendy style, perfect for social media |
wrap1 | Wrapped style with red background highlight |
wrap2 | Wrapped style with blue background highlight (uppercase) |
ariel | Bold uppercase style with purple highlight |
hooked | Brand style with purple background |
classic | Clean, simple captions with black background (Default) |
active | Green background with bold text |
bubble | White background bubble style |
glass | Glassmorphic transparency effect |
comic | Comic Sans font with colorful style |
glow | Pink and orange glow effects |
pastel | Soft pastel pink background |
neon | Green neon glow effect |
retroTV | Retro TV style with cyan glow |
red | Red glow effect with white text |
marker | Yellow marker/highlighter style |
modern | Contemporary white background style |
blue | Blue background style |
vivid | Vibrant pink background with uppercase text |
Best Practices
Clear Audio
Ensure your video has clear audio for accurate transcription
Language Match
Set the correct language code for best transcription accuracy
Style Selection
Choose caption styles that match your content and brand
Positioning
Bottom alignment works best for most social media content
Error Handling
| Error | Description | Solution |
|---|
media: Media ID is required | Missing media ID | Provide a valid media ID string |
media: Media not found | Invalid media ID | Ensure the media ID exists and is correct |
media: Media is not a video | Media is not a video type | Ensure the media ID points to a video, not an image |
language: Language code too long | Invalid language code | Use 2-character language code (e.g., “en”, “es”) |
musicId: Music "X" not found | Invalid music ID | Use valid music ID from /v1/music/list |
caption.alignment: Invalid enum value | Invalid alignment | Use bottom, middle, or top |
webhook: Must be a valid HTTPS URL | Invalid webhook URL | Ensure webhook URL uses HTTPS |
Not enough credits | Insufficient credits | Top up your account credits |
Next Steps
List Videos
View all your created videos
Video Details
Check your video processing status
Music Library
Browse available background music
Webhooks Guide
Learn how to handle webhook notifications
Array containing exactly one video file
Required array length: 1 element
Language code for transcription (exactly 2 characters)
Required string length: 2
Caption styling and positioning settings
Add AI-generated stickers to enhance video engagement
Background music ID from /v1/music/list
Maximum string length: 30
HTTPS URL for status notifications (max 500 characters)
Maximum string length: 500
Custom metadata object (max 5KB)
Add Captions created successfully