API

Build with voice AI

Add lifelike speech to any application with our REST API. Simple authentication, streaming support, and comprehensive SDKs for Python, Node.js, and Go.

curl -X POST https://api.speakai.com/v1/synthesize \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello world!",
    "voice_id": "emma-v2",
    "output_format": "mp3"
  }' \
  --output speech.mp3

API Endpoints

POST/v1/synthesize

Convert text to speech. Supports plain text and SSML input. Returns audio in MP3, WAV, FLAC, or OGG format.

GET/v1/voices

List all available voices with metadata including language, gender, style, and preview audio URL.

POST/v1/voices/clone

Create a custom voice clone from audio samples. Requires 30+ seconds of clear speech audio.

POST/v1/stream

Stream audio in real-time as it's generated. Uses server-sent events for low-latency playback.