Subspace Institute

MiniMax T2A API

Generates speech audio from the provided text using MiniMax Text-to-Speech service

POST
/tts-minimax
textstring
Length1 <= length <= 1024
references?array<object>

References to be used for the speech, this requires MessagePack serialization, this will override reference_voices and reference_texts

voice?string

Desired voice. Either voice_id or timber_weights must be given as part of the parameters. Both system voice ids and cloned voice ids are supported

Default"male-qn-qingse"
tokenstring

MiniMax API key for authentication

Length1 <= length
groupIdstring

The group to which the user belongs. Use the pre-generated value. The value should be spliced at the end of the url that calls the API.

Length1 <= length
platform?string

The platform to be used for the speech

Default"china"
Value in"china" | "intl"
model?string

The model to be used for the speech

Default"speech-02-turbo"

Response Body

curl -X POST "https://edge-workers.laplace.cn/laplace/tts-minimax" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "感谢ドラゴンラプラスWeChat的SC:一发sc没被念到我就冷汗直流心跳加速头皮发麻双手痉挛两腿打颤,还不好意思刷弹幕说你漏了,我好怕你看到了装作没看到。我的sc通常很短只有一小时,只有短短的3600秒,但它存在的时候,我会用心跳来为它倒数。私のBANを解除してください。もう二度とスパムしません😭",
    "token": "string",
    "groupId": "string"
  }'
const body = JSON.stringify({
  "text": "感谢ドラゴンラプラスWeChat的SC:一发sc没被念到我就冷汗直流心跳加速头皮发麻双手痉挛两腿打颤,还不好意思刷弹幕说你漏了,我好怕你看到了装作没看到。我的sc通常很短只有一小时,只有短短的3600秒,但它存在的时候,我会用心跳来为它倒数。私のBANを解除してください。もう二度とスパムしません😭",
  "token": "string",
  "groupId": "string"
})

fetch("https://edge-workers.laplace.cn/laplace/tts-minimax", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://edge-workers.laplace.cn/laplace/tts-minimax"
  body := strings.NewReader(`{
    "text": "感谢ドラゴンラプラスWeChat的SC:一发sc没被念到我就冷汗直流心跳加速头皮发麻双手痉挛两腿打颤,还不好意思刷弹幕说你漏了,我好怕你看到了装作没看到。我的sc通常很短只有一小时,只有短短的3600秒,但它存在的时候,我会用心跳来为它倒数。私のBANを解除してください。もう二度とスパムしません😭",
    "token": "string",
    "groupId": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://edge-workers.laplace.cn/laplace/tts-minimax"
body = {
  "text": "感谢ドラゴンラプラスWeChat的SC:一发sc没被念到我就冷汗直流心跳加速头皮发麻双手痉挛两腿打颤,还不好意思刷弹幕说你漏了,我好怕你看到了装作没看到。我的sc通常很短只有一小时,只有短短的3600秒,但它存在的时候,我会用心跳来为它倒数。私のBANを解除してください。もう二度とスパムしません😭",
  "token": "string",
  "groupId": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;

var body = BodyPublishers.ofString("""{
  "text": "感谢ドラゴンラプラスWeChat的SC:一发sc没被念到我就冷汗直流心跳加速头皮发麻双手痉挛两腿打颤,还不好意思刷弹幕说你漏了,我好怕你看到了装作没看到。我的sc通常很短只有一小时,只有短短的3600秒,但它存在的时候,我会用心跳来为它倒数。私のBANを解除してください。もう二度とスパムしません😭",
  "token": "string",
  "groupId": "string"
}""");
HttpClient client = HttpClient.newBuilder()
  .connectTimeout(Duration.ofSeconds(10))
  .build();

HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
  .uri(URI.create("https://edge-workers.laplace.cn/laplace/tts-minimax"))
  .header("Content-Type", "application/json")
  .POST(body)
  .build();

try {
  HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
  System.out.println("Status code: " + response.statusCode());
  System.out.println("Response body: " + response.body());
} catch (Exception e) {
  e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;

var body = new StringContent("""
{
  "text": "感谢ドラゴンラプラスWeChat的SC:一发sc没被念到我就冷汗直流心跳加速头皮发麻双手痉挛两腿打颤,还不好意思刷弹幕说你漏了,我好怕你看到了装作没看到。我的sc通常很短只有一小时,只有短短的3600秒,但它存在的时候,我会用心跳来为它倒数。私のBANを解除してください。もう二度とスパムしません😭",
  "token": "string",
  "groupId": "string"
}
""", Encoding.UTF8, "application/json");

var client = new HttpClient();
var response = await client.PostAsync("https://edge-workers.laplace.cn/laplace/tts-minimax", body);
var responseBody = await response.Content.ReadAsStringAsync();
null
{
  "success": false,
  "message": "string",
  "code": "string",
  "type": "string"
}
{
  "success": false,
  "message": "string",
  "code": "string",
  "type": "string"
}