Generate TTS audio (synchronous)
curl --request POST \
--url https://open.skills.video/api/ai/tts/generate \
--header 'Content-Type: application/json' \
--data '
{
"provider": "minimax-tts",
"model": "speech-02-hd",
"input": {
"text": "Hello world, this is a sample TTS generation.",
"voice": "default",
"language": "en"
}
}
'import requests
url = "https://open.skills.video/api/ai/tts/generate"
payload = {
"provider": "minimax-tts",
"model": "speech-02-hd",
"input": {
"text": "Hello world, this is a sample TTS generation.",
"voice": "default",
"language": "en"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
provider: 'minimax-tts',
model: 'speech-02-hd',
input: {
text: 'Hello world, this is a sample TTS generation.',
voice: 'default',
language: 'en'
}
})
};
fetch('https://open.skills.video/api/ai/tts/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://open.skills.video/api/ai/tts/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => 'minimax-tts',
'model' => 'speech-02-hd',
'input' => [
'text' => 'Hello world, this is a sample TTS generation.',
'voice' => 'default',
'language' => 'en'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://open.skills.video/api/ai/tts/generate"
payload := strings.NewReader("{\n \"provider\": \"minimax-tts\",\n \"model\": \"speech-02-hd\",\n \"input\": {\n \"text\": \"Hello world, this is a sample TTS generation.\",\n \"voice\": \"default\",\n \"language\": \"en\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://open.skills.video/api/ai/tts/generate")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"minimax-tts\",\n \"model\": \"speech-02-hd\",\n \"input\": {\n \"text\": \"Hello world, this is a sample TTS generation.\",\n \"voice\": \"default\",\n \"language\": \"en\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://open.skills.video/api/ai/tts/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"minimax-tts\",\n \"model\": \"speech-02-hd\",\n \"input\": {\n \"text\": \"Hello world, this is a sample TTS generation.\",\n \"voice\": \"default\",\n \"language\": \"en\"\n }\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"provider": "minimax-tts",
"model": "speech-02-hd",
"input": [
"text": "Hello world, this is a sample TTS generation.",
"voice": "default",
"language": "en"
]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://open.skills.video/api/ai/tts/generate")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Content-Type": "application/json"]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self)){
"success": true,
"data": {
"provider": "minimax-tts",
"model": "speech-02-hd",
"modelId": "minimax-tts/speech-02-hd",
"endpoint": "minimax/tts-v2",
"audio_url": "https://cdn.example.com/tts/audio_abc123.mp3",
"audio": {
"url": "https://cdn.example.com/tts/audio_abc123.mp3",
"content_type": "audio/mpeg",
"duration": 3.2
},
"output": {
"audio_url": "https://cdn.example.com/tts/audio_abc123.mp3"
},
"logs": null,
"metrics": null
}
}{
"error": "TTS_GENERATION_INVALID_INPUT",
"code": "TTS_GENERATION_INVALID_INPUT",
"message": "Invalid input"
}{
"error": "TTS_GENERATION_UNSUPPORTED_MODEL",
"code": "TTS_GENERATION_UNSUPPORTED_MODEL",
"message": "TTS model not found"
}{
"error": "TTS_GENERATION_CONTENT_REJECTED",
"code": "TTS_GENERATION_CONTENT_REJECTED",
"message": "Request content was rejected by the moderation policy."
}{
"error": "TTS_GENERATION_RATE_LIMITED",
"code": "TTS_GENERATION_RATE_LIMITED",
"message": "Rate limit exceeded. Please retry later."
}{
"error": "TTS_GENERATION_FAILED",
"code": "TTS_GENERATION_FAILED",
"message": "Generation failed."
}{
"error": "TTS_GENERATION_FAILED",
"code": "TTS_GENERATION_FAILED",
"message": "Generation failed."
}{
"error": "TTS_GENERATION_PROVIDER_UNAVAILABLE",
"code": "TTS_GENERATION_PROVIDER_UNAVAILABLE",
"message": "Upstream generation provider is temporarily unavailable."
}{
"error": "TTS_GENERATION_TIMEOUT",
"code": "TTS_GENERATION_TIMEOUT",
"message": "Generation timed out."
}TTS
Generate TTS audio (synchronous)
Synchronously synthesize speech from text using the resolved TTS model. Returns the generated audio URL and raw upstream payload. On failure, the response body exposes a machine-readable code from the TTS generation taxonomy, a sanitized message, and the legacy error field for backward compatibility.
POST
/
ai
/
tts
/
generate
Generate TTS audio (synchronous)
curl --request POST \
--url https://open.skills.video/api/ai/tts/generate \
--header 'Content-Type: application/json' \
--data '
{
"provider": "minimax-tts",
"model": "speech-02-hd",
"input": {
"text": "Hello world, this is a sample TTS generation.",
"voice": "default",
"language": "en"
}
}
'import requests
url = "https://open.skills.video/api/ai/tts/generate"
payload = {
"provider": "minimax-tts",
"model": "speech-02-hd",
"input": {
"text": "Hello world, this is a sample TTS generation.",
"voice": "default",
"language": "en"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
provider: 'minimax-tts',
model: 'speech-02-hd',
input: {
text: 'Hello world, this is a sample TTS generation.',
voice: 'default',
language: 'en'
}
})
};
fetch('https://open.skills.video/api/ai/tts/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://open.skills.video/api/ai/tts/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => 'minimax-tts',
'model' => 'speech-02-hd',
'input' => [
'text' => 'Hello world, this is a sample TTS generation.',
'voice' => 'default',
'language' => 'en'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://open.skills.video/api/ai/tts/generate"
payload := strings.NewReader("{\n \"provider\": \"minimax-tts\",\n \"model\": \"speech-02-hd\",\n \"input\": {\n \"text\": \"Hello world, this is a sample TTS generation.\",\n \"voice\": \"default\",\n \"language\": \"en\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://open.skills.video/api/ai/tts/generate")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"minimax-tts\",\n \"model\": \"speech-02-hd\",\n \"input\": {\n \"text\": \"Hello world, this is a sample TTS generation.\",\n \"voice\": \"default\",\n \"language\": \"en\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://open.skills.video/api/ai/tts/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"minimax-tts\",\n \"model\": \"speech-02-hd\",\n \"input\": {\n \"text\": \"Hello world, this is a sample TTS generation.\",\n \"voice\": \"default\",\n \"language\": \"en\"\n }\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"provider": "minimax-tts",
"model": "speech-02-hd",
"input": [
"text": "Hello world, this is a sample TTS generation.",
"voice": "default",
"language": "en"
]
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://open.skills.video/api/ai/tts/generate")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = ["Content-Type": "application/json"]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self)){
"success": true,
"data": {
"provider": "minimax-tts",
"model": "speech-02-hd",
"modelId": "minimax-tts/speech-02-hd",
"endpoint": "minimax/tts-v2",
"audio_url": "https://cdn.example.com/tts/audio_abc123.mp3",
"audio": {
"url": "https://cdn.example.com/tts/audio_abc123.mp3",
"content_type": "audio/mpeg",
"duration": 3.2
},
"output": {
"audio_url": "https://cdn.example.com/tts/audio_abc123.mp3"
},
"logs": null,
"metrics": null
}
}{
"error": "TTS_GENERATION_INVALID_INPUT",
"code": "TTS_GENERATION_INVALID_INPUT",
"message": "Invalid input"
}{
"error": "TTS_GENERATION_UNSUPPORTED_MODEL",
"code": "TTS_GENERATION_UNSUPPORTED_MODEL",
"message": "TTS model not found"
}{
"error": "TTS_GENERATION_CONTENT_REJECTED",
"code": "TTS_GENERATION_CONTENT_REJECTED",
"message": "Request content was rejected by the moderation policy."
}{
"error": "TTS_GENERATION_RATE_LIMITED",
"code": "TTS_GENERATION_RATE_LIMITED",
"message": "Rate limit exceeded. Please retry later."
}{
"error": "TTS_GENERATION_FAILED",
"code": "TTS_GENERATION_FAILED",
"message": "Generation failed."
}{
"error": "TTS_GENERATION_FAILED",
"code": "TTS_GENERATION_FAILED",
"message": "Generation failed."
}{
"error": "TTS_GENERATION_PROVIDER_UNAVAILABLE",
"code": "TTS_GENERATION_PROVIDER_UNAVAILABLE",
"message": "Upstream generation provider is temporarily unavailable."
}{
"error": "TTS_GENERATION_TIMEOUT",
"code": "TTS_GENERATION_TIMEOUT",
"message": "Generation timed out."
}Synchronous TTS generation. Errors are surfaced with a
TTS_GENERATION_* code, a human readable message, and a legacy error field.Body
application/json
Canonical TTS model id. Takes precedence over provider/model/endpoint when set.
Minimum string length:
1TTS provider key.
Minimum string length:
1TTS model key (scoped to provider).
Minimum string length:
1Explicit upstream endpoint identifier. Optional when modelId or provider+model resolve to a known TTS spec.
Minimum string length:
1Model-specific TTS input payload (text, voice, language, etc.). The accepted keys depend on the resolved TTS spec; see the corresponding model documentation.
Show child attributes
Show child attributes
⌘I