Tts 1 Hd

tts-1-hd

post

TTS is a model that converts text to natural sounding spoken text. The tts-1-hd model is optimized for high quality text-to-speech use cases.

Header parameters
AuthorizationstringRequiredExample: sk-qNXaCLFLuF6KxswYB31dF9Fb5c6c4d929dE30957A6Fa0047
Body
modelstringRequired

model is the model name

Example: tts-1-hd
inputstring · max: 4096Required

The text to generate audio for.

Example: A cute baby sea otter.
voicestring · enumRequired

The voice to use when generating the audio. Supported voices are alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, and verse.

Example: alloyPossible values:
response_formatstring · enumOptional

The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.

Default: mp3Example: mp3Possible values:
speednumber · min: 0.25 · max: 4Optional

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.

Default: 1Example: 1
stream_formatstringOptional

The format to stream the audio in. Supported formats are audio.

Default: audioExample: audio
Responses
200

The audio file content.

application/octet-stream
Responseobject
post
/audio/speech
POST /v1/audio/speech HTTP/1.1
Host: audio.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 127

{
  "model": "tts-1-hd",
  "input": "A cute baby sea otter.",
  "voice": "alloy",
  "response_format": "mp3",
  "speed": 1,
  "stream_format": "audio"
}
200

The audio file content.

{}

Last updated