minimax-speech

Before use, press Access Basics to set SHANHAI_BASE_URL (this site’s root address) and SHANHAI_API_KEY (this site’s token). The following command is suitable for Bash; the material example address must be replaced with a real address that can be downloaded directly.

This name is used for sound design: use text to describe the desired sound and generate an audition. It is not short for minimax-speech-2.8-hd or minimax-speech-2.8-turbo. Before accessing, please contact the customer service on the site to confirm the status of the sound design service and account permissions; being able to see the name in the model list does not mean that you have permission to create sounds.

Basic information

Request interface: POST /v1/audio/speech. The successful response is an MP3 audio binary audition file; if the timbre number is returned, it can be read from the response header X-MiniMax-Voice-Id. Subsequent synthesis uses the corresponding text-to-speech model and available timbre numbers.

request parameters

Field Type Required Description
model string Yes minimax-speech
instructions string is timbre description, such as gender characteristics, age, vocal range and speaking style
input string is audition text, 1~500 characters
metadata.prompt string No Alternative writing method of instructions; choose one of the two positions
metadata.preview_text string No Alternative writing method of input, still 1~500 characters
metadata.voice_id string No Custom tone number; it must meet the requirements of the tone service for numbering, omit if unsure
metadata.aigc_watermark boolean No Whether to add the generated content identifier

The audition format for this operation is MP3. There is no need to change the format with response_format, and do not submit the voice_setting for speech speed, mixed timbre or normal voice. Uses with the same name in metadata will overwrite the top-level value, so repeated filling in should be avoided.

Request Example

After confirming that the service is available, you can use the following request. The timbre number is saved in response-headers.txt, and the preview is saved in voice-preview.mp3:

curl --fail-with-body "$SHANHAI_BASE_URL/v1/audio/speech" \
  -H "Authorization: Bearer $SHANHAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "minimax-speech",
  "instructions": "温暖、沉稳的成年男性声音,咬字清晰,语气自然。",
  "input": "你好,欢迎使用ShangHai Do。",
  "metadata": {
    "aigc_watermark": true
  }
}' \
  -D response-headers.txt -o voice-preview.mp3

Return and subsequent use

Check the status code before saving or playing the audio. Read the response header X-MiniMax-Voice-Id when successful; if there is no such header, do not splice or guess the number yourself. Before continuing to synthesize with this sound, confirm the account permissions, validity period, and charging rules of this site; do not regard creating a sound and ordinary reading as the same operation.

minimax-voice-design is another reserved name and cannot directly replace the model on this page; for instructions, see Reserved Name Page. Sound cloning is another operation that requires recording samples. See the sound cloning instructions of MiniMax HD.

encountered a problem

If you encounter problems with calling or configuration, please contact the site customer service and provide the model name, task number, error time and error message. Do not provide the complete token.