Exporting a transcript in SRT or VTT format

    You can easily export your transcription in SRT or VTT format, to be plugged into a video player for subtitles and closed captions.

    Pro tip: If you haven't gone through the Quickstart yet, do that here and then come back to this guide!

    Check the status of your transcription

    Normally when you want to get the transcription result, you'll make a GET request (as shown below) to query the API for your transcription text, confidence score, status, etc.

    This endpoint will return a JSON response like this:

    {
        "acoustic_model": "assemblyai_default",
        "audio_duration": 12.0960090702948,
        "audio_url": "https://s3-us-west-2.amazonaws.com/blog.assemblyai.com/audio/8-7-2018-post/7510.mp3",
        "id": "5551722-f677-48a6-9287-39c0aafd9ac1",
        "status": "completed",
        "text": "You know Demons on TV like that and and for people to expose themselves to being rejected on TV or humiliated by fear factor or.",
        "words": [
            ...
        ]
        ...
    }

    Export transcript in a caption format

    Once your transcript status shows as "completed", you can make a GET request to the following endpoints to export your transcript in VTT or SRT format:

    https://api.assemblyai.com/v2/transcript/<your transcript id>/vtt
    https://api.assemblyai.com/v2/transcript/<your transcript id>/srt

    Export as VTT

    For example, to export as VTT, you can make the following GET request:

    And the API will output a plain-text response like this:

    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
    
    ...

    Export as SRT

    For example, to export as SRT, you can make the following GET request:

    And the API will output a plain-text response like this:

    1
    00:00:12,340 --> 00:00:16,380
    Last year I showed these two slides said that demonstrate that
    
    2
    00:00:16,340 --> 00:00:19,920
    the Arctic ice cap which for most of the last 3,000,000 years has been
    
    3
    00:00:19,880 --> 00:00:23,120
    the size of the lower 48 States has shrunk by 40%
    
    ...

    Have any questions? Contact us using the "Get help" button in the top right corner!

    Customize caption lengths

    To control the maximum number of characters per caption, you can use the chars_per_caption URL parameter in your API requests to this endpoint. For example:

    https://api.assemblyai.com/v2/transcript/<your transcript id>/srt?chars_per_caption=32

    In the above example, the API will make sure each caption has no more than 32 characters.