Speech 02 HD

by MiniMax

minimax/speech-02-hd

Turn text into spoken audio in a chosen voice.

Billed per
character
Price
Price: $0.0001
Provider
MiniMax
Timeout
5 min

Overview

Converts a block of text into speech using a stock or previously cloned voice. This is the legacy high-definition tier, which favours fidelity over speed. Voice settings control delivery — speaking rate, volume, pitch, and an emotional register such as calm — while audio settings control the encoding: container format, sample rate, bitrate, and mono or stereo. A language hint improves pronunciation for a particular language or dialect. Billing counts the characters submitted, so the price of a call is known before it is made.

The audio, returned inline, with its length, sample rate, size, and the character count that was billed.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
textstringYesWhat to say.
Maximum: 10000
voice_settingobjectNoWhich voice to use and how it delivers: `voice_id`, `speed`, `vol`, `pitch`, and an emotional register.
audio_settingobjectNoHow to encode the audio: `format`, `sample_rate`, `bitrate`, and `channel`.
language_booststringNoA language hint that improves pronunciation.

Requests up to 1 MB, text up to 10,000 characters.

Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"minimax","endpoint":"speech-02-hd","input":{"text":"Hello, and welcome back to the show.","voice_setting":{"voice_id":"female-shaonv","speed":1},"audio_setting":{"format":"mp3","sample_rate":32000}}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.

Pricing

$0.0001 per character using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.

Questions