Fetches or generates translated subtitles for a given content ID.

Log in to see full request history

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": "user@example.com", "key": "your_api_key", "content_id": "content123", "language": "Spanish", "format": "json", "revised": false }

Example Response

{ "status": "success", "message": "Captions fetched successfully", "language": "Spanish", "translated": true, "revised": false, "completion_percentage": 100, "captions": { "1": { "start_time": "00:00:01,000", "end_time": "00:00:04,000", "text": "Hola, ¿cómo estás?" }, "2": { "start_time": "00:00:05,000", "end_time": "00:00:07,000", "text": "Bienvenido a bordo." } } }

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.

Try it

Body Params
string
required

The unique identifier of the content.

string
required
Defaults to user@example.com

Email address associated with the API key.

string
required

API key for authentication.

string
Defaults to English

Target language for translation. Defaults to language of the original audio.

string
required
Defaults to json

Output format (json or srt). Default is json.

boolean
Defaults to false

Fetch exclusively revised subtitles. Defaults to false if not provided.

Responses

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json