Docs Native format /minimax/v1/t2a_v2
API reference

Synchronous speech synthesis V2

https://platform.minimaxi.com/docs/api-reference/speech-t2a-http

POST/minimax/v1/t2a_v2

Body Parametersapplication/json

body object

Responses

200 Successful response, returning synthesized audio data (hex encoding or URL) and related statistics
response-200 object
400 Request parameter error application/json
response-400 object
401 Authentication failed application/json
response-401 object
429 Trigger current limit application/json
response-429 object
Request Body Example The simplest speech synthesis example
1{
2"model": "speech-02-hd",
3"text": "你好,欢迎使用语音合成服务!",
4"voice_setting": {
5"voice_id": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85"
6}
7}
Code Sample cURL
1curl -X POST "https://api.digislash.com/minimax/v1/t2a_v2" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"model": "speech-02-hd",
6"text": "你好,欢迎使用语音合成服务!",
7"voice_setting": {
8"voice_id": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85"
9}
10}'
Response
1▼{
2▼"base_resp": {
3"status_code": 0,
4"status_msg": "success"
5},
6▼"data": {
7"audio": "2f2f2f2f504b0304...",
8"status": 2,
9"subtitle_file": "https://filecdn.minimax.chat/subtitle/subtitle_123.json"
10},
11▼"extra_info": {
12"audio_length": 12000,
13"audio_sample_rate": 32000,
14"audio_size": 195000,
15"usage_characters": 68,
16"word_count": 68
17},
18"trace_id": "subtitle_example_123"
19}