Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implement ElevenLabs rate limiting, concurrency queuing, and backoff patterns. Use when handling 429 errors, implementing retry logic, or managing concurrent TTS request throughput for an ElevenLabs integration. Trigger with "elevenlabs rate limit", "elevenlabs throttling", "elevenlabs 429", "elevenlabs retry", "elevenlabs backoff", "elevenlabs concurrent requests".
.claude/skills/jeremylongshore-elevenlabs-rate-limits/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 63% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 163% | 0% |
Handle ElevenLabs rate limits with plan-aware concurrency queuing, exponential backoff, and quota monitoring. ElevenLabs uses two rate limit mechanisms: concurrent request limits (per plan) and system-level throttling. The key insight is that a 429 means two different things depending on its detail.status — and each demands the opposite response.
@elevenlabs/elevenlabs-js)p-queue package (recommended): npm install p-queueElevenLabs returns HTTP 429 for two different reasons. Read the detail.status field to tell them apart — the correct strategy is opposite for each.
| 429 Variant | Response Body | Cause | Strategy | |-------------|--------------|-------|----------| | too_many_concurrent_requests | {"detail":{"status":"too_many_concurrent_requests"}} | Exceeded plan concurrency | Queue requests, don't backoff | | system_busy | {"detail":{"status":"system_busy"}} | Server overload | Exponential backoff |
Concurrency is capped per plan. Size your queue to this number — never higher.
| Plan | Max Concurrent Requests | Characters/Month | |------|------------------------|-------------------| | Free | 2 | 10,000 | | Starter | 3 | 30,000 | | Creator | 5 | 100,000 | | Pro | 10 | 500,000 | | Scale | 15 | 2,000,000 | | Business | 15 | Custom |
Write four small modules and compose them. The full, copy-ready source for each is in references/implementation.md — the skeleton below shows how they fit together.
rate-limiter.ts) — a p-queue sized to your plan's concurrency limit. This is the response to too_many_concurrent_requests: queue, do not back off.backoff.ts) — exponential backoff with jitter for system_busy and 5xx; immediate short retry for concurrency; hard-fail on 401/400/404.quota-monitor.ts) — polls user.subscription character usage, warns at a threshold, and blocks a request that would overrun remaining quota.resilient-client.ts) — composes all three so one generateSpeech() call guards quota, queues, and backs off automatically:typescript// src/elevenlabs/resilient-client.ts (skeleton — full source in references/implementation.md) export function createResilientClient(plan = "pro") { const client = new ElevenLabsClient({ maxRetries: 0 }); // we handle retries const queue = createRequestQueue(plan); // Step 3.1 const quota = new QuotaMonitor(client); // Step 3.3 return { async generateSpeech(voiceId, text, modelId = "eleven_multilingual_v2") { await quota.guardRequest(text.length); // Step 3.3 return queue.add(() => // Step 3.1 withBackoff(() => // Step 3.2 client.textToSpeech.convert(voiceId, { text, model_id: modelId }) ) ); }, }; }
Quota is spent in credits-per-character, which varies by model. Use Flash/Turbo models during development to conserve quota.
| Model | Credits per Character | 10,000 Chars Cost | |-------|-----------------------|-------------------| | eleven_v3 | 1.0 | 10,000 credits | | eleven_multilingual_v2 | 1.0 | 10,000 credits | | eleven_flash_v2_5 | 0.5 | 5,000 credits | | eleven_turbo_v2_5 | 0.5 | 5,000 credits |
Applying this skill produces four TypeScript modules under src/elevenlabs/ and a rate-limited request path:
rate-limiter.ts — exports createRequestQueue(plan) returning a plan-sized PQueue.backoff.ts — exports withBackoff(operation, config) returning the operation's result or throwing after maxRetries.quota-monitor.ts — exports a QuotaMonitor class with check() → { used, limit, remaining, pctUsed, warning } and guardRequest(textLength).resilient-client.ts — exports createResilientClient(plan) whose generateSpeech() returns TTS audio, plus getQueueStats() and checkQuota().At runtime: concurrent requests stay at or below the plan cap, system_busy responses are retried with backoff, and requests that would overrun quota fail fast with a clear error instead of a wasted API call.
| Scenario | Detection | Response | |----------|-----------|----------| | Concurrent limit hit | 429 + too_many_concurrent_requests | Queue; retry after ~50ms per queued request | | System busy | 429 + system_busy | Exponential backoff (1s, 2s, 4s, 8s...) | | Quota exhausted | 401 + quota_exceeded | Stop requests; alert; wait for reset | | Server error | 500-599 | Exponential backoff; max 5 retries |
Concise starting point — batch generation with just the queue:
typescriptimport { createRequestQueue } from "./elevenlabs/rate-limiter"; const queue = createRequestQueue("pro"); // 10 concurrent const clips = await Promise.all( texts.map(text => queue.add(() => client.textToSpeech.convert(voiceId, { text, model_id: "eleven_flash_v2_5" })) ) ); // 20 requests, at most 10 in flight
For the full resilient-client example, per-429-variant branching at the call site, and the batch pattern in context, see references/examples.md.
For security configuration, see elevenlabs-security-basics.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 46,679 | 31,430 | -33% | 1 | 1 | 0% | 7,806 | 6,904 | -12% | 0 | 0 | — |
case-02 | fail→pass | 40,460 | 23,090 | -43% | 1 | 1 | 0% | 6,200 | 7,013 | +13% | 0 | 0 | — |
case-03 | fail→pass | 40,663 | 30,558 | -25% | 1 | 1 | 0% | 8,295 | 9,171 | +11% | 0 | 0 | — |
case-04 | pass→pass | 14,675 | 13,926 | -5% | 1 | 1 | 0% | 2,354 | 3,891 | +65% | 0 | 0 | — |
case-05 | pass→pass | 17,416 | 21,191 | +22% | 1 | 1 | 0% | 3,533 | 6,114 | +73% | 0 | 0 | — |
case-06 | pass→pass | 10,803 | 10,840 | +0% | 1 | 1 | 0% | 2,348 | 3,961 | +69% | 0 | 0 | — |
case-07 | fail→pass | 10,170 | 5,370 | -47% | 1 | 1 | 0% | 1,682 | 2,675 | +59% | 0 | 0 | — |
case-08 | fail→pass | 11,564 | 4,418 | -62% | 1 | 1 | 0% | 1,573 | 2,558 | +63% | 0 | 0 | — |
case-09 | fail→pass | 5,141 | 3,216 | -37% | 1 | 1 | 0% | 854 | 2,248 | +163% | 0 | 0 | — |
case-10 | fail→pass | 12,055 | 5,783 | -52% | 1 | 1 | 0% | 2,043 | 2,527 | +24% | 0 | 0 | — |
case-11 | fail→pass | 16,493 | 9,945 | -40% | 1 | 1 | 0% | 2,869 | 3,681 | +28% | 0 | 0 | — |
case-12 | pass→pass | 13,060 | 5,625 | -57% | 1 | 1 | 0% | 2,008 | 2,758 | +37% | 0 | 0 | — |
case-13 | pass→pass | 22,801 | 13,905 | -39% | 1 | 1 | 0% | 3,396 | 3,897 | +15% | 0 | 0 | — |
case-14 | pass→pass | 22,014 | 10,821 | -51% | 1 | 1 | 0% | 2,305 | 3,371 | +46% | 0 | 0 | — |
case-15 | fail→pass | 19,330 | 8,529 | -56% | 1 | 1 | 0% | 2,955 | 3,105 | +5% | 0 | 0 | — |
case-16 | fail→pass | 19,071 | 11,558 | -39% | 1 | 1 | 0% | 3,575 | 3,993 | +12% | 0 | 0 | — |
case-17 | fail→pass | 21,331 | 7,834 | -63% | 1 | 1 | 0% | 3,014 | 3,253 | +8% | 0 | 0 | — |
case-18 | pass→pass | 14,494 | 8,376 | -42% | 1 | 1 | 0% | 2,027 | 2,817 | +39% | 0 | 0 | — |
case-19 | pass→pass | 17,462 | 15,057 | -14% | 1 | 1 | 0% | 2,991 | 4,103 | +37% | 0 | 0 | — |
case-20 | pass→pass | 12,239 | 6,998 | -43% | 1 | 1 | 0% | 1,965 | 2,933 | +49% | 0 | 0 | — |
case-21 | pass→pass | 12,106 | 5,388 | -55% | 1 | 1 | 0% | 1,835 | 2,603 | +42% | 0 | 0 | — |
case-22 | pass→pass | 13,308 | 8,785 | -34% | 1 | 1 | 0% | 1,903 | 3,056 | +61% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.