SRTGen.com LogoSRTGen.com

Export Subtitles

Download subtitles in your preferred formats and track the real-time status of your transcription projects.

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

Parameters

ParameterTypeRequiredDescription
Core Parameters
idStringYes

The unique project identifier passed in URL path.

outputStringNo

Desired subtitle format or media asset for export.

Options: srt, vtt, ass, txt, json, mp4 | Default: srt

burnIdStringNo

Explicitly request status/result of a specific burn job ID.

languageStringNo

Target language for the subtitles.

Range: Any translated code or 'original' | Default: original

Multi-Language Support (New)
languagesArrayNo

Array of configurations to show multiple languages in the same file.

Limit: Max 3 Languages | Default: ASS, VTT

-language
StringYes*

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

-lineBreakRules
ObjectNo

Per-language segmentation overrides.

-styleSettings
ObjectNo

Per-language styling (Primary for ASS).

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 (Active for ASS).

-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 (approx 48px)

-fontFamily
StringNo

Standard font name used for rendering.

Default: Arial

-bold
BooleanNo

Apply bold weight to text.

Range: true | false | Default: false

-italic
BooleanNo

Apply italic style to text.

Range: true | false | 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).

Range: 0.0 - 1.0 | Default: 0.5

-posY
NumberNo

Vertical position (0 = Top, 1 = Bottom).

Range: 0.0 - 1.0 | Default: 0.88

-marginV
NumberNo

Vertical margin ratio from bottom/top.

Range: 0.0 - 0.5 | Default: 0.056

Animation & Effects
-fadeIn
NumberNo

Fade in duration in milliseconds.

Range: 0ms - 5000ms | Default: 0

-fadeOut
NumberNo

Fade out duration in milliseconds.

Range: 0ms - 5000ms | Default: 0

-karaoke
StringNo

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

Options: k, kf, ko, ks | Default: none

Modern: High-Impact Video SRT
curl -X POST https://api.srtgen.com/api/v1/export/proj_8k2n9m1b \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "output": "srt",
  "language": "fr",
  "lineBreakRules": {
    "maxChars": 25,
    "maxWords": 5,
    "balanceLines": true
  }
}'
POSThttps://api.srtgen.com/api/v1/export/proj_8k2n9m1b
Advanced: Professional ASS Styling
curl -X POST https://api.srtgen.com/api/v1/export/proj_8k2n9m1b \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "output": "ass",
  "lineBreakRules": {
    "maxChars": 30
  },
  "styleSettings": {
    "preset": "standard-stream",
    "fontSize": 55,
    "primaryColor": "#FF0000",
    "bold": true
  }
}'
POSThttps://api.srtgen.com/api/v1/export/proj_8k2n9m1b
Bilingual: Dual-Language ASS/VTT
curl -X POST https://api.srtgen.com/api/v1/export/proj_8k2n9m1b \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "output": "ass",
  "languages": [
    {
      "language": "original",
      "styleSettings": {
        "preset": "classic-apple",
        "fontSize": 40,
        "posY": 0.85
      }
    },
    {
      "language": "zh",
      "lineBreakRules": {
        "maxChars": 16,
        "balanceLines": false
      },
      "styleSettings": {
        "preset": "standard-stream",
        "fontSize": 55,
        "posY": 0.7
      }
    }
  ]
}'
POSThttps://api.srtgen.com/api/v1/export/proj_8k2n9m1b

Response Structure

1. Processing State

If the project is still being processed by our AI engine or pending, you'll receive a status update indicating its current state.

This allows you to implement simple polling on your frontend using the same endpoint until status is completed.

Response: 200 OK
{
  "projectId": "proj_abc123",
  "status": "processing",
  "message": "AI is generating..."
}

2. Completed State

Once finalized, the response includes the subtitle content in your requested format.

Each format is optimized for its use-case:

JSON Result
SRT / VTT
ASS Styled
Plain Text
Response: 200 OK
{
  "success": true,
  "projectId": "proj_abc123",
  "status": "completed",
  "format": "srt",
  "content": "1\\n00:00:01,000 --> 00:00:03,000\\nHello..."
}

Error Codes

StatusError CodeDescription
400param_not_validA provided parameter is outside its allowed range.
401unauthorizedAPI Key is missing or invalid.
404not_foundProject ID does not exist.
500export_errorAn error occurred during formatting.
500project_fetch_failedFailed to retrieve project data.
500server_errorUnexpected internal server error occurred.
Error Response Structure
{
  "success": false,
  "error": "unauthorized",
  "message": "The provided API key is invalid or has expired."
}
Was this page helpful?
SRTGen.com - Professional AI Subtitle Generator