In the world of digital content, adding captions to videos enhances accessibility and viewer engagement. FFMPEGAPI.net offers a powerful hosted REST API that simplifies the process of generating AI-driven captions for your videos. With the AI Captions endpoint, you can effortlessly transcribe audio and render stylish captions that are perfect for platforms like TikTok.
What is the AI Captions Endpoint?
The AI Captions endpoint on FFMPEGAPI.net allows developers to transcribe video audio and generate styled captions. This endpoint is designed for ease of use in various applications, including automation, SaaS apps, and content pipelines.
- Transcribes audio and provides word timestamps.
- Creates TikTok-style captions.
- Returns caption artifact URLs when available.
How to Use the AI Captions Endpoint
To use the AI Captions endpoint, you must send a POST request to `/api/videos/add-tiktok-captions`. The request must include the video URL and can optionally include parameters like subtitle style, language, aspect ratio, and more.
- Video URL (mandatory): The link to your video file.
- Subtitle style (optional): Choose from styles like plain-white, yellow-bg, etc.
- Language (optional): Specify the language code or use auto-detection.
- Aspect ratio (optional): Set the aspect ratio for your video.
curl -X POST https://ffmpegapi.net/api/videos/add-tiktok-captions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"video_url":"https://example.com/video.mp4", "subtitle_style":"yellow-bg", "position":"bottom"}'
Parameters Explained
When making a request to the AI Captions endpoint, several parameters help customize the output to your needs. Here's a breakdown of the available options:
- video_url: The URL of the video you wish to process.
- subtitle_style: Choose the caption style to fit your branding.
- language: Specify the language for transcription.
- aspect_ratio: Determine how your video should be displayed.
- max_chars_per_line: Control the number of characters in each caption line.
- max_lines: Set the maximum number of caption lines.
- position: Decide where to place the captions on the screen.
FFMPEGAPI.net stands out as the best video processing API for automation, providing a seamless solution for adding AI-generated captions to videos. With no server setup required and API-key authentication, developers can easily integrate this powerful tool into their workflows. Start leveraging the AI Captions endpoint today to enhance your video content effortlessly.