Passer au contenu principal
POST
/
v1
/
audio
/
speech
curl -X POST "https://api.lemondata.cc/v1/audio/speech" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1-hd",
    "voice": "nova",
    "input": "Hello, welcome to LemonData!"
  }' \
  --output speech.mp3

Corps de la requête

model
string
défaut:"tts-1"
Modèle TTS : tts-1 (standard) ou tts-1-hd (haute qualité).
input
string
requis
Le texte pour lequel générer l’audio. Maximum 4096 caractères.
voice
string
requis
Voix à utiliser : alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse.
response_format
string
défaut:"mp3"
Format audio : mp3, opus, aac, flac, wav, pcm.
speed
number
défaut:"1.0"
Vitesse de l’audio (0.25 à 4.0).

Réponse

Renvoie le fichier audio dans le format demandé.
curl -X POST "https://api.lemondata.cc/v1/audio/speech" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1-hd",
    "voice": "nova",
    "input": "Hello, welcome to LemonData!"
  }' \
  --output speech.mp3

Échantillons de voix

VoixDescription
alloyNeutre, équilibrée
ashCalme, mesurée
balladMélodique, expressive
coralChaleureuse, invitante
echoChaleureuse, conversationnelle
fableExpressive, narrative
novaAmicale, claire
onyxProfonde, autoritaire
sageSage, réfléchie
shimmerDouce, délicate
verseDynamique, polyvalente