OpenAI Audio Speech API
POSThttps://api.acedata.cloud/v1/audio/speech
POSThttps://api.acedata.cloud/openai/audio/speech

Combine the text into natural speech (OpenAI compatible /v1/audio/speech), supporting multiple voice tones such as tts-1 and tts-1-hd, and directly return audio bytes.

Request Headers

authorizationstring
Bearer token

Request Body

inputstringRequired parameter
Text to be synthesized. Billing is calculated based on the number of requested bytes.
modelstring
Speech synthesis model: tts-1 (faster) or tts-1-hd (higher quality, default).
Please select
speednumber
Speech rate, range 0.25–4.0, default 1.0.
voicestring
Timbre: one of alloy, echo, fable, onyx, nova, shimmer.
Please select
response_formatstring
Audio formats: mp3 (default), opus, aac, flac, wav, or pcm.
Please select

Response

OpenAI generation
Allow Use General Balance

When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.

Shell

Python

JavaScript

Java

Go

PHP

Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.