Saltar al contenido principal
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>"

Autorizaciones

Authorization
string
header
requerido

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

Cuerpo

application/json
model
string
requerido

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

Ejemplo:

"tts-1"

input
string
requerido

Text to synthesize, up to 4096 characters.

voice
enum<string>
requerido

Voice preset.

Opciones disponibles:
alloy,
echo,
fable,
onyx,
nova,
shimmer
response_format
string
predeterminado:mp3

Output audio format.

speed
number
predeterminado:1

Speaking speed.

Rango requerido: 0.25 <= x <= 4

Respuesta

Binary audio stream.

The response is of type file.