Overview
This page describes how to perform common operations with the REST API. Each endpoint is documented individually and grouped by the resource it interacts with, such as Transcripts and LeMUR.
The AssemblyAI API uses REST with JSON-encoded request bodies and responses, and is available at the following URL:
Streaming Speech-to-Text
This page explains the AssemblyAI REST API. If you want to use Streaming Speech-to-Text, see Streaming API reference.
Client SDKs
AssemblyAI provides official SDKs for popular programming languages, that make it simpler to interact with the API.
To get started using the SDKs, see the following resources:
Authorization
To make authorized calls the REST API, your app must provide an authorization header with an API key. You can find your API key in the AssemblyAI dashboard.
Your API key
The examples here contain a placeholder, <YOUR_API_KEY>
, that you need to replace with your actual API key.
Errors
The AssemblyAI API uses HTTP response codes to indicate whether a request was successful.
The response codes generally fall into the following ranges:
2xx
indicates the request was successful.4xx
indicates the request may have omitted a required parameter, or have invalid information.5xx
indicates an error on AssemblyAI’s end.
Below is a summary of the HTTP response codes you may encounter:
API status
To stay up-to-date with any known service disruptions, subscribe to updates on the Status page.
Failed transcriptions
Transcriptions may fail due to errors while processing the audio data.
When you query a transcription that has failed, the response will have a 200
code, along with status
set to error
and an error
property with more details.
Common reasons why a transcription may fail include:
- Audio data is corrupted or in an unsupported format. See FAQ for supported formats.
- Audio URL is a webpage rather than a file. Only the AssemblyAI Playground supports retrieving videos directly from YouTube links.
- Audio URL isn’t accessible from AssemblyAI’s servers.
- Audio duration is too short (less than 160ms).
In the rare event of a transcription failure due to a server error, you may resubmit the file for transcription. If the problems persist after resubmitting, let us know.
Rate limits
To ensure the LeMUR API remains available for all users, you can only make a limited number of requests within a 60-second time window. Only LeMUR requests are rate limited.
If you exceed the limit, the API will respond with a 429
status code.
To see your remaining quota, check the following response headers:
If the response doesn’t include X-RateLimit
headers, the endpoint doesn’t have rate limits.
Increasing rate limits
If you want to increase the rate limit for your account, contact us.
Pagination
Endpoints that support listing multiple resources use pagination to limit the number of results returned in a single response.
Paginated responses include a page_details
JSON object with information about the results and links to navigate between pages.
Versioning
When AssemblyAI makes backwards-incompatible changes to the API, we release a new version. For information on API updates, see Changelog.
Endpoints are versioned using a path prefix, such as /v2
.