메인 콘텐츠로 건너뛰기

Documentation Index

Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt

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

요청 본문

동기 요청 타임아웃: 이 비채팅 엔드포인트는 라우팅된 모델이 완료될 때까지 기다립니다. 큰 입력, 긴 오디오, 큰 배치는 일반적인 30s 클라이언트 기본값을 초과할 수 있으므로 HTTP 클라이언트 타임아웃을 최소 120s 로 설정하세요.
model
string
기본값:"tts-1"
TTS 모델: tts-1 (표준) 또는 tts-1-hd (더 높은 품질).
input
string
필수
오디오를 생성할 텍스트입니다. 최대 4096자.
voice
string
필수
사용할 음성: alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse.
response_format
string
기본값:"mp3"
오디오 형식: mp3, opus, aac, flac, wav, pcm.
speed
number
기본값:"1.0"
오디오 속도 (0.25~4.0).

응답

요청한 형식의 오디오 파일을 반환합니다.
curl -X POST "https://api.tokenlab.sh/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 TokenLab!"
  }' \
  --output speech.mp3

음성 샘플

음성설명
alloy중립적이고 균형 잡힘
ash차분하고 절제됨
ballad선율적이고 표현력이 풍부함
coral따뜻하고 친근함
echo따뜻하고 대화체 느낌
fable표현력이 풍부하고 서사적임
nova친근하고 명확함
onyx깊이 있고 권위적임
sage현명하고 사려 깊음
shimmer부드럽고 온화함
verse역동적이고 다재다능함