Synthome Docs
Providers

ElevenLabs

Setup and configuration for ElevenLabs

ElevenLabs

ElevenLabs provides high-quality text-to-speech with a large voice library.

Setup

1. Get API Key

  1. Create an account at elevenlabs.io
  2. Go to Profile Settings
  3. Copy your API key

2. Configure Environment

# .env or .env.local
ELEVENLABS_API_KEY=your_elevenlabs_key_here

Available Models

ModelID
Turbo v2.5elevenlabs/turbo-v2.5
import { generateAudio, audioModel } from "@synthome/sdk";

generateAudio({
  model: audioModel("elevenlabs/turbo-v2.5", "elevenlabs"),
  text: "Hello, welcome to our video.",
  voiceId: "21m00Tcm4TlvDq8ikWAM",
});

Voice IDs

ElevenLabs provides pre-made voices. Common voice IDs:

VoiceID
Rachel21m00Tcm4TlvDq8ikWAM
AdampNInz6obpgDQGcFmaJgB
JoshTxGEqnHWrfWFTfGW9XjX
BellaEXAVITQu4vr4xnSDxMaL

Find more voices in the ElevenLabs Voice Library.

Per-Request API Key

Override the environment variable for specific requests:

generateAudio({
  model: audioModel("elevenlabs/turbo-v2.5", "elevenlabs"),
  text: "Hello world",
  voiceId: "21m00Tcm4TlvDq8ikWAM",
  apiKey: "different_elevenlabs_key",
});

Resources

How is this guide?