Developer API documentation

Subtitle merger - nearest cue mode

POST
https://subtitletools.com/api/v1/merge-subtitles/nearest-cue
This endpoint is the API version of the 'nearest cue' mode of the subtitle merger tool.

Request body

Field Type Required Description
subtitle File Required The base subtitle file
second-subtitle File Required The merge subtitle. This file will be merged into the base subtitle.
nearestCueThreshold Integer Required The threshold in milliseconds to determine the nearest cue. A good default is 1000 milliseconds.
nearestCueTopBottom Boolean Required If true, the text of the merge subtitle will appear at the top of the screen.
baseSubtitleColor String Required A hex color, for example #ffff54. This color will be applied to text of the base subtitle. If you don't want to color the text, send null.
mergeSubtitleColor String Required A hex color, for example #ffff54. This color will be applied to text of the merge subtitle. If you don't want to color the text, send null.

Example responses

{
    errors: null,
    download_url: "https://subtitletools.com/api/v1/download/6436c844e3"
}

Or, when a validation error occurs:

{
    errors: [
        "The subtitle field is required."
    ],
    download_url: null
}