ElevenLabs Debug Bundle
Overview
Collect all diagnostic information needed for ElevenLabs support tickets. Gathers SDK version, API connectivity, quota status, voice inventory, and model availability while redacting all secrets.
Prerequisites
- ElevenLabs SDK installed
- API key configured (to test connectivity)
- Access to application logs
Instructions
Step 1: Create Debug Bundle Script
#!/bin/bash
# elevenlabs-debug-bundle.sh
set -euo pipefail
BUNDLE_DIR="elevenlabs-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"
echo "=== ElevenLabs Debug Bundle ===" > "$BUNDLE_DIR/summary.txt"
echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"
# --- Environment ---
echo "--- Runtime Environment ---" >> "$BUNDLE_DIR/summary.txt"
node --version 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "Node.js: not found" >> "$BUNDLE_DIR/summary.txt"
python3 --version 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "Python: not found" >> "$BUNDLE_DIR/summary.txt"
echo "OS: $(uname -s) $(uname -r)" >> "$BUNDLE_DIR/summary.txt"
echo "API Key: ${ELEVENLABS_API_KEY:+SET (${#ELEVENLABS_API_KEY} chars)}" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"
# --- SDK Versions ---
echo "--- SDK Versions ---" >> "$BUNDLE_DIR/summary.txt"
npm list @elevenlabs/elevenlabs-js 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "JS SDK: not installed" >> "$BUNDLE_DIR/summary.txt"
pip show elevenlabs 2>/dev/null | grep -E "^(Name|Version)" >> "$BUNDLE_DIR/summary.txt" || echo "Python SDK: not installed" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"
# --- API Connectivity ---
echo "--- API Connectivity ---" >> "$BUNDLE_DIR/summary.txt"
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
https://api.elevenlabs.io/v1/user \
-H "xi-api-key: ${ELEVENLABS_API_KEY:-missing}" 2>/dev/null || echo "FAILED")
echo "GET /v1/user: HTTP $HTTP_CODE" >> "$BUNDLE_DIR/summary.txt"
DNS_CHECK=$(dig +short api.elevenlabs.io 2>/dev/null | head -1 || echo "DNS lookup failed")
echo "DNS api.elevenlabs.io: $DNS_CHECK" >> "$BUNDLE_DIR/summary.txt"
TLS_CHECK=$(echo | openssl s_client -connect api.elevenlabs.io:443 2>/dev/null | grep -c "Verify return code: 0" || echo "0")
echo "TLS valid: $([ "$TLS_CHECK" = "1" ] && echo "yes" || echo "no")" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"
# --- Subscription & Quota ---
if [ "$HTTP_CODE" = "200" ]; then
echo "--- Subscription ---" >> "$BUNDLE_DIR/summary.txt"
curl -s https://api.elevenlabs.io/v1/user \
-H "xi-api-key: ${ELEVENLABS_API_KEY}" | \
jq '{tier: .subscription.tier, character_count: .subscription.character_count, character_limit: .subscription.character_limit, next_reset: .subscription.next_character_count_reset_unix}' \
>> "$BUNDLE_DIR/summary.txt" 2>/dev/null
echo "" >> "$BUNDLE_DIR/summary.txt"
# --- Voice Inventory ---
echo "--- Voice Inventory ---" >> "$BUNDLE_DIR/summary.txt"
curl -s https://api.elevenlabs.io/v1/voices \
-H "xi-api-key: ${ELEVENLABS_API_KEY}" | \
jq '[.voices[] | {name, voice_id, category}]' \
>> "$BUNDLE_DIR/summary.txt" 2>/dev/null
echo "" >> "$BUNDLE_DIR/summary.txt"
# --- Model Availability ---
echo "--- Available Models ---" >> "$BUNDLE_DIR/summary.txt"
curl -s https://api.elevenlabs.io/v1/models \
-H "xi-api-key: ${ELEVENLABS_API_KEY}" | \
jq '[.[] | {model_id, name, can_do_text_to_speech, can_do_voice_conversion}]' \
>> "$BUNDLE_DIR/summary.txt" 2>/dev/null
fi
# --- Configuration (redacted) ---
echo "--- Config (redacted) ---" >> "$BUNDLE_DIR/summary.txt"
if [ -f .env ]; then
sed 's/=.*/=***REDACTED***/' .env >> "$BUNDLE_DIR/config-redacted.txt"
fi
# --- Recent Error Logs ---
echo "--- Recent Errors ---" >> "$BUNDLE_DIR/summary.txt"
grep -ri "elevenlabs\|ElevenLabs\|xi-api-key" *.log 2>/dev/null | \
sed 's/sk_[a-zA-Z0-9]*/sk_***REDACTED***/g' | \
tail -50 >> "$BUNDLE_DIR/errors.txt" 2>/dev/null || echo "No log files found" >> "$BUNDLE_DIR/errors.txt"
# --- Package Bundle ---
tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"
rm -rf "$BUNDLE_DIR"
echo ""
echo "Bundle created: $BUNDLE_DIR.tar.gz"
echo "Review for sensitive data before sharing with support."
Step 2: Programmatic Debug Collection
// src/elevenlabs/debug.ts
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
interface DebugReport {
timestamp: string;
sdk: { package: string; version: string };
connectivity: { status: number; latencyMs: number };
subscription: { tier: string; used: number; limit: number; resetAt: string } | null;
voices: { total: number; cloned: number; premade: number } | null;
models: string[] | null;
errors: string[];
}
export async function collectDebugReport(): Promise<DebugReport> {
const client = new ElevenLabsClient();
const errors: string[] = [];
const report: DebugReport = {
timestamp: new Date().toISOString(),
sdk: { package: "@elevenlabs/elevenlabs-js", version: "unknown" },
connectivity: { status: 0, latencyMs: 0 },
subscription: null,
voices: null,
models: null,
errors,
};
// Test connectivity + get user info
const start = Date.now();
try {
const user = await client.user.get();
report.connectivity = { status: 200, latencyMs: Date.now() - start };
report.subscription = {
tier: user.subscription.tier,
used: user.subscription.character_count,
limit: user.subscription.character_limit,
resetAt: new Date(user.subscription.next_character_count_reset_unix * 1000).toISOString(),
};
} catch (err: any) {
report.connectivity = { status: err.statusCode || 0, latencyMs: Date.now() - start };
errors.push(`Auth: ${err.message}`);
}
// Voice inventory
try {
const { voices } = await client.voices.getAll();
report.voices = {
total: voices.length,
cloned: voices.filter(v => v.category === "cloned").length,
premade: voices.filter(v => v.category === "premade").length,
};
} catch (err: any) {
errors.push(`Voices: ${err.message}`);
}
// Model availability
try {
const models = await client.models.getAll();
report.models = models.map(m => m.model_id);
} catch (err: any) {
errors.push(`Models: ${err.message}`);
}
return report;
}
// Usage
const report = await collectDebugReport();
console.log(JSON.stringify(report, null, 2));
Step 3: Submit to Support
- Run:
bash elevenlabs-debug-bundle.sh (or the programmatic version)
- Review the output for any accidentally included secrets
- Open a ticket at https://help.elevenlabs.io
- Attach the bundle and describe the issue with:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Request IDs from error responses (if available)
Output
elevenlabs-debug-YYYYMMDD-HHMMSS.tar.gz archive containing:
summary.txt — Environment, SDK, connectivity, quota, voices, models
config-redacted.txt — Configuration with secrets masked
errors.txt — Recent error logs with API keys redacted
Sensitive Data Handling
Always redacted automatically:
- API keys (replaced with
***REDACTED***)
- Webhook secrets
- Any value after
= in .env files
Safe to include:
- Error messages and stack traces
- SDK/runtime versions
- Voice IDs and model IDs
- HTTP status codes and latency
Error Handling
| Issue |
Cause |
Solution |
jq: command not found |
jq not installed |
apt install jq or brew install jq |
| HTTP 0 / curl fails |
Network issue |
Check DNS and firewall |
| HTTP 401 |
Bad API key |
Regenerate key at elevenlabs.io |
| Empty voice list |
No voices on account |
Normal for new free accounts |
Resources
Next Steps
For rate limit issues, see elevenlabs-rate-limits. For common errors, see elevenlabs-common-errors.
1---2name: elevenlabs-debug-bundle3description: |4 Collect ElevenLabs debug evidence for support tickets and troubleshooting.5 Use when encountering persistent issues, preparing support tickets,6 or collecting diagnostic information for ElevenLabs problems.7 Trigger: "elevenlabs debug", "elevenlabs support bundle",8 "collect elevenlabs logs", "elevenlabs diagnostic", "elevenlabs support ticket".9allowed-tools: Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Bash(node:*), Grep10version: 1.0.011license: MIT12author: Jeremy Longshore <jeremy@intentsolutions.io>13tags: [saas, voice, ai, elevenlabs, debugging, support]14compatible-with: claude-code15---1617# ElevenLabs Debug Bundle1819## Overview2021Collect all diagnostic information needed for ElevenLabs support tickets. Gathers SDK version, API connectivity, quota status, voice inventory, and model availability while redacting all secrets.2223## Prerequisites2425- ElevenLabs SDK installed26- API key configured (to test connectivity)27- Access to application logs2829## Instructions3031### Step 1: Create Debug Bundle Script3233```bash34#!/bin/bash35# elevenlabs-debug-bundle.sh36set -euo pipefail3738BUNDLE_DIR="elevenlabs-debug-$(date +%Y%m%d-%H%M%S)"39mkdir -p "$BUNDLE_DIR"4041echo "=== ElevenLabs Debug Bundle ===" > "$BUNDLE_DIR/summary.txt"42echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$BUNDLE_DIR/summary.txt"43echo "" >> "$BUNDLE_DIR/summary.txt"4445# --- Environment ---46echo "--- Runtime Environment ---" >> "$BUNDLE_DIR/summary.txt"47node --version 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "Node.js: not found" >> "$BUNDLE_DIR/summary.txt"48python3 --version 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "Python: not found" >> "$BUNDLE_DIR/summary.txt"49echo "OS: $(uname -s) $(uname -r)" >> "$BUNDLE_DIR/summary.txt"50echo "API Key: ${ELEVENLABS_API_KEY:+SET (${#ELEVENLABS_API_KEY} chars)}" >> "$BUNDLE_DIR/summary.txt"51echo "" >> "$BUNDLE_DIR/summary.txt"5253# --- SDK Versions ---54echo "--- SDK Versions ---" >> "$BUNDLE_DIR/summary.txt"55npm list @elevenlabs/elevenlabs-js 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "JS SDK: not installed" >> "$BUNDLE_DIR/summary.txt"56pip show elevenlabs 2>/dev/null | grep -E "^(Name|Version)" >> "$BUNDLE_DIR/summary.txt" || echo "Python SDK: not installed" >> "$BUNDLE_DIR/summary.txt"57echo "" >> "$BUNDLE_DIR/summary.txt"5859# --- API Connectivity ---60echo "--- API Connectivity ---" >> "$BUNDLE_DIR/summary.txt"61HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \62 https://api.elevenlabs.io/v1/user \63 -H "xi-api-key: ${ELEVENLABS_API_KEY:-missing}" 2>/dev/null || echo "FAILED")64echo "GET /v1/user: HTTP $HTTP_CODE" >> "$BUNDLE_DIR/summary.txt"6566DNS_CHECK=$(dig +short api.elevenlabs.io 2>/dev/null | head -1 || echo "DNS lookup failed")67echo "DNS api.elevenlabs.io: $DNS_CHECK" >> "$BUNDLE_DIR/summary.txt"6869TLS_CHECK=$(echo | openssl s_client -connect api.elevenlabs.io:443 2>/dev/null | grep -c "Verify return code: 0" || echo "0")70echo "TLS valid: $([ "$TLS_CHECK" = "1" ] && echo "yes" || echo "no")" >> "$BUNDLE_DIR/summary.txt"71echo "" >> "$BUNDLE_DIR/summary.txt"7273# --- Subscription & Quota ---74if [ "$HTTP_CODE" = "200" ]; then75 echo "--- Subscription ---" >> "$BUNDLE_DIR/summary.txt"76 curl -s https://api.elevenlabs.io/v1/user \77 -H "xi-api-key: ${ELEVENLABS_API_KEY}" | \78 jq '{tier: .subscription.tier, character_count: .subscription.character_count, character_limit: .subscription.character_limit, next_reset: .subscription.next_character_count_reset_unix}' \79 >> "$BUNDLE_DIR/summary.txt" 2>/dev/null80 echo "" >> "$BUNDLE_DIR/summary.txt"8182 # --- Voice Inventory ---83 echo "--- Voice Inventory ---" >> "$BUNDLE_DIR/summary.txt"84 curl -s https://api.elevenlabs.io/v1/voices \85 -H "xi-api-key: ${ELEVENLABS_API_KEY}" | \86 jq '[.voices[] | {name, voice_id, category}]' \87 >> "$BUNDLE_DIR/summary.txt" 2>/dev/null88 echo "" >> "$BUNDLE_DIR/summary.txt"8990 # --- Model Availability ---91 echo "--- Available Models ---" >> "$BUNDLE_DIR/summary.txt"92 curl -s https://api.elevenlabs.io/v1/models \93 -H "xi-api-key: ${ELEVENLABS_API_KEY}" | \94 jq '[.[] | {model_id, name, can_do_text_to_speech, can_do_voice_conversion}]' \95 >> "$BUNDLE_DIR/summary.txt" 2>/dev/null96fi9798# --- Configuration (redacted) ---99echo "--- Config (redacted) ---" >> "$BUNDLE_DIR/summary.txt"100if [ -f .env ]; then101 sed 's/=.*/=***REDACTED***/' .env >> "$BUNDLE_DIR/config-redacted.txt"102fi103104# --- Recent Error Logs ---105echo "--- Recent Errors ---" >> "$BUNDLE_DIR/summary.txt"106grep -ri "elevenlabs\|ElevenLabs\|xi-api-key" *.log 2>/dev/null | \107 sed 's/sk_[a-zA-Z0-9]*/sk_***REDACTED***/g' | \108 tail -50 >> "$BUNDLE_DIR/errors.txt" 2>/dev/null || echo "No log files found" >> "$BUNDLE_DIR/errors.txt"109110# --- Package Bundle ---111tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"112rm -rf "$BUNDLE_DIR"113echo ""114echo "Bundle created: $BUNDLE_DIR.tar.gz"115echo "Review for sensitive data before sharing with support."116```117118### Step 2: Programmatic Debug Collection119120```typescript121// src/elevenlabs/debug.ts122import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";123124interface DebugReport {125 timestamp: string;126 sdk: { package: string; version: string };127 connectivity: { status: number; latencyMs: number };128 subscription: { tier: string; used: number; limit: number; resetAt: string } | null;129 voices: { total: number; cloned: number; premade: number } | null;130 models: string[] | null;131 errors: string[];132}133134export async function collectDebugReport(): Promise<DebugReport> {135 const client = new ElevenLabsClient();136 const errors: string[] = [];137 const report: DebugReport = {138 timestamp: new Date().toISOString(),139 sdk: { package: "@elevenlabs/elevenlabs-js", version: "unknown" },140 connectivity: { status: 0, latencyMs: 0 },141 subscription: null,142 voices: null,143 models: null,144 errors,145 };146147 // Test connectivity + get user info148 const start = Date.now();149 try {150 const user = await client.user.get();151 report.connectivity = { status: 200, latencyMs: Date.now() - start };152 report.subscription = {153 tier: user.subscription.tier,154 used: user.subscription.character_count,155 limit: user.subscription.character_limit,156 resetAt: new Date(user.subscription.next_character_count_reset_unix * 1000).toISOString(),157 };158 } catch (err: any) {159 report.connectivity = { status: err.statusCode || 0, latencyMs: Date.now() - start };160 errors.push(`Auth: ${err.message}`);161 }162163 // Voice inventory164 try {165 const { voices } = await client.voices.getAll();166 report.voices = {167 total: voices.length,168 cloned: voices.filter(v => v.category === "cloned").length,169 premade: voices.filter(v => v.category === "premade").length,170 };171 } catch (err: any) {172 errors.push(`Voices: ${err.message}`);173 }174175 // Model availability176 try {177 const models = await client.models.getAll();178 report.models = models.map(m => m.model_id);179 } catch (err: any) {180 errors.push(`Models: ${err.message}`);181 }182183 return report;184}185186// Usage187const report = await collectDebugReport();188console.log(JSON.stringify(report, null, 2));189```190191### Step 3: Submit to Support1921931. Run: `bash elevenlabs-debug-bundle.sh` (or the programmatic version)1942. Review the output for any accidentally included secrets1953. Open a ticket at https://help.elevenlabs.io1964. Attach the bundle and describe the issue with:197 - What you expected to happen198 - What actually happened199 - Steps to reproduce200 - Request IDs from error responses (if available)201202## Output203204- `elevenlabs-debug-YYYYMMDD-HHMMSS.tar.gz` archive containing:205 - `summary.txt` — Environment, SDK, connectivity, quota, voices, models206 - `config-redacted.txt` — Configuration with secrets masked207 - `errors.txt` — Recent error logs with API keys redacted208209## Sensitive Data Handling210211**Always redacted automatically:**212- API keys (replaced with `***REDACTED***`)213- Webhook secrets214- Any value after `=` in .env files215216**Safe to include:**217- Error messages and stack traces218- SDK/runtime versions219- Voice IDs and model IDs220- HTTP status codes and latency221222## Error Handling223224| Issue | Cause | Solution |225|-------|-------|----------|226| `jq: command not found` | jq not installed | `apt install jq` or `brew install jq` |227| HTTP 0 / curl fails | Network issue | Check DNS and firewall |228| HTTP 401 | Bad API key | Regenerate key at elevenlabs.io |229| Empty voice list | No voices on account | Normal for new free accounts |230231## Resources232233- [ElevenLabs Support](https://help.elevenlabs.io)234- [ElevenLabs Status](https://status.elevenlabs.io)235- [API Error Reference](https://elevenlabs.io/docs/developers/resources/error-messages)236237## Next Steps238239For rate limit issues, see `elevenlabs-rate-limits`. For common errors, see `elevenlabs-common-errors`.240