API Directory › 🤖 AI & Machine Learning › Deepgram
API KeyHTTPSCORS

Deepgram API

Fast, accurate speech-to-text (and text-to-speech) API for audio.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open Deepgram docs ↗

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

https://api.deepgram.com/v1

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
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"}'
Python
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].transcriptThe full transcript text
results.channels[0].alternatives[0].confidence0–1 overall confidence
results.channels[0].alternatives[0].words[]Per-word timestamps and confidence
metadata.durationLength of audio processed, seconds
results.utterances[]Speaker-segmented chunks when diarize=true

Common errors

401Missing or wrong key, or wrong scheme (Token not Bearer).
400Unreadable audio, unsupported codec or bad url.
402Free credit exhausted and no payment method on file.
429Concurrency 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

Related AI & Machine Learning APIs

← Back

More AI & Machine Learning APIs · All 196 APIs