Skip to content

Speech generation endpoint handler.

POST
/v1/audio/speech
curl --request POST \
--url https://example.com/v1/audio/speech \
--header 'Content-Type: application/json' \
--data '{ "input": "[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face.", "model": "nari-labs/Dia-1.6B", "response_format": "mp3" }'
Media type application/json

Speech generation request

object
input
required

The text content to convert to speech.

string
Example
[S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Git hub or Hugging Face.
model

The TTS model to use for audio generation.

string
Example
nari-labs/Dia-1.6B
response_format
required

The desired audio format for the generated speech.

string
Allowed values: mp3 opus aac flac wav pcm

Speech generation