API authentication patterns, SDK installation scripts, environment variable management, and connection testing for ElevenLabs. Use when setting up ElevenLabs authentication, installing ElevenLabs SDK, configuring API keys, testing ElevenLabs connection, or when user mentions ElevenLabs authentication, xi-api-key, ELEVENLABS_API_KEY, or ElevenLabs setup.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
examples/api-key-rotation/README.mdexamples/edge-runtime/README.mdexamples/multi-environment/README.mdexamples/nextjs-auth/README.mdexamples/python-auth/README.mdscripts/generate-client.shscripts/install-sdk.shscripts/setup-auth.shscripts/test-connection.shscripts/validate-env.shtemplates/api-client-async.py.templatetemplates/api-client-edge.ts.templatetemplates/api-client-fastapi.py.templatetemplates/api-client-nextjs.ts.templatetemplates/api-client.py.templatetemplates/api-client.ts.templateComprehensive authentication setup for ElevenLabs voice AI platform including SDK installation, API key management, environment configuration, and connection testing.
This skill provides:
ElevenLabs uses API key authentication via HTTP headers:
xi-api-key: YOUR_ELEVENLABS_API_KEY
Security Requirements:
All scripts are fully functional and production-ready:
Configures ELEVENLABS_API_KEY in .env file with validation.
bash scripts/setup-auth.sh [api-key]
Tests API connectivity using curl and validates credentials.
bash scripts/test-connection.sh
Installs @elevenlabs/elevenlabs-js (TypeScript) or elevenlabs (Python) SDK.
bash scripts/install-sdk.sh [typescript|python]
Validates .env file has required ELEVENLABS_API_KEY.
bash scripts/validate-env.sh
Generates API client boilerplate from templates.
bash scripts/generate-client.sh [typescript|python] [output-path]
All templates are production-ready and fully implemented:
templates/.env.template - Environment variable template with all required keystemplates/api-client.ts.template - ElevenLabs client with error handlingtemplates/api-client-nextjs.ts.template - Next.js server-side clienttemplates/api-client-edge.ts.template - Edge runtime compatible clienttemplates/api-client.py.template - ElevenLabs client with error handlingtemplates/api-client-async.py.template - Async client with connection poolingtemplates/api-client-fastapi.py.template - FastAPI integration clientAll examples include complete README.md files with step-by-step instructions:
examples/nextjs-auth/README.md - Complete Next.js authentication example
examples/python-auth/README.md - Complete Python authentication example
examples/edge-runtime/README.md - Edge runtime authentication example
examples/multi-environment/README.md - Multi-environment configuration (dev, staging, prod)
examples/api-key-rotation/README.md - API key rotation patterns
Install SDK:
# For TypeScript projects
bash scripts/install-sdk.sh typescript
# For Python projects
bash scripts/install-sdk.sh python
Configure API Key:
# Interactive setup
bash scripts/setup-auth.sh
# Or provide key directly
bash scripts/setup-auth.sh sk_your_api_key_here
Test Connection:
bash scripts/test-connection.sh
Generate Client:
# TypeScript
bash scripts/generate-client.sh typescript src/lib/elevenlabs.ts
# Python
bash scripts/generate-client.sh python src/elevenlabs_client.py
For Next.js projects:
bash scripts/install-sdk.sh typescriptbash scripts/setup-auth.shexamples/nextjs-auth/README.md for integration guidebash scripts/generate-client.sh typescript src/lib/elevenlabs.tsFor Python projects:
bash scripts/install-sdk.sh pythonbash scripts/setup-auth.shexamples/python-auth/README.md for integration guidebash scripts/generate-client.sh python src/elevenlabs_client.pyFor FastAPI projects:
bash scripts/install-sdk.sh pythonbash scripts/setup-auth.shtemplates/api-client-fastapi.py.templateValidate your setup:
# Check environment variables
bash scripts/validate-env.sh
# Test API connection
bash scripts/test-connection.sh
API Key Not Found:
bash scripts/validate-env.shConnection Failed:
bash scripts/test-connection.sh for detailed diagnosticsSDK Installation Failed:
bash -x scripts/install-sdk.sh typescript