SRTGen.com LogoSRTGen.com

Cloud Burn API

Submit projects to our high-performance rendering cluster for hardcoded video generation with professional styling.

POST/api/v1/burn
Quick Implementation
curl -X POST https://api.srtgen.com/api/v1/burn \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "proj_8k2n9m1b",
  "resolution": "1080p"
}'
POSThttps://api.srtgen.com/api/v1/burn

Parameters

ParameterTypeRequiredDescription
Core Parameters
projectIdStringYes

The unique identifier of the project containing video and subtitles.

resolutionStringNo

Desired output video resolution.

Options: original, 1080p, 720p, 480p | Default: original

fileNameStringNo

Custom name for the generated MP4 file.

languageStringNo

Target language for the burned subtitles.

Default: Project Active Language

Multi-Language Support (Dual Subtitles)
languagesArrayNo

Configurations for multiple subtitle tracks in one video.

Limit: Max 3 Languages

-language
StringYes*

The code for this language slot (e.g., 'zh' or 'original').

-lineBreakRules
ObjectNo

Per-language segmentation overrides.

-styleSettings
ObjectNo

Per-language styling (Crucial for dual subtitle positioning).

Line Break Rules (lineBreakRules)
lineBreakRulesObjectNo

Nested object for subtitle segmentation logic.

-maxChars
NumberNo

Maximum characters allowed per line.

Range: 5 - 100 | Default: 45

-maxWords
NumberNo

Maximum words allowed per subtitle line.

Range: 1 - 20 | Default: 10

-balanceLines
BooleanNo

Evens out line lengths in multi-line subtitles.

Default: true

-sentenceSplit
BooleanNo

Prefer breaking lines at the end of sentences.

Default: true

-gapThreshold
NumberNo

Max gap (seconds) between words on a line.

Range: 0.1 - 2.0 | Default: 0.4

Style Basics (styleSettings)
uppercaseBooleanNo

Force all transcription text to uppercase.

styleSettingsObjectNo

Nested object for visual styling overrides.

-preset
StringNo

Apply a built-in style preset as a base.

Options: standard-stream, classic-apple, etc.

-fontSize
NumberNo

Font size as a ratio of video height.

Default: 0.045

-fontFamily
StringNo

Standard font name used for rendering.

Default: Arial

-bold
BooleanNo

Apply bold weight to text.

Default: false

-italic
BooleanNo

Apply italic style to text.

Default: false

Colors & Borders
-primaryColor
HexNo

Main text color hex code.

Default: #FFFFFF

-secondaryColor
HexNo

Secondary color (used for karaoke effects).

Default: #00FFFF

-outlineColor
HexNo

Color of the text outline.

Default: #000000

-outline
NumberNo

Outline thickness (Ratio of height).

Default: 0.002

-shadow
NumberNo

Shadow depth (Ratio of height).

Default: 0.001

Positioning (Ratios 0-1)
-alignment
NumberNo

ASS alignment code (1-9). Bottom-Center is 2.

Range: 1 - 9 | Default: 2

-posX
NumberNo

Horizontal position (0 = Left, 1 = Right).

Default: 0.5

-posY
NumberNo

Vertical position ratio (0 = Top, 1 = Bottom). Default: 0.88.

-marginV
NumberNo

Vertical margin ratio from bottom/top. Default: 0.056.

Animation & Effects
-fadeIn
NumberNo

Fade in duration in milliseconds.

-fadeOut
NumberNo

Fade out duration in milliseconds.

-karaoke
StringNo

Karaoke tag type (k, kf, ko, ks).

Example: Standard Stream Style
curl -X POST https://api.srtgen.com/api/v1/burn \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "proj_8k2n9m1b",
  "resolution": "1080p",
  "styleSettings": {
    "preset": "standard-stream",
    "fontSize": 0.055,
    "bold": true
  }
}'
POSThttps://api.srtgen.com/api/v1/burn
Advanced: Dual-Language Burn
curl -X POST https://api.srtgen.com/api/v1/burn \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "proj_8k2n9m1b",
  "languages": [
    {
      "language": "original",
      "styleSettings": {
        "preset": "classic-apple",
        "posY": 0.85
      }
    },
    {
      "language": "es",
      "styleSettings": {
        "preset": "classic-apple",
        "posY": 0.75,
        "primaryColor": "#FFFF00"
      }
    }
  ]
}'
POSThttps://api.srtgen.com/api/v1/burn

Status & Response

1. Async Initialization

Cloud burn jobs are asynchronous. The API will respond immediately with a burnId once the task is accepted by the rendering cluster.

Use the Export Status Endpoint to poll for progress and the final video URL.

Response: 200 OK
{
  "success": true,
  "burnId": "brnc_abc123",
  "status": "running"
}

2. Tracking & Retrieval

To get the final result, poll the project status using the burnId received during initialization:

curl -X POST https://api.srtgen.com/api/v1/export/proj_xxx \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "output": "mp4",
  "burnId": "brnc_abc123"
}'
POSThttps://api.srtgen.com/api/v1/export/proj_xxx

When finished, the status will change to completed and a resultUrl (the downloadable video) will be provided.

Tracking via Export Endpoint
{
  "status": "completed",
  "resultUrl": "https://cdn.b2.com/video.mp4"
}

Error Codes

StatusError CodeDescription
400missing_parameterprojectId is required.
400missing_videoProject has no source video attached.
401unauthorizedAPI Key is missing or invalid.
403insufficient_balanceInsufficient credits for the video duration.
404not_foundProject ID does not exist.
500burn_submission_failedRender cluster is at capacity or unreachable.
500export_errorAn error occurred during subtitle processing.
500server_errorUnexpected internal server error.
Was this page helpful?