Fetches or generates translated subtitles for a given content ID.

Overview

The Subtitles Translation API provides endpoints to fetch or generate translated subtitles for various types of audio or video content. It supports multiple languages and subtitle formats, making it suitable for applications like media players requiring multilingual subtitles.


Endpoint

POST /translations/subtitles

Request Parameters

ParameterTypeRequiredDescription
emailstringYesEmail address of the user.
keystringYesAuthentication key for API access.
content_idstringYesUnique identifier for the content.
languagestringNoTarget language for translation. If omitted, language of the original audio is assumed.
formatstringNoOutput format. Supported values: json (default) and srt.
revisedbooleanNoFetch exclusively revised subtitles. Default is false.

Response Parameters

ParameterTypeDescription
statusstringStatus of the request. Values: success, processing, or error.
messagestringDetailed message about the response.
languagestringLanguage of the returned captions.
translatedbooleanIndicates if the subtitles are translations (true) or language of the original audio (false).
revisedbooleanSpecifies if the captions were revised or not.
completion_percentagefloatPercentage of completed subtitles available.
captionsobjectCaptions organized by index, including start_time, end_time, and text.

Example Request

{
  "email": "[email protected]",
  "key": "your_api_key",
  "content_id": "3519e082c04b263e854a864fe358f347e38ed1dcdf2f6a58368a43b3eef4ab71",  
  "language": "English",
  "include_audio": "true"
}

Example Response

{
    "status": "success",
    "content_id": "3519e082c04b263e854a864fe358f347e38ed1dcdf2f6a58368a43b3eef4ab71",
    "language": "English",
    "title": "Welcome Aboard: Cathay Pacific Flight to Bangkok",
    "content": "Ladies and gentlemen, a very good afternoon and a warm welcome on board this Cathay Pacific flight 701 to Bangkok. I'm the captain; my name is Cam Matner. Flying time to Bangkok is two hours and 30 minutes, and we are expecting mainly fine and smooth flying conditions. Having said that, could I still ask that any time you're seated, would you please leave your seatbelts loosely fastened?\n\nOur in-flight services manager looking after you in the cabin this afternoon is Christina, and she will shortly be showing you this aircraft's safety briefing. It does contain important information, so please give it your attention. We're just waiting for the last of the bags to be loaded before we get underway; we should have all the doors shut within the next five to ten minutes. So thanks very much for your patience, and please enjoy the flight.",
    "male_audio_download_url": "http://content.techspecsray.com/air/3519e082c04b263e854a864fe358f347e38ed1dcdf2f6a58368a43b3eef4ab71_English_male.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=M7oaNTtSuMaoGu8Jipfo%2F20241212%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241212T194537Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=8a99c348a984246fa6b29dad96010af6cf937807208dec9598010215d6b152eb",
    "female_audio_download_url": "http://content.techspecsray.com/air/3519e082c04b263e854a864fe358f347e38ed1dcdf2f6a58368a43b3eef4ab71_English_female.mp3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=M7oaNTtSuMaoGu8Jipfo%2F20241212%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241212T194537Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=05d630f2919a5a9c26e9a2439d8003b42fe1af19ca5e0625664ed95b73d942c6"
}

Error Responses

Status CodeError Message
400Invalid subtitle type or unsupported language.
403Invalid key or unauthorized access.
500Server error or translation process failure.
504API request timed out.



Extra notes:

  • /n or /N present in the subtitles text means next line and should be rendered as such.
Language
Credentials
Header
Click Try It! to start a request and see the response here!