-
Add your API Key: Open
.envand replaceYOUR_API_KEYwith your actual ElevenLabs API key.ELEVENLABS_API_KEY=sk_... -
Run the Server: You can use the helper script:
./run.sh
Or manually:
source venv/bin/activate uvicorn main:app --reload
Endpoint: POST /speak
Request Body:
{
"text": "Hello, this is a test."
}Example (Curl):
curl -X POST "http://localhost:8000/speak" \
-H "Content-Type: application/json" \
-d '{"text": "Refactoring works!"}' \
--output response.mp3The app is configured to use:
- Model:
eleven_multilingual_v2 - Voice ID:
JBFqnCBsd6RMkjVDRZzb