Skip to content
TutujinAPI

API reference

Text to speech (Audio Speech)

Parameters, request examples and the response format for POST /v1/audio/speech — turn text into an audio file for order updates, voice notifications and narrated content. Same format as the OpenAI speech API. Requests are relayed as-is.

POST /v1/audio/speech turns text into speech and returns the audio file directly (MP3 by default) — handy for order updates, voice notifications, narrated content and spoken support replies. The format matches the OpenAI speech API. Requests are relayed to the model service in their original format; available voices and formats vary by model and follow that model's official documentation.

POSThttps://www.tutujin.com/v1/audio/speech

Headers

HeaderRequiredDescription
AuthorizationYesBearer sk-..., an API key from the console
Content-TypeYesapplication/json

Request body

ParameterTypeRequiredDescription
modelstringYesModel name, e.g. tts-1
inputstringYesText to read aloud. Each request has a length limit, so split long text into sentences or paragraphs
voicestringYesVoice. OpenAI TTS models offer alloy, echo, fable, onyx, nova, shimmer and others; other vendors' models use different voice names
response_formatstringNoAudio format; OpenAI models support mp3 (default), opus, aac, flac, wav, pcm
speednumberNoSpeaking speed, 0.25 to 4.0, default 1.0

Request example

curl https://www.tutujin.com/v1/audio/speech \
  -H "Authorization: Bearer $TUTUJIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "input": "Your order has shipped and should arrive tomorrow.",
    "voice": "alloy"
  }' \
  --output notice.mp3

Response format

A successful call returns raw audio bytes, not JSON. The Content-Type response header gives the audio type, e.g. audio/mpeg for MP3. With cURL, add --output to save it to a file.

Errors come back as a JSON error body with an HTTP error status, so check the status code before treating the body as audio. See Errors and retries.

Notes

  • This endpoint is relayed as-is and has not been verified separately on this site. When you switch to another vendor's speech model, confirm its voice values and output formats first.
  • Split long text into sentences or paragraphs, synthesize each and join the audio in order; overly long text in one request returns an error.
  • Synthesize fixed phrases such as "Your order has shipped" once and reuse the cached audio instead of requesting it every time.
  • Billing follows the model's price list; the Logs page in the console is the record of what you were charged.

Models that support this endpoint

ModelVendorCheapest groupInput ¥/1MOutput ¥/1MPer request ¥
minimax/speech-2.8-turboMiniMaxStandard——¥4
minimax/speech-2.8-hdMiniMaxStandard——¥7
tts-1-1106OpenAIStandard¥30¥30—
tts-1OpenAIStandard¥30¥30—
tts-1-hd-1106OpenAIStandard¥60¥60—
tts-1-hdOpenAIStandard¥60¥60—
speech-2.8-hdMiniMaxStandard¥700¥700—
speech-2.8-turboMiniMaxStandard¥700¥700—

Prices in CNY, cheapest group for each model; updated Nov 13, 2026, 6:13 PM.

Still stuck? Add our WeChat support JsnonoChat and send the request id from the error message, and we will look into it.