Text to speech
OpenAI-compatible text-to-speech API, callable with API Keys and billed per character.
Text-to-speech uses Authorization: Bearer sk-tp-... and shares the same Key authentication, rate limiting, and billing pipeline as chat completions. The console Playground · Speech uses the same capability.
Speech synthesis
- Auth:
Authorization: Bearer sk-tp-... - Content-Type:
application/json
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Platform TTS model name, see Models |
| input | string | Yes | Text to synthesize; must not be empty |
| voice | string | Yes | Voice identifier; allowed values depend on the model |
| response_format | string | No | mp3 (default), wav, opus, aac, flac, pcm |
| speed | number | No | Speech rate multiplier, defaults to 1.0 |
| Other params | - | No | Passed through per the OpenAI protocol and model support |
Response
Returns raw audio bytes with the matching Content-Type (e.g. audio/mpeg); not JSON.
Billing
- Billed per input character at "yuan per 10k characters"; the model must use per-character pricing.
- Responses include
X-Cost-Yuan(cost) andX-Bill-Units(character count) headers.
Pre-checks
- Key valid and not revoked (including all parents), account active → otherwise
401 - Model exists and is live (
LIVE), priced per character with a unit price → otherwise400 inputnot empty → otherwise400- Balance above zero and Key chain quota not exhausted → otherwise
402
Audio translation (planned)
🧭 Not available yet. The upstream gateway used by the platform does not expose /v1/audio/translations. To avoid documenting an endpoint that cannot actually be called, it remains closed. For cross-language audio, call Speech to Text first, then translate the text with a chat model.
Voice management
Clone your own voice and use it for synthesis — see Voice Management (voice cloning). The contract is finalized but not live yet (needs a direct MiniMax channel). Today only the model's built-in voice values are available.
Errors
For error format and troubleshooting see FAQ · Error codes. Upstream errors are passed through unchanged.