Welcome to Subtitle service

Version DEV, running on subtitle.service.srw.cz

About this service

The service is designed to convert subtitles in different formats.

Supported formats are:

  • Subrip (.srt)
  • WebVTT (.vtt)
  • Substation Alpha (.ass)

API

POST /api/v1/conversions

Convert subtitles to specific format

Convert subtitles to specific format. Input/output formats .srt, .vtt and .ass are supported.

HTTP Request

POST https://api.example.com/api/v1/conversions

Headers

Content-Type: application/json

Body

Parameter Type Presence Description
subtitle String Required Subtitles to convert.
format String Required Output format (srt, vtt or ass).
options Object Optional Options
input Object Optional Input options.
strict Boolean Optional Use strict format. Default is true.

Example:

{
    "subtitle": "...",
    "format": "vtt",
    "options": {
        "input": {
            "strict": false
        }
    }
}

Response

Success 200

Headers

Content-Type: text/plain

Body

Converted subtitles to specific format.

Example:

WEBVTT

00:11.000 --> 00:13.000
First subtile

Error 400

Headers

Content-Type: application/json

Body

Parameter Description
InvalidRequestBody Invalid request body json format.
MissingParameter Missing required parameter in request.
UnsupportedOu­tputFormat Requested unsupported output format.
ParseInputError Parse input format error.
ConvertError Convert error.
InputFormat Detected input format (srt, vtt, ass).

Example:

{
    "InvalidRequestBody": "Unable to parse Json - quoted object property name expected"
}