# Get transcript as subtitles Retrieve the transcript formatted as subtitles in SRT, VTT, or plain text format. Only available for completed transcriptions. Returns the transcript formatted as subtitle content in the requested format. The response is **raw text** (not JSON) with the appropriate `Content-Type` header. Supported formats are: - **`srt`** -- SubRip subtitle format (`text/plain`) - **`vtt`** -- WebVTT subtitle format (`text/vtt`) - **`txt`** -- Plain text format (`text/plain`) You can control caption formatting with query parameters for characters per caption, maximum lines, and characters per line. Supports **ETag caching** with `Cache-Control: public, max-age=86400` for completed transcriptions. When PII redaction was enabled, the response includes `X-PII-Redacted` and `X-PII-Policies` headers. #### Path Parameters **`transcription_id`** string required The transcription ID with `trans_` prefix. **`format`** string required Subtitle format. One of: `srt`, `vtt`, `txt`. #### Query Parameters **`chars_per_caption`** integer optional · Defaults to `0` Maximum characters per caption. Set to `0` for no limit. Must be between 0 and 512. **`max_lines`** integer optional · Defaults to `2` Maximum number of lines per caption. Must be between 1 and 3. **`max_chars_per_line`** integer optional · Defaults to `42` Maximum characters per line within a caption. Must be between 20 and 60. ## Returns Returns raw text content with the appropriate `Content-Type` header: - **SRT**: `text/plain` -- Standard SubRip format with sequential numbering and timestamp lines. - **VTT**: `text/vtt` -- WebVTT format with `WEBVTT` header and timestamp cues. - **TXT**: `text/plain` -- Plain text without timestamps. On error, returns a JSON error envelope instead. Response headers include `ETag`, `Last-Modified`, and `Cache-Control`. Request ```bash cURL (SRT) curl -s -X GET "https://api.aitronos.com/v1/audio/transcribe/trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/subtitles/srt?chars_per_caption=80&max_lines=2" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```bash cURL (VTT) curl -s -X GET "https://api.aitronos.com/v1/audio/transcribe/trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/subtitles/vtt" \ -H "Authorization: Bearer $ACCESS_TOKEN" ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") # Get SRT subtitles srt_content = client.audio.get_subtitles( transcription_id="trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", format="srt", chars_per_caption=80, max_lines=2, ) # Save to file with open("transcript.srt", "w") as f: f.write(srt_content) ``` ```python Python import requests transcription_id = "trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" url = f"https://api.aitronos.com/v1/audio/transcribe/{transcription_id}/subtitles/srt" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} params = {"chars_per_caption": 80, "max_lines": 2} response = requests.get(url, headers=headers, params=params) # Response is raw text, not JSON with open("transcript.srt", "w") as f: f.write(response.text) print(f"Saved {len(response.text)} characters") ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const transcriptionId = 'trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6'; const response = await fetch( `https://api.aitronos.com/v1/audio/transcribe/${transcriptionId}/subtitles/vtt`, { headers: { 'Authorization': `Bearer ${accessToken}`, }, } ); // Response is raw text, not JSON const vttContent = await response.text(); console.log(vttContent); ``` Response ```text 200 OK (SRT) 1 00:00:00,500 --> 00:00:03,200 Welcome everyone to today's meeting. 2 00:00:03,500 --> 00:00:12,300 We have several important topics to discuss including the quarterly results. 3 00:00:13,100 --> 00:00:16,000 Let's start with the quarterly results. ``` ```text 200 OK (VTT) WEBVTT 00:00:00.500 --> 00:00:03.200 Welcome everyone to today's meeting. 00:00:03.500 --> 00:00:12.300 We have several important topics to discuss including the quarterly results. 00:00:13.100 --> 00:00:16.000 Let's start with the quarterly results. ``` ```json 422 Invalid Format { "success": false, "error": { "code": "UNSUPPORTED_SUBTITLE_FORMAT", "message": "The requested subtitle format is not supported.", "system_message": "Format must be one of: srt, vtt, txt", "type": "validation_error", "status": 422, "details": { "format": "ass", "valid_formats": ["srt", "vtt", "txt"] }, "trace_id": "abc-123-def", "timestamp": "2026-03-02T12:00:00Z" } } ``` ```json 409 Conflict { "success": false, "error": { "code": "TRANSCRIPTION_NOT_COMPLETE", "message": "This transcription is still being processed.", "system_message": "Transcription is not completed yet", "type": "client_error", "status": 409, "details": { "transcription_id": "trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", "current_status": "processing" }, "trace_id": "abc-123-def", "timestamp": "2026-03-02T12:00:00Z" } } ``` ## Related Resources - [Create Transcription](/docs/api-reference/audio/create-transcription) - [Get Transcription](/docs/api-reference/audio/get-transcription) - [List Transcriptions](/docs/api-reference/audio/list-transcriptions) - [Delete Transcription](/docs/api-reference/audio/delete-transcription) - [Get Paragraphs](/docs/api-reference/audio/get-paragraphs) - [Get Sentences](/docs/api-reference/audio/get-sentences) - [Search Transcript](/docs/api-reference/audio/search-transcript) - [Get Redacted Audio](/docs/api-reference/audio/get-redacted-audio) - [Upload Audio File](/docs/api-reference/audio/upload-audio)