Understanding Errors with AssemblyAI
There are primarily two types of errors you might encounter when working with AssemblyAI:- errors that occur when requesting a transcription (immediate HTTP
4xx/5xx, message in theerrorfield of the JSON body) - errors that occur while the transcription is processing (the submit call returns
200, but a laterGET /v2/transcript/{id}showsstatus: errorwith the message in theerrorfield)
Handling Errors with AssemblyAI
Error handling with AssemblyAI’s SDKs (Recommended)
When using any of our SDKs, both types of errors are surfaced via the error key in a transcript object. For example in Python:Error handling with HTTPS requests
For errors when making a request for a transcription, you will have to check the status code that we respond with. For errors that occur during the transcription process, you will need to access the “error” key in the JSON response. For other HTTP errors you can print the information from the response object. Here is an example you can use:Common errors when making a request for a transcription
Unless otherwise noted, these errors are returned fromPOST /v2/transcript with the message in the error field of the JSON body.
Missing audio_url
audio_url field.
- Solution: Include an
audio_urlfield that points to a publicly accessible audio file or to a URL returned by the Upload endpoint.
Unsupported language code
language_code value you submitted isn’t recognized.
- Solution: Check the Supported Languages & Features page and submit a supported language code. You can also enable Automatic Language Detection instead of setting
language_codemanually.
Invalid speech_models value
speech_models parameter must be a non-empty list of supported model names.
Accounts on a feature flag for dated
universal-3-pro variants may see additional model names in the list.- Solution: Pass a non-empty list, for example
["universal-3-pro", "universal-2"]. See Select the speech model for guidance.
Deprecated speech_model (singular) parameter on async /v2/transcript
speech_model field no longer selects a model. Submitting a current model name (universal-2, universal-3-pro, slam-1, conformer-2) returns this 400 deprecation. Submitting a legacy value (best, nano, universal) returns 200, but the value is silently ignored and the job runs the default model (currently universal-2). Only the plural speech_models field actually selects a model on async.
Newer accounts may receive a slightly different deprecation message, but it points to the same fix.
- Solution: On async, replace
speech_model: "<name>"withspeech_models: ["<name>"]. See Select the speech model.
language_detection conflicts with language_code
language_detection: true and a specific language_code in the same request.
The plural
language_codes field returns a different (similarly worded) message.- Solution: Either remove
language_codeand let Automatic Language Detection pick the language, or removelanguage_detectionand keeplanguage_code.
Wrong-type validation (Boolean, etc.)
- Solution: Send the parameter with the correct JSON type (
true/falsefor Booleans, an integer for integer fields, a string for string fields, etc.).
Invalid webhook_url
webhook_url field must be a valid URL beginning with http:// or https://.
- Solution: Submit a fully-qualified webhook URL. See Webhooks for details.
Missing redact_pii_policies
redact_pii_policies is missing.
This only applies to accounts created after
redact_pii_policies became required. Older accounts auto-fill defaults and do not error.- Solution: Provide an explicit list of policies, for example
"redact_pii_policies": ["person_name", "phone_number"]. See Redact PII for the full list of supported policy names.
Unsupported policy name in redact_pii_policies
redact_pii_policies isn’t a recognized policy.
- Solution: Use only policies from the list in the error message and in the Redact PII docs.
Invalid redact_pii_audio_quality
redact_pii_audio_quality only accepts "mp3" or "wav".
- Solution: Set
redact_pii_audio_qualityto"mp3"or"wav".
Malformed JSON body
- Solution: Verify the body is valid JSON, the
Content-Type: application/jsonheader is set, and that no stray trailing commas, comments, or unescaped characters are present.
Models are not supported for a particular language
language_code explicitly and enable a feature that isn’t supported for that language. The API validates feature compatibility upfront and rejects the request.
This error only applies when using
language_code. If you use Automatic Language Detection instead, the request will complete successfully, but any unsupported features will be silently omitted from the response. See Unsupported feature behavior for more details.- Solution: Check the Supported Languages & Features page to verify which features are available for your language before submitting a request.
Insufficient Funds
- Auto-pay: Enable auto-pay in your account settings to automatically add funds when your balance runs low.
- Check Funds: Regularly check your account balance to ensure you have sufficient funds for your transcription requests.
- Add Funds: If needed, add funds to your account to continue using our services without interruption.
Invalid API Token
- Double-check that the API token you’re using matches exactly with the token shown in your dashboard. Even a small typo can lead to authentication errors.
Transcript ID not found
- Verify the endpoint and method that you are using: Check that you are making a
POSTrequest tohttp://api.assemblyai.com/v2/transcriptor aGETrequest tohttp://api.assemblyai.com/v2/transcript/{transcript_id}and nothttp://api.assemblyai.com/v2/transcript/ - Token Verification: Double-check that the API token you’re using matches exactly with the token used to make the original request.
- If you’re using Postman, ensure that
Encode URL automaticallyunder Settings is disabled.
Server Errors
- Retries: Implement retries in your code for when our server returns a 500 code response. See Implement Retry Server Error Logic for a worked example.
- Automatic Retries: Enable automatic retries for your transcription jobs under Account > Settings on your dashboard. This ensures that if a job fails due to a temporary server issue, it will automatically be retried.
- Check our Status page to verify that we are not currently undergoing an incident
- Reach out to Support: Remember to provide the transcript ID, audio file used, and parameters used in your request or the full JSON response in your message. You can also email support@assemblyai.com for help!
Errors on export, sub-resource, and upload endpoints
Requesting captions, sentences, or paragraphs before the transcript completes
status: completed. On the /sentences and /paragraphs endpoints the word captions in the message is replaced with sentences or paragraphs respectively.
- Solution: Poll
GET /v2/transcript/{id}(or use a webhook) and only request captions/sentences/paragraphs oncestatusiscompleted.
word-search called without words
/word-search endpoint requires the words query parameter.
- Solution: Pass a comma-separated list of search terms, for example
?words=foo,bar. See the Word Search reference.
Redacted audio not available
- Solution: Resubmit the audio with
redact_pii: trueandredact_pii_audio: true. Setredact_pii_policiesand (optionally)redact_pii_audio_qualityto control what is redacted and the output format.
Invalid subtitle format
srt or vtt), the API returns an HTML 404 page. The response body is the literal string 404: Not Found — not JSON.
- Solution: Use
srtorvtt. See Export SRT/VTT subtitles.
Empty upload body
/v2/upload returns a 422. The response body is plain text, not JSON.
- Solution: Stream the file bytes as the request body. See the Upload endpoint reference.
Out-of-range limit when listing transcripts
limit query parameter on GET /v2/transcript must be >= 1.
- Solution: Send a positive integer for
limit. See List transcripts.
Common transcription processing errors
These errors come back fromGET /v2/transcript/{id} after the submit call returned 200. The transcript has status: error and the message is in the error field.
Audio File URL Errors
Attempting to transcribe webpages or non-audio URLs
- Solution: Confirm the URL serves a supported audio or video format. If the format is supported and you still see this error, contact support@assemblyai.com.
No audio stream in the file
- Solution: Verify the file actually contains audio (for example with
ffprobe). Re-encode or replace the file before resubmitting.
File exceeds the 5.5 GB maximum
Content-Length header before download, so this error fires almost immediately.
- Solution: Split the file into smaller chunks (e.g. with
ffmpeg) or downsample/transcode before submitting. See Are there any limits on file size or file duration?.
URL returns an empty body
- Solution: Confirm the file is actually present at the URL and the server returns a non-zero
Content-Length. Re-upload the file if necessary.
Uploaded file not found / region mismatch
POST /v2/upload could not be resolved. This usually means the upload has been garbage-collected, or the upload was made to one region (e.g. US) and the transcript was submitted in another region (e.g. EU).
- Solution: Re-upload the file and submit the transcript using the same regional base URL. See Do you offer servers in the EU? for the per-region endpoints.
Attempting to transcribe audio files that are not accessible
- Public Access: Verify that the audio file URL is publicly accessible. Our servers cannot transcribe audio from private or restricted URLs.
- Google Drive URLs: For audio stored on Google Drive, consult our Google Drive Transcription Cookbook to correctly format your URLs for access.
- Direct Upload: Utilize the AssemblyAI Upload endpoint to upload files directly from your device, eliminating the need for a public URL.
- AWS S3 Pre-signed URLs: This Cookbook shows you how to use pre-signed URLs for AWS S3 storage to provide secure, temporary access for transcription without making your files public.
Time-limited URLs (presigned URLs, CDN tokens, etc.) must be fresh when you submit them. URLs from services like AWS S3 presigned URLs, Azure Blob Storage SAS tokens, GCP signed URLs, and social media CDNs (e.g., TikTok, Instagram) expire after a set duration. If the URL expires before AssemblyAI downloads the file, the origin server returns a
403 or 404 and you will see this download error.To avoid this:- Generate the time-limited URL immediately before submitting your transcription request — do not cache or store URLs for later use.
- Ensure the URL expiration window is long enough for the file to be downloaded (at least a few minutes).
- If you cannot control the URL lifetime, use the Upload endpoint to upload the file directly to AssemblyAI instead.
Audio File Errors
Attempting to transcribe audio files that are too short
- Add error handling for this error message: When this error occurs, handle it safely by checking the error string and returning the error.
- Add pre-submit checks for the duration of the audio file: Prior to submitting a file for transcription, check the duration using a tool like soxi (part of the SoX package):
soxi -D audio.mp3
Language Detection Errors
No spoken audio detected
- Solution: Disable
language_detectionand setlanguage_codeexplicitly for files where speech may be absent, or skip transcription for files that are known to be non-speech.
Detected language confidence below the threshold
language_detection is enabled and the detected language’s confidence is below the language_confidence_threshold you set. Erroring is the default behavior when the threshold isn’t met.
- Solution: Set
language_detection_options.on_low_language_confidencetofallbackto fall back to a language you specify instead of erroring. Alternatively, lower thelanguage_confidence_threshold. See Automatic Language Detection for details.