| name | deepgram-rate-limits |
| description | Implement Deepgram rate limiting and backoff strategies.
Use when handling API quotas, implementing request throttling,
or dealing with 429 rate limit errors.
Trigger: "deepgram rate limit", "deepgram throttling", "429 error deepgram",
"deepgram quota", "deepgram backoff", "deepgram concurrency".
|
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","deepgram","api","rate-limiting"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Deepgram Rate Limits
Overview
Implement rate limiting, exponential backoff, and circuit breaker patterns for Deepgram API. Deepgram limits by concurrent connections (not requests per second). Understanding this model is key to building reliable integrations.
Deepgram Rate Limit Model
Deepgram uses concurrency-based limits, not traditional requests-per-minute:
| Plan | Concurrent Requests (STT) | Concurrent Connections (Live) | Concurrent Requests (TTS) |
|---|
| Pay As You Go | 100 | 100 | 100 |
| Growth | 200 | 200 | 200 |
| Enterprise | Custom | Custom | Custom |
When you exceed your concurrency limit, Deepgram returns 429 Too Many Requests.
Key insight: You can send unlimited total requests — just not more than your concurrency limit simultaneously.
Instructions
Step 1: Concurrency-Aware Queue
import pLimit from 'p-limit';
import { createClient } from '@deepgram/sdk';
class DeepgramRateLimiter {
private limit: ReturnType<typeof pLimit>;
private client: ReturnType<typeof createClient>;
private stats = { total: 0, active: 0, queued: 0, errors: 0 };
constructor(apiKey: , maxConcurrent = ) {
. = (maxConcurrent);
. = (apiKey);
}
() {
..++;
.( () => {
..--;
..++;
..++;
{
{ result, error } = ....(
source, options
);
(error) {
..++;
error;
}
result;
} (err) {
..++;
err;
} {
..--;
}
});
}
() { { .... }; }
}
limiter = (process..!, );
urls = [, , ];
results = .(
urls.( limiter.({ url }, { : , : }))
);