Deepgram API
Fast, accurate speech-to-text (and text-to-speech) API for audio.
What it does
Deepgram is a speech-to-text API (with text-to-speech and audio intelligence add-ons) built for speed and scale. It transcribes pre-recorded files by URL or upload and does real-time streaming over WebSocket, with punctuation, diarization, language detection, summarisation and topic detection.
Base URL
Authentication
Sign up at console.deepgram.com — new accounts get a sizeable one-off free credit (around $200). Create an API key and send it as Authorization: Token YOUR_KEY (the scheme word is Token, not Bearer).
Code examples
curl -X POST "https://api.deepgram.com/v1/listen?model=nova-3&smart_format=true" \
-H "Authorization: Token $DEEPGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://dpgr.am/spacewalk.wav"}'import requests
r = requests.post(
"https://api.deepgram.com/v1/listen",
headers={"Authorization": f"Token {KEY}"},
params={"model": "nova-3", "smart_format": "true"},
json={"url": "https://dpgr.am/spacewalk.wav"},
timeout=60)
alt = r.json()["results"]["channels"][0]["alternatives"][0]
print(alt["transcript"])Rate limits & quotas
Pay-as-you-go accounts get generous concurrency — on the order of 100 concurrent pre-recorded requests and 50 live streams — and there is no hard monthly cap beyond your balance. Pricing is per minute of audio and varies by model. Over the concurrency limit returns HTTP 429.
Key response fields
| results.channels[0].alternatives[0].transcript | The full transcript text |
| results.channels[0].alternatives[0].confidence | 0–1 overall confidence |
| results.channels[0].alternatives[0].words[] | Per-word timestamps and confidence |
| metadata.duration | Length of audio processed, seconds |
| results.utterances[] | Speaker-segmented chunks when diarize=true |
Common errors
| 401 | Missing or wrong key, or wrong scheme (Token not Bearer). |
| 400 | Unreadable audio, unsupported codec or bad url. |
| 402 | Free credit exhausted and no payment method on file. |
| 429 | Concurrency limit exceeded — queue your requests. |
When to use it (and alternatives)
Best for high-volume or real-time transcription where latency and cost per minute matter. AssemblyAI is the main alternative with a stronger audio-intelligence suite; OpenAI’s Whisper (in its API) is simple for one-off files.
FAQ
Is Deepgram free?
New accounts get a large one-time credit (about $200) with no card required. After that it is pay-as-you-go per minute of audio; there is no recurring free tier.
Does it do real-time transcription?
Yes — open a WebSocket to wss://api.deepgram.com/v1/listen, stream raw audio frames, and receive interim and final transcripts as JSON messages.
Which model should I use?
The Nova family is the default for accuracy and speed across most languages. Older base/enhanced tiers are cheaper but less accurate.
New to APIs?
Short guides for working with this API — and any other.
🛠️ Handy LarzOS tools
Free tools to help you work with this API.
Prompt ImproverLearn Prompt Engineering