Errors and Failed Transcripts

    Errors hitting the API

    The API will always return a JSON response when there is an error.

    Invalid API Token

    API requests made with an invalid API token will always return with a status code 401:

    {"error": "Authentication error, API token missing/invalid"}

    Invalid API Request

    When something is wrong with your API request, the API will return with a status code 400:

    {"error": "`format_text` must be a Boolean"}

    The error key will always contain more information about what was wrong with your request.

    Server Errors

    When something is wrong on our side, the API will return with a status code 500:

    {"error": "Server error, developers have been alerted."}

    Failed transcription jobs

    A transcription job fails because something was wrong with your audio file, or because of an error on our side. Whenever a transcription job fails, the status of the transcription will go to "error", and there will be an "error" key in the JSON response from the API when fetching the transcription with a GET request. The "error" key will describe the error in more detail. For example:

    {
        # !! the status is shown as error here
        "status": "error",
        # !! the error is described in detail here 
        "error": "Download error to https://foo.bar, 403 Client Error: Forbidden for url: https://foo.bar",
        "format_text": true,
        "id": "ozfv3zim7-9725-4b54-9b71-f527bc21e5ab",
        "language_model": "assemblyai_default",
        "punctuate": true,
        "acoustic_model": "assemblyai_default",
        "audio_duration": null,
        "audio_url": "https://s3-us-west-2.amazonaws.com/blog.assemblyai.com/audio/8-7-2018-post/7510.mp33",
        "confidence": null,
        "dual_channel": null,
        "text": null,
        "utterances": null,
        "webhook_status_code": null,
        "webhook_url": null,
        "words": null
    }

    Transcripts usually fail because of one of the following reasons:

    When a transcription job fails due to an error on our side, we always recommend resubmitting the file for transcription. When you resubmit the file, usually a different server in our cluster will be able to process your audio file successfully.