Skip to main content

Step 1: Get Your API Key

In the Smallest AI Console, go to Settings → API Keys and click Create API Key. API Keys settings page with Create API Key button highlighted Create New API Key dialog with name field Copy the key and export it:
export SMALLEST_API_KEY="your-api-key-here"
New to Smallest AI? Sign up here first — it takes 30 seconds.

Step 2: Hear Audio in 30 Seconds

Paste this in your terminal — no install required:
curl -X POST "https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech" \
  -H "Authorization: Bearer $SMALLEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello from Smallest AI! This is Lightning v3.1.", "voice_id": "magnus", "sample_rate": 24000, "output_format": "wav"}' \
  --output hello.wav
Play hello.wav — it should sound like this: That’s broadcast-quality TTS with ~200ms latency.

Step 3: Build It Into Your App

curl -X POST "https://api.smallest.ai/waves/v1/lightning-v3.1/get_speech" \
  -H "Authorization: Bearer $SMALLEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Modern problems require modern solutions.",
    "voice_id": "magnus",
    "sample_rate": 24000,
    "speed": 1.0,
    "language": "en",
    "output_format": "wav"
  }' --output output.wav

Step 4: Explore More

Key Parameters

ParameterTypeDefaultDescription
textstringrequiredText to synthesize (max ~250 chars recommended)
voice_idstringrequiredVoice to use (e.g., magnus, olivia)
sample_rateint441008000, 16000, 24000, or 44100 Hz
speedfloat1.0Speech rate: 0.5 to 2.0
languagestringautoen, hi, es, ta, or auto
output_formatstringpcmpcm, wav, mp3, or mulaw

Need Help?

Join the Community

Ask questions, share what you’re building, and connect with other developers on Discord.
If you need direct assistance, reach out at support@smallest.ai.