Get started
Before we begin, make sure you have an AssemblyAI account and an API key. You can sign up for a free account and get your API key from your dashboard. If you’d prefer to use one of our official SDKs, check our documentation for the full list of available SDKs.The Gladia
documentation
uses cURL commands to demonstrate API usage. In this guide, we will use Python
code snippets to illustrate the same functionality across both APIs. If you
prefer to use cURL, you can find the equivalent commands in the AssemblyAI
API Reference.
Side-by-side code comparison
Below is a side-by-side comparison of a basic snippet to transcribe pre-recorded audio with Gladia and AssemblyAI:- Gladia
- AssemblyAI
Installation and authentication
- Gladia
- AssemblyAI
- Store your API key securely in an environment variable.
- We support the ability to create multiple API keys and projects to help you track and manage seperate environments.
Gladia uses the
x-gladia-key HTTP header for authentication, while
AssemblyAI uses the authorization header.Audio file sources
You can provide either a locally stored audio file or a publicly accessible URL.- Gladia
- AssemblyAI
Basic transcription and polling the transcription status
- Gladia
- AssemblyAI
1
Make a
POST request to the /v2/pre-recorded endpoint.2
Every few seconds, make a
GET request to the /v2/pre-recorded/:transcript_id endpoint until the transcription status is 'done'.Transcription statusNote that our APIs possible values for transcription status are
queued, processing, completed, and error. Check out the AssemblyAI API Reference for the full list of possible transcription status values.
If you’d rather not poll the API, you can use our SDKs which handle polling internally. Alternatively, you can also use webhooks to get notified when your transcript is complete.- Both AssemblyAI and Gladia allow you the option of uploading a local file or specifying a publicly accessible URL.
- There’s no need to specify the audio format to AssemblyAI - it’s auto-detected. AssemblyAI accepts almost every audio/video file type: here is a full list of all our supported file types
- For self-hosted or pre-signed URLs (i.e. S3), see our example in this cookbook.
Adding features
- Gladia
- AssemblyAI
- Make sure to note any differences in parameters or response structure. If using Speaker Diarization, for example:
- Parameters: AssemblyAI uses
speaker_labels, while Gladia usesdiarization. - Response: AssemblyAI uses
transcript.utterances, while Gladia usestranscript.result.transcription.utterances.
- Parameters: AssemblyAI uses
- Make sure to review each API reference for the full list of parameters and response objects.