메인 콘텐츠로 건너뛰기
POST
/
v1
/
audio
/
speech
Create speech
curl --request POST \
  --url https://api.dgrid.ai/v1/audio/speech \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "tts-1",
  "input": "Hello from DGrid.",
  "voice": "alloy"
}
'
"<string>"

인증

Authorization
string
header
필수

Your DGrid API key. All endpoints use Authorization: Bearer <DGRID_API_KEY>.

본문

application/json
model
string
필수

Voice model, such as tts-1 or tts-1-hd.

예시:

"tts-1"

input
string
필수

Text to synthesize, up to 4096 characters.

voice
enum<string>
필수

Voice preset.

사용 가능한 옵션:
alloy,
echo,
fable,
onyx,
nova,
shimmer
response_format
string
기본값:mp3

Output audio format.

speed
number
기본값:1

Speaking speed.

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

응답

Binary audio stream.

The response is of type file.