Skip to content
MiniMax logo

MiniMax Speech 2.6 HD

Text-to-Speech • MiniMax

View as MarkdownAgent setup

Model ID

Use with the Workers AI binding, the AI Gateway REST API, or the Unified API.

Calling the provider directly? Use the provider's model name instead, including with provider-native endpoints or the provider's own SDK. For example, Anthropic's name for anthropic/claude-opus-4.8 is claude-opus-4-8.

  • Third-party

MiniMax Speech 2.6 HD is a studio-quality multilingual text-to-speech model with emotion control (including fluent and whisper styles) and support for cloned and designed voices.

Model Info
Terms and Licenselink ↗
More informationlink ↗
Pricing
  • Per character$0.0001

Usage

const response = await env.AI.run(
  'minimax/speech-2.6-hd',
  {
    format: 'mp3',
    pitch: 0,
    speed: 1,
    text: 'Hello! Welcome to Cloudflare AI Gateway. Let me show you what we can do.',
    voice_id: 'English_expressive_narrator',
    volume: 1,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/speech-2.6-hd",
  "input": {
    "format": "mp3",
    "pitch": 0,
    "speed": 1,
    "text": "Hello! Welcome to Cloudflare AI Gateway. Let me show you what we can do.",
    "voice_id": "English_expressive_narrator",
    "volume": 1
  }
}'
{
  "state": "Completed",
  "result": {
    "audio": "https://examples.aig.cloudflare.com/minimax/speech-2.6-hd/simple-speech.mp3"
  }
}

Examples

Custom Voice — Use a specific voice and adjust speed
const response = await env.AI.run(
  'minimax/speech-2.6-hd',
  {
    format: 'mp3',
    pitch: 0,
    speed: 0.9,
    text: 'The weather today is sunny with a high of 72 degrees. Perfect for a walk in the park.',
    voice_id: 'English_expressive_narrator',
    volume: 1,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/speech-2.6-hd",
  "input": {
    "format": "mp3",
    "pitch": 0,
    "speed": 0.9,
    "text": "The weather today is sunny with a high of 72 degrees. Perfect for a walk in the park.",
    "voice_id": "English_expressive_narrator",
    "volume": 1
  }
}'
{
  "state": "Completed",
  "result": {
    "audio": "https://examples.aig.cloudflare.com/minimax/speech-2.6-hd/custom-voice.mp3"
  }
}
With Emotion — Apply emotional tone to speech
const response = await env.AI.run(
  'minimax/speech-2.6-hd',
  {
    emotion: 'happy',
    format: 'mp3',
    pitch: 0,
    speed: 1,
    text: "Congratulations! You've just won the grand prize! This is absolutely incredible news!",
    voice_id: 'English_expressive_narrator',
    volume: 1,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/speech-2.6-hd",
  "input": {
    "emotion": "happy",
    "format": "mp3",
    "pitch": 0,
    "speed": 1,
    "text": "Congratulations! You'\''ve just won the grand prize! This is absolutely incredible news!",
    "voice_id": "English_expressive_narrator",
    "volume": 1
  }
}'
{
  "state": "Completed",
  "result": {
    "audio": "https://examples.aig.cloudflare.com/minimax/speech-2.6-hd/with-emotion.mp3"
  }
}
High Sample Rate — Studio quality at 44.1kHz sample rate
const response = await env.AI.run(
  'minimax/speech-2.6-hd',
  {
    format: 'mp3',
    pitch: 0,
    sample_rate: 44100,
    speed: 1,
    text: 'This recording is generated at studio quality sample rate for the highest possible audio fidelity.',
    voice_id: 'English_expressive_narrator',
    volume: 1,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "minimax/speech-2.6-hd",
  "input": {
    "format": "mp3",
    "pitch": 0,
    "sample_rate": 44100,
    "speed": 1,
    "text": "This recording is generated at studio quality sample rate for the highest possible audio fidelity.",
    "voice_id": "English_expressive_narrator",
    "volume": 1
  }
}'
{
  "state": "Completed",
  "result": {
    "audio": "https://examples.aig.cloudflare.com/minimax/speech-2.6-hd/high-sample-rate.mp3"
  }
}

Parameters

text
stringrequiredmaxLength: 10000The text to convert to speech. Maximum 10,000 characters.
voice_id
stringrequireddefault: English_expressive_narratorThe voice ID to use for synthesis
speed
numberrequireddefault: 1minimum: 0.5maximum: 2Speech speed (0.5 to 2)
volume
numberrequireddefault: 1minimum: 0maximum: 10Speech volume (0 to 10)
pitch
integerrequireddefault: 0minimum: -12maximum: 12Pitch adjustment (-12 to 12)
emotion
stringenum: happy, sad, angry, fearful, disgusted, surprised, calm, fluent, whisperEmotion control for synthesized speech
format
stringrequireddefault: mp3enum: mp3, flac, wavOutput audio format
audio
stringURL to the generated audio file

API Schemas (Raw)

Input
Output

Was this helpful?