Amux AI

Text to Speech

Last updated November 24, 2026

Synchronous text-to-speech endpoint synthesizing input text into raw WAV or PCM binary audio.

Unified synchronous Text to Speech endpoint routing by model (currently supporting DeepSeek TTS). Send a JSON payload and receive raw binary audio (audio/wav or audio/pcm).

POSThttps://gateway.amux.ai/v1/tools/tts

Authorization

header
AuthorizationstringRequired

Bearer <your Amux AI key> Amux AI API key created in the console.

Content-TypestringRequiredDefault "application/json"

Must be application/json.

Request

application/json
modelstringRequired

TTS model canonical ID or alias (for example deepseek/deepseek-tts or deepseek-tts).

textstringRequired

Text to synthesize. Maximum 10,000 billed characters (ASCII = 1, non-ASCII = 2) and maximum 64 KiB JSON request body.

voice_id"stella" | "tide"Default "stella"

Voice preset — stella (female, default) or tide (male).

format"wav" | "pcm"Default "wav"

Output audio format — wav (default, 1-channel 24 kHz 16-bit PCM WAV) or pcm (raw 24 kHz 16-bit signed little-endian mono PCM).

filter_markdownbooleanDefault true

Whether to strip Markdown syntax before synthesis (default true).

Response

200response

Synthesis succeeded; response body is raw binary audio (audio/wav or audio/pcm matching format).

400response

Invalid request body, text exceeds 10,000 billed chars or 64 KiB limit, or model does not support TTS.

402response

Insufficient workspace balance.

Protocol overview

  • HTTP REST full-text synthesis only: Submit the full text in a single request and receive the synthesized audio payload upon completion. WebSocket streaming is not currently supported.
  • Payload and character limits: Maximum 64 KiB JSON request body and 10,000 billed characters per request (ASCII = 1, non-ASCII = 2).
  • Audio direction check: Accepts only TTS models with audio in output_modalities. Passing an ASR model returns 400 invalid_request.
  • Billing: Settled by billed characters once non-empty audio bytes are received; failed requests or empty audio responses incur no charge.

Error handling

Errors follow the standard OpenAI error schema. Missing required fields, exceeding character or size limits, or unsupported models return 400 invalid_request. See Errors and retries.

cURL
curl https://gateway.amux.ai/v1/tools/tts \
  -H "Authorization: Bearer $AMUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-tts",
    "text": "Hello, welcome to Amux AI text to speech.",
    "voice_id": "stella",
    "format": "wav",
    "filter_markdown": true
  }'
{
  "error": {
    "type": "insufficient_credits",
    "message": "Workspace balance is not enough."
  }
}