Text to Speech

CheapAI exposes multiple text-to-speech flows behind one account. Choose the route that matches your voice source, model family, and output controls.

Choose The Right Route

Voice-based TTS

POST /v1/text-to-speech/:voice_id

Use when you want a specific voice id and standard TTS output formats.

MiniMax TTS

POST /v1m/task/text-to-speech

Use when you want MiniMax model selection, voice_setting controls, or MiniMax voice inventory.

Edge TTS

POST /v1e/task/text-to-speech

Use when you need broad voice coverage, SRT input, or word-level transcript output.

Voice-Based TTS

http
POST https://api.cheapaiapi.com/v1/text-to-speech/{voice_id}?output_format=mp3_44100_128
textstringrequiredInput text to synthesize.
model_idstringTTS model, for example eleven_multilingual_v2.
with_transcriptbooleanInclude transcript outputs when supported.
receive_urlstringOptional webhook endpoint for completion delivery.
bash
curl -X POST "https://api.cheapaiapi.com/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM?output_format=mp3_44100_128" \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The first move is what sets everything in motion.",
    "model_id": "eleven_multilingual_v2",
    "with_transcript": false
  }'

MiniMax TTS

http
POST https://api.cheapaiapi.com/v1m/task/text-to-speech
textstringrequiredText to synthesize.
modelstringMiniMax TTS model such as speech-2.6-hd or speech-2.6-turbo.
voice_setting.voice_idstringrequiredVoice id from the MiniMax voice list.
voice_setting.volnumberVolume control.
voice_setting.pitchnumberPitch control.
voice_setting.speednumberSpeed control.
language_booststringLanguage hint from the common config endpoint.
bash
curl -X POST "https://api.cheapaiapi.com/v1m/task/text-to-speech" \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, this is a test message.",
    "model": "speech-2.6-hd",
    "voice_setting": {
      "voice_id": "209533299589184",
      "vol": 1,
      "pitch": 0,
      "speed": 1
    },
    "language_boost": "Auto"
  }'

Edge TTS

http
POST https://api.cheapaiapi.com/v1e/task/text-to-speech
textstringrequiredPlain text or valid SRT content.
voicestringVoice name from GET /v1e/voices.
speednumberPlayback speed, for example 0.9 or 1.2.
with_transcriptbooleanGenerate SRT and JSON transcript output.
with_loudnormbooleanNormalize loudness before output delivery.

Task Pattern

json
{
  "success": true,
  "task_id": "uuid_task_id",
  "ec_remain_credits": 123456
}

All current TTS flows are task-based. After submission, poll the common task endpoint or wait for your webhook.

http
GET https://api.cheapaiapi.com/v1/task/{task_id}

Result Payload

json
{
  "id": "task_123",
  "status": "done",
  "credit_cost": 1,
  "metadata": {
    "audio_url": "https://...",
    "srt_url": "https://...",
    "json_url": "https://..."
  },
  "type": "tts"
}

Useful Discovery Endpoints

  • GET /v1/models for general voice model metadata
  • GET /v1e/voices for Edge voices
  • GET /v1m/common/config for MiniMax config and language support
  • POST /v1m/voice/list for MiniMax voice inventory

Tips For Better UX

  • Let users choose the TTS route first, then show only the parameters that apply to that route.
  • Save the last used voice and model combination for quick repeats.
  • Show task state immediately after submit instead of waiting on audio synchronously.
  • If transcripts are optional, make them a toggle with clear extra-output expectations.