Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

Multiple voices, streaming support, multilingual.
Endpoint
POST /voice/v1/speak
curl -X POST https://api.case.dev/voice/v1/speak \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The court finds in favor of the plaintiff.",
    "voice_id": "EXAVITQu4vr4xnSDxMaL"
  }' \
  --output ruling.mp3

Parameters

ParameterTypeRequiredDescription
textstringYesText to convert to speech
voice_idstringNoVoice ID (default: Rachel)
output_formatstringNoAudio format (default: mp3_44100_128)
language_codestringNoLanguage for multilingual voices

List voices

Get available voices:
curl https://api.case.dev/voice/v1/voices \
  -H "Authorization: Bearer sk_case_YOUR_API_KEY"
VoiceIDDescription
RachelEXAVITQu4vr4xnSDxMaLProfessional, clear (default)
Adam21m00Tcm4TlvDq8ikWAMDeep, authoritative
AntoniErXwobaYiN019PkySvjVWell-rounded, calm
JoshTxGEqnHWrfWFTfGW9XjXDeep, narrative

Streaming

For lower latency, stream audio as it’s generated:
Endpoint
POST /voice/v1/speak/stream
curl -X POST https://api.case.dev/voice/v1/speak \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Output formats

FormatDescription
mp3_44100_128MP3, 44.1kHz, 128kbps (default)
mp3_44100_192MP3, 44.1kHz, 192kbps
pcm_16000PCM, 16kHz
pcm_44100PCM, 44.1kHz

Examples

Narrate a document summary

const audio = await client.voice.v1.speak.create({
  text: `Summary of Smith v. Hospital: The plaintiff alleges medical
         malpractice during a surgical procedure on March 15, 2024...`,
  voice_id: 'EXAVITQu4vr4xnSDxMaL'
});
The casedev CLI does not yet expose a text-to-speech command — use cURL or an SDK. You can still browse the voice catalog with casedev voice:v1 list-voices.

Multilingual

const audio = await client.voice.v1.speak.create({
  text: 'El tribunal falla a favor del demandante.',
  language_code: 'es'
});
Pricing: 0.30per1,000characters.A5,000characterdocumentcosts0.30 per 1,000 characters. A 5,000 character document costs 1.50.