メインコンテンツへスキップ
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

リクエストボディ

model
string
デフォルト:"tts-1"
TTSモデル:tts-1(標準)または tts-1-hd(高品質)。
input
string
必須
音声を生成するテキスト。最大4096文字。
voice
string
必須
使用する音声:alloyashballadcoralechofablenovaonyxsageshimmerverse
response_format
string
デフォルト:"mp3"
音声形式:mp3opusaacflacwavpcm
speed
number
デフォルト:"1.0"
音声の速度(0.25から4.0)。

レスポンス

リクエストされた形式で音声ファイルを返します。
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

音声サンプル

音声説明
alloyニュートラル、バランスが良い
ash穏やか、落ち着いた
balladメロディック、表現力豊か
coral温かい、親しみやすい
echo温かい、対話的
fable表現力豊か、ナラティブ
novaフレンドリー、明快
onyx深く、威厳がある
sage賢明、思慮深い
shimmerソフト、優しい
verseダイナミック、多才