Docs Native format /minimax/v1/t2a_async_v2
API reference

Asynchronous speech synthesis

Submit a text-to-speech asynchronous task. Choose one of text and text_file_id; poll through GET /minimax/v1/query/t2a_async_query_v2 after submission.…

POST/minimax/v1/t2a_async_v2

Body Parametersapplication/json

aigc_watermark boolean

Whether to add an AIGC watermark

audio_setting object

Audio output settings

properties
bitrate integer

Bitrate

format string

Format

sample_rate integer

Sample rate

language_boost string

Language enhancements (e.g. `Chinese`, `English`)

model* string

T2A model

text string

Text to be synthesized (choose one from `text_file_id`)

text_file_id integer

Text file ID (alternative to `text`)

voice_setting* object

Sound settings

properties
pitch integer

Pitch, range -12–12

speed number

Speech rate, range 0.5–2.0

voice_id* string

Voice ID

vol number

Volume, range 0–10

Responses

200 Task submitted successfully application/json
response-200 object
properties
base_resp object
file_id integer

File ID

task_id integer

Asynchronous task ID

task_token string

Task token

usage_characters integer

Number of billed characters

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 Provide text content directly
1{
2"model": "speech-02-hd",
3"text": "真正的危险不是计算机开始像人一样思考,而是人开始像计算机一样思考。",
4"voice_setting": {
5"pitch": 0,
6"speed": 1,
7"voice_id": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85",
8"vol": 1
9}
10}
Code Sample cURL
1curl -X POST "https://api.digislash.com/minimax/v1/t2a_async_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"pitch": 0,
9"speed": 1,
10"voice_id": "moss_audio_ce44fc67-7ce3-11f0-8de5-96e35d26fb85",
11"vol": 1
12}
13}'
Response
1▼{
2▼"base_resp": {
3"status_code": 0,
4"status_msg": "success"
5},
6"file_id": 0,
7"task_id": 0,
8"task_token": "string",
9"usage_characters": 0
10}