Migrate From ElevenLabs
Braiv’s Text to Speech API is designed to make migration from ElevenLabs straightforward for server-side integrations.
What changes
Section titled “What changes”| ElevenLabs | Braiv |
|---|---|
https://api.elevenlabs.io/v1 | https://api.braiv.co/v1 |
| ElevenLabs API key | Braiv API key |
ElevenLabs voice_id | Braiv voice clone id (VoiceClones doc id) |
POST /v1/voices/add (sync Instant Voice Clone) | Same path; Braiv returns {voice_id} immediately and extracts async. Poll GET /v1/voices/{voice_id} until status is ready. |
| ElevenLabs model id | braiv-speech-v1 |
JavaScript SDK example
Section titled “JavaScript SDK example”If your ElevenLabs client supports a custom baseUrl, point it at Braiv:
import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js';
const client = new ElevenLabsClient({ apiKey: process.env.BRAIV_API_KEY, baseUrl: 'https://api.braiv.co/v1',});
const audio = await client.textToSpeech.convert('YOUR_VOICE_ID', { text: 'The first move is what sets everything in motion.', modelId: 'braiv-speech-v1',});Direct HTTP example
Section titled “Direct HTTP example”curl -X POST "https://api.braiv.co/v1/text-to-speech/YOUR_VOICE_ID" \ -H "xi-api-key: $BRAIV_API_KEY" \ -H "Content-Type: application/json" \ --output speech.wav \ --data '{"text":"Hello from Braiv.","model_id":"braiv-speech-v1"}'Compatibility notes
Section titled “Compatibility notes”- Braiv currently returns WAV audio during the beta.
- Instant Voice Clone is available at
POST /v1/voices/add(multipartfilesor JSONsample_url). Do not speak untilGET /v1/voices/{voice_id}reportsstatus: ready. GET /v1/voiceslists every known clone in the key/OAuth library (includingprocessingandfailed). Add?status=readyfor usable-only.- Brand Voices (
GET /v1/brand-voices) are thumbnail branding, not speaker clones. - Plan eligibility is checked when keys are generated and whenever requests are made.