Skip to Content
Compatible APIsElevenLabs

ElevenLabs-compatible API

The elevenlabs Python SDK works against Revolab with a base_url swap — convert, streaming, the realtime websocket, speech-to-text, and the voice list.

Endpoints

POST https://api.revolab.ai/v1/text-to-speech/{voice_id} POST https://api.revolab.ai/v1/text-to-speech/{voice_id}/stream WS wss://api.revolab.ai/v1/text-to-speech/{voice_id}/stream-input POST https://api.revolab.ai/v1/speech-to-text GET https://api.revolab.ai/v1/voices

Text to speech

from elevenlabs.client import ElevenLabs client = ElevenLabs(api_key="rvl_live_...", base_url="https://api.revolab.ai") # Buffered WAV — wav_24000 is the default when output_format is # omitted (note: NOT ElevenLabs' mp3 default; we don't transcode) audio = b"".join(client.text_to_speech.convert( voice_id="<your-voice-id>", text="Hello from Revolab.", model_id="nada-1.0-flash", output_format="wav_24000", )) # Chunked streaming — raw 24 kHz mono s16le PCM for chunk in client.text_to_speech.stream( voice_id="<your-voice-id>", text="Streaming starts before synthesis finishes.", model_id="nada-1.0-flash", output_format="pcm_24000", ): play(chunk)

Speech to text & voices

from elevenlabs.client import ElevenLabs client = ElevenLabs(api_key="rvl_live_...", base_url="https://api.revolab.ai") result = client.speech_to_text.convert( model_id="aisyah-1.0-flash", file=open("speech.wav", "rb"), ) print(result.text, result.language_code) # Your voice library, in the ElevenLabs shape voices = client.voices.get_all().voices

Support matrix

AreaSupport
AuthThe SDK’s xi-api-key header carries a normal rvl_live_ key. Authorization: Bearer also works.
Output formatswav_24000 (buffered; the default when omitted) and pcm_24000 (chunked raw PCM). mp3_* / ulaw / opus and other sample rates return a 400 naming the supported values.
Realtime websocketwss …/v1/text-to-speech/{voice_id}/stream-input with output_format=pcm_24000. Text chunks buffer; flush or the empty-text EOS triggers synthesis, streamed back as base64 audio messages ending in isFinal. Note: the official SDK forces wss://, so it needs a TLS endpoint (production works; plain-HTTP dev gateways need a raw websocket client).
TimestampsNo alignment / word timestamps — the alignment fields are null and STT words is [] (our engines return whole-utterance text).
ModelsRevolab names only. eleven_multilingual_v2, scribe_v1 etc. return a 400 listing valid models.
Voice settingsvoice_settings.speed maps to our 0.5–2.0 speed; stability / similarity_boost / style are accepted and ignored.

Errors use the ElevenLabs {"detail": {"status", "message"}} envelope. Full error codes: Errors.