Deepgram
Add audio transcription and speaker labels with Deepgram.
npx extraorbital add deepgramAudio goes directly to Deepgram. Access tokens last 30 seconds; active streams can exceed remaining credit.
- 01 / Run the commandGet the service
- 02 / Read your .envUse its credentials
- 03 / Connect your appCall the SDK or API
Limits
| Limit | Free · Prototype | Paid |
|---|---|---|
| Models | Transcription and speaker diarization | Deepgram voice APIs |
| Spend | Shared credit, charged from the first request | Shared team credit or budget |
Free allowances are shared across the account. Provider limits still apply on paid plans.
Use it
Get a token immediately before making the request:
const grant = await fetch(process.env.DEEPGRAM_TOKEN_URL, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.DEEPGRAM_REFRESH_TOKEN}` },
});
if (!grant.ok) throw new Error(`Token refused: ${grant.status}`);
const { access_token } = await grant.json();
const response = await fetch(
`${process.env.DEEPGRAM_BASE_URL}/v1/listen?model=nova-3&diarize=true&utterances=true&smart_format=true`,
{
method: "POST",
headers: {
Authorization: `Bearer ${access_token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url: "https://example.com/meeting.wav" }),
},
);
if (!response.ok) throw new Error(`Transcription failed: ${response.status}`);
console.log(await response.json());Tokens last 30 seconds and use Authorization: Bearer. Request a new token before each HTTP request or WebSocket connection. Grants are limited to one per resource every five seconds.
Environment variables
The CLI writes these to .env or an existing .env.local.
| Variable | Purpose |
|---|---|
DEEPGRAM_BASE_URL | Deepgram API origin |
DEEPGRAM_TOKEN_URL | Endpoint that issues temporary access tokens |
DEEPGRAM_REFRESH_TOKEN | Private credential used to request access tokens |
Specifics
Credit and access
Deepgram uses shared credit, including the $5 machine allowance. It has no separate free allocation.
Usage is polled every minute, subject to provider delays, and charged to your shared balance. Token requests return 402 when credit or a budget cap is exhausted. Restore credit or raise the cap, then request a new token; the refresh credential stays the same. Manually suspended resources also require operator approval to resume.
Token issuance pauses when billing or usage reconciliation is unavailable.
Token expiry does not stop an active WebSocket. In-flight work and reporting delays can exceed remaining credit. This is not a strict spending cap.
Deleting the resource permanently revokes its parent key. A credit-related pause is reversible.
Pricing
| Usage | Paid rate |
|---|---|
| Models | Deepgram voice APIs |
| Spend | Deepgram's reported cost |
See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗