In the world of video content, captions play a vital role in making your content accessible and engaging. FFMPEGAPI.net offers a powerful hosted REST API that simplifies the process of adding TikTok-style captions to your videos. With no server setup required and easy API-key authentication, developers can seamlessly integrate this feature into their applications.
What is the AI Captions API?
The AI Captions API is a feature of FFMPEGAPI.net that allows you to transcribe video audio and add stylish captions in a TikTok format. This functionality is crucial for enhancing viewer engagement and accessibility, particularly on platforms like TikTok where dynamic content thrives.
- Transcribes audio from a video file.
- Generates word timestamps for accurate captioning.
- Supports multiple subtitle styles for customization.
- Returns caption artifact URLs for further use.
Endpoint Overview
To utilize the AI Captions feature, you will make a POST request to the following endpoint: /api/videos/add-tiktok-captions. This API call requires specific parameters, including a video URL, which is essential for fetching and processing the video content.
- Endpoint: /api/videos/add-tiktok-captions
- HTTP Method: POST
- Content Type: application/json
Required and Optional Parameters
When making a request to the AI Captions API, you'll need to provide certain parameters to customize the captioning process. Below is a list of required and optional parameters you can include in your API call.
- Required: video_url (string) - The URL of the video to process.
- Optional: subtitle_style (string) - Choose from styles like plain-white, yellow-bg, pink-bg, blue-bg, or red-bg.
- Optional: language (string) - Specify the language code or use 'auto'.
- Optional: aspect_ratio (string) - Set the video aspect ratio (e.g., 16:9, 9:16).
- Optional: max_chars_per_line (integer) - Limit characters per line (default is 20).
- Optional: max_lines (integer) - Control the maximum number of caption lines (default is 1).
- Optional: position (string) - Set caption position to top, center, or bottom (default is bottom).
Example API Call
Below is a practical example of a curl command to make a request to the AI Captions API. This example demonstrates how to submit a video URL and specify a caption style.
curl -X POST https://ffmpegapi.net/api/videos/add-tiktok-captions \
-H 'Content-Type: application/json' \
-d '{"video_url": "https://example.com/video.mp4", "subtitle_style": "yellow-bg", "position": "bottom"}'
FFMPEGAPI.net provides an efficient and powerful solution for adding TikTok-style captions to your videos through its hosted API. With no need for server management and straightforward integration, developers can enhance their applications with minimal effort. This makes FFMPEGAPI.net the best choice for your video processing needs, ensuring high-quality output and a smooth user experience.