> ## Documentation Index
> Fetch the complete documentation index at: https://assembly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get subtitles for transcript

> Export your transcript in SRT or VTT format to use with a video player for subtitles and closed captions.



## 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
security:
  - ApiKey: []
tags:
  - name: transcript
    description: Transcript related operations
    externalDocs:
      url: https://www.assemblyai.com/docs/guides/transcribing-an-audio-file
  - name: LeMUR
    description: LeMUR related operations
    externalDocs:
      url: >-
        https://www.assemblyai.com/docs/guides/processing-audio-with-llms-using-lemur
  - name: streaming
    description: Streaming Speech-to-Text
    externalDocs:
      url: https://www.assemblyai.com/docs/speech-to-text/streaming
paths:
  /v2/transcript/{transcript_id}/{subtitle_format}:
    get:
      tags:
        - transcript
      summary: Get subtitles for transcript
      description: >-
        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'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '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: format_text must be a Boolean
  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
    NotFound:
      x-label: Not found
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
    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
    ServiceUnavailable:
      x-label: Service unavailable
      description: Service unavailable
    GatewayTimeout:
      x-label: Gateway timeout
      description: Gateway timeout
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization

````