Skip to Content
Quickstart

Quickstart

Make your first TTS and STT call in under 10 minutes.

1. Create an API key

Go to the API Keys page in your Revolab dashboard and click Create key. Copy the key — you will not be able to see it again.

2. Set the REVOLAB_API_KEY environment variable

export REVOLAB_API_KEY="rvl_live_..."

3. Make your first TTS call

Send a POST /v1/tts request with your text. Replace <your-voice-id> with a voice from the Voice Library in your dashboard — or list them programmatically with GET /v1/voices. The response body is the generated audio itself.

Pass "stream": true from the start. It delivers audio as it is synthesized, so the first sound is ready in about 0.45 seconds whatever the length of the text — a buffered call for the same passage makes you wait for the whole generation. There is no downside for a one-off script and a large one for anything a person is waiting on. See Streaming for the full contract.

curl -X POST https://api.revolab.ai/v1/tts \ -H "Authorization: Bearer $REVOLAB_API_KEY" \ -H "Content-Type: application/json" \ --no-buffer \ -d '{ "model": "nada-1.0-pro", "text": "Hello, world! This is my first Revolab TTS call.", "voice_id": "<your-voice-id>", "language": "en", "stream": true, "output_format": "mp3" }' \ -o speech.mp3

Expected result: speech.mp3 on disk, with the first bytes arriving well before the last. Want the whole file in one piece instead — with a Content-Length up front and the generation kept in your dashboard History? Drop stream and output_format and you get buffered WAV, plus X-Duration-S / X-Latency-Ms response headers carrying the generation metrics.

4. Make your first STT call

Upload an audio file (WAV, MP3, M4A, FLAC, OGG, Opus, or WebM; max 50 MB, max 30 minutes) to POST /v1/stt. The response contains the transcript and detected language.

# Transcribe a local audio file curl -X POST https://api.revolab.ai/v1/stt \ -H "Authorization: Bearer $REVOLAB_API_KEY" \ -F "file=@/path/to/audio.wav" \ -F "model=aisyah-1.0-pro" \ -F "language=en" | python3 -c " import sys, json data = json.load(sys.stdin) print('Transcript:', data['text']) print('Language:', data['language']) print('Duration:', data['duration_s'], 's') "

Expected response: {"text":"Hello world","language":"en","duration_s":1.8,"confidence":0.98,"latency_ms":520}

5. Where to go next

  • TTS API reference — all parameters, models, voices, speed control, output formats.
  • STT API reference — all parameters, file constraints, language detection.
  • Error catalog — every error.code with causes and fixes.
  • Models — five models, latency vs quality trade-offs.
  • Compatible APIs — already using the OpenAI, ElevenLabs, or Cartesia SDK? Keep it and just change the base URL.