Skip to content

Voice and audio (TTS)

POST /v1/audio/speech: text to voice (TTS) or soundtrack/sound effect — compatible with OpenAI format.

Updated on Sep 02, 2026

Two families on the same endpoint:

  • Voice (TTS)minimax/speech-28-hd, inworld/tts-1.5-max: text to speech, in 3–5 seconds, with voice selection.
  • Generative audiostability-ai/stable-audio-2/2.5/3: description to music or sound effect.

Text goes in prompt — and for compatibility with OpenAI, input and text are accepted as synonyms.

POSThttps://api.hinow.ai/v1/audio/speechBearer

Converts text to speech (or generates audio) and returns the public URL of the file.

Parâmetros

  • modelstring· bodyobrigatório

    `minimax/speech-28-hd`, `inworld/tts-1.5-max` (voice) or `stability-ai/stable-audio-2` (music/effects).

  • promptstring· bodyobrigatório

    The text to speak — or, in audio models, the sound description. Accepted aliases: `input` (OpenAI format) and `text`.

  • voicestring· body

    Model voice (e.g., `Ashley` in inworld). `voice_id` is also accepted.

  • speednumber· body

    Speech speed (0.5–2.0, depending on the model).

  • output_formatstring· body

    File format (default `mp3`).

  • durationnumber· body

    In generative audio models: duration of the clip in seconds.

  • asyncboolean· body

    `true` for async mode — useful in audio models, which take longer.

Respostas

200Generated audio
{
  "success": true,
  "data": {
    "urls": ["https://s3.us1-stlouis.hinow.ai/hi-storage/text_to_audio/.../fala.mp3"],
    "model": "inworld/tts-1.5-max",
    "category": "text_to_audio",
    "cost": { "amount": 0.000728, "currency": "USD" }
  }
}
400Model incompatible with the endpoint, or missing text
502Provider failed — the error message contains the cause
voz em 3–5s (medido: US$ 0,0007 por frase no inworld)bash
curl -X POST https://api.hinow.ai/v1/audio/speech \
  -H "Authorization: Bearer hi_SUA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "inworld/tts-1.5-max",
    "input": "Perfeito! Seu pedido foi confirmado e chega amanhã.",
    "voice": "Ashley"
  }'

Transcription (speech → text) is the reverse path, at POST /v1/audio/transcriptions.