메인 콘텐츠로 건너뛰기
POST
/
audio
/
speech
음성 생성
curl --request POST \
  --url https://api.orcarouter.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "openai/tts-1",
  "input": "<string>",
  "voice": "<string>",
  "instructions": "<string>",
  "speed": 2.125,
  "stream_format": "<string>",
  "response_format": "mp3"
}
'

인증

Authorization
string
header
필수

OrcaRouter API 키는 sk-orca-...처럼 보입니다. Authorization: Bearer sk-orca-... 헤더로 전달하세요.

본문

application/json
model
string
필수

OpenAI TTS 모델 — openai/tts-1, openai/tts-1-hd, openai/gpt-4o-mini-tts. Gemini TTS 미리보기 모델은 이 엔드포인트에서 제공되지 않음; 대신 responseModalities: ["AUDIO"]와 함께 Gemini 네이티브 /v1beta/ 인터페이스 사용.

예시:

"openai/tts-1"

input
string
필수
voice
string
필수

보이스 식별자. 게이트웨이는 이 필드를 변경 없이 업스트림 으로 전달 — 업스트림 모델이 지원하는 보이스 이름을 사용하세요.

예시:

"alloy"

"echo"

"fable"

"onyx"

"nova"

"shimmer"

instructions
string

선택적 보이스 방향(예: 스타일, 어조). openai/gpt-4o-mini-tts 같이 이를 지원하는 모델에서 존중됨.

speed
number

재생 속도. 기본값 1.0.

필수 범위: 0.25 <= x <= 4
stream_format
string

설정되면 응답이 이 형식으로 청크별로 스트리밍됨(업스트림 지원에 따라).

response_format
enum<string>
기본값:mp3
사용 가능한 옵션:
mp3,
opus,
aac,
flac,
wav,
pcm

응답

바이너리 오디오 컨텐츠.