AI Translate API
Overview
The AI Translate API allows you to translate videos from one language to another with or without synchronized mouth movements (lipdub). Currently, we support translating into 30+ languages for videos up to 1 minute in length, with a single speaker.
Upload your video
Upload the video you’d like to translate and take note of the URL.
Choose your language
Use the /supported-languages
path to list the available languages you can translate your video to.
Translate your video
Use the /submit
path to translate your video with or without LipDub.
Requirements to using the API
To use the Captions API, you must:
- Accept the Captions API Terms
- Be actively subscribed to Captions Max, Scale, or Enterprise
- Have enough credits to complete your request
Usage & Credits
- The AI Translate API consumes 1 credit per second of video
- For example, translating a 30-second video would consume 30 credits
- You can view remaining credits and purchase additional credits on the API Dashboard.
Instructions
/supported-languages
List languages supported to be used for translation.
Request
curl -X POST https://api.captions.ai/api/translate/supported-languages -H "Content-Type: application/json" -H "x-api-key: <api-key>"
Response Types
/submit
Begin the video translation process.
Request
videoUrl
- required - Link to the video to be translated.
sourceLanguage
- required - Language spoken in the original video.
targetLanguage
- required - Language desired in the translated video.
translateAudioOnly
- optional - Default value is false
. If the video doesn’t contain faces or you only want to dub the audio, set this to true
.
curl -X POST https://api.captions.ai/api/translate/submit -H "Content-Type: application/json" -H "x-api-key: <api-key>" -d '{"videoUrl": "<video-url>", "sourceLanguage": "<source-language>", "targetLanguage": "<target-language>", "translateAudioOnly": true|false}'
Response Types
/poll
Check the status of an AI Translate video generation.
Request
We recommend polling first after 30 seconds, and every 5 seconds thereafter.
curl -X POST https://api.captions.ai/api/translate/poll -H "Content-Type: application/json" -H "x-api-key: <api-key>" -H "x-operation-id: <operation-id>"
Response Types
Was this page helpful?