> ## Documentation Index
> Fetch the complete documentation index at: https://assemblyai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get subtitles

> <Note>To retrieve your transcriptions on our EU server, replace `api.assemblyai.com` with `api.eu.assemblyai.com`.</Note>
Export your transcript in SRT or VTT format to use with a video player for subtitles and closed captions.




## OpenAPI

````yaml openapi.yaml GET /v2/transcript/{transcript_id}/{subtitle_format}
openapi: 3.1.0
info:
  title: AssemblyAI API
  description: AssemblyAI API
  version: 1.3.4
  termsOfService: https://www.assemblyai.com/legal/terms-of-service
  contact:
    name: API Support
    email: support@assemblyai.com
    url: https://www.assemblyai.com/docs/
servers:
  - url: https://api.assemblyai.com
    description: AssemblyAI API
    x-fern-server-name: Default
security:
  - ApiKey: []
tags:
  - name: transcript
    description: Transcript related operations
    externalDocs:
      url: https://www.assemblyai.com/docs/guides/transcribing-an-audio-file
  - name: streaming
    description: Streaming Speech-to-Text
    externalDocs:
      url: https://www.assemblyai.com/docs/streaming/universal-streaming
paths:
  /v2/transcript/{transcript_id}/{subtitle_format}:
    get:
      tags:
        - transcript
      summary: Get subtitles for transcript
      description: >
        <Note>To retrieve your transcriptions on our EU server, replace
        `api.assemblyai.com` with `api.eu.assemblyai.com`.</Note>

        Export your transcript in SRT or VTT format to use with a video player
        for subtitles and closed captions.
      operationId: getSubtitles
      parameters:
        - name: transcript_id
          x-label: Transcript ID
          in: path
          description: ID of the transcript
          required: true
          schema:
            type: string
        - name: subtitle_format
          x-label: Subtitle format
          in: path
          description: The format of the captions
          required: true
          schema:
            $ref: '#/components/schemas/SubtitleFormat'
        - name: chars_per_caption
          x-label: Number of characters per caption
          in: query
          description: The maximum number of characters per caption
          schema:
            type: integer
      responses:
        '200':
          description: The exported captions as text
          content:
            text/plain:
              schema:
                type: string
                example: >
                  WEBVTT

                  00:12.340 --> 00:16.220

                  Last year I showed these two slides said that demonstrate

                  00:16.200 --> 00:20.040

                  that the Arctic ice cap which for most of the last 3,000,000
                  years has been the

                  00:20.020 --> 00:25.040

                  size of the lower 48 States has shrunk by 40% but this
                  understates
              examples:
                srt:
                  $ref: '#/components/examples/SrtSubtitlesResponse'
                vtt:
                  $ref: '#/components/examples/VttSubtitlesResponse'
            text/html:
              schema:
                type: string
                example: >
                  WEBVTT

                  00:12.340 --> 00:16.220

                  Last year I showed these two slides said that demonstrate

                  00:16.200 --> 00:20.040

                  that the Arctic ice cap which for most of the last 3,000,000
                  years has been the

                  00:20.020 --> 00:25.040

                  size of the lower 48 States has shrunk by 40% but this
                  understates
              examples:
                srt:
                  $ref: '#/components/examples/SrtSubtitlesResponse'
                vtt:
                  $ref: '#/components/examples/VttSubtitlesResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          x-label: Not found
          description: >
            Returned when `subtitle_format` is not `srt` or `vtt`. The response
            body is a plain HTML 404 page — the literal string `404: Not Found`
            — not JSON. Unknown `transcript_id` lookups, by contrast, return a
            `400` with a JSON `Error` object.
          content:
            text/html:
              schema:
                type: string
              example: '404: Not Found'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
components:
  schemas:
    SubtitleFormat:
      x-label: Subtitle format
      description: Format of the subtitles
      x-fern-sdk-group-name: transcripts
      type: string
      enum:
        - srt
        - vtt
      x-aai-enum:
        srt:
          label: SRT
        vtt:
          label: VTT
    Error:
      x-label: Error
      type: object
      additionalProperties: true
      required:
        - error
      properties:
        error:
          x-label: Error message
          description: Error message
          type: string
        status:
          x-label: Status
          type: string
          const: error
      example:
        error: Transcript creation error, audio_url not found
  examples:
    SrtSubtitlesResponse:
      value: |
        1
        00:00:13,160 --> 00:00:16,694
        Last year I showed these two slides that demonstrate that the Arctic

        2
        00:00:16,734 --> 00:00:20,214
        ice cap, which for most of the last 3 million years has been the size

        3
        00:00:20,254 --> 00:00:23,274
        of the lower 48 states, has shrunk by 40%.
    VttSubtitlesResponse:
      value: >
        WEBVTT

        00:12.340 --> 00:16.220

        Last year I showed these two slides said that demonstrate

        00:16.200 --> 00:20.040

        that the Arctic ice cap which for most of the last 3,000,000 years has
        been the

        00:20.020 --> 00:25.040

        size of the lower 48 States has shrunk by 40% but this understates
  responses:
    BadRequest:
      x-label: Bad request
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: This is a sample error message
    Unauthorized:
      x-label: Unauthorized
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Authentication error, API token missing/invalid
    TooManyRequests:
      x-label: Too many requests
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Too Many Requests
      headers:
        Retry-After:
          description: The number of seconds to wait before retrying the request
          schema:
            type: integer
    InternalServerError:
      x-label: Internal server error
      description: An error occurred while processing the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: >-
              Internal server error. Please retry your request. If the error
              persists, please contact support@assemblyai.com for more
              information.
    ServiceUnavailable:
      x-label: Service unavailable
      description: Service unavailable
    GatewayTimeout:
      x-label: Gateway timeout
      description: Gateway timeout
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````