curl --request POST \
--url https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'cosyvoice-v3.5-plus',
url: 'https://example.com/reference.wav',
text: 'There is a large garden behind my house.'
})
};
fetch('https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone"
payload = {
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone"
payload := strings.NewReader("{\n \"model\": \"cosyvoice-v3.5-plus\",\n \"url\": \"https://example.com/reference.wav\",\n \"text\": \"There is a large garden behind my house.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.modellix.ai/api/v1/alibaba/cosyvoice-clone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"cosyvoice-v3.5-plus\",\n \"url\": \"https://example.com/reference.wav\",\n \"text\": \"There is a large garden behind my house.\"\n}")
.asString();const url = 'https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'cosyvoice-v3.5-plus',
url: 'https://example.com/reference.wav',
text: 'There is a large garden behind my house.'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone",
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([
'model' => 'cosyvoice-v3.5-plus',
'url' => 'https://example.com/reference.wav',
'text' => 'There is a large garden behind my house.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"cosyvoice-v3.5-plus\",\n \"url\": \"https://example.com/reference.wav\",\n \"text\": \"There is a large garden behind my house.\"\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
}'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-cosyvoice-clone-001",
"model_id": "alibaba/cosyvoice-clone",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-cosyvoice-clone-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: model is required"
}{
"code": 400,
"message": "Invalid parameters: model is required"
}{
"code": 400,
"message": "Invalid parameters: model is required"
}{
"code": 400,
"message": "Invalid parameters: model is required"
}CosyVoice Clone
[Core Function] CosyVoice Clone clones a speaker from a public reference audio URL and synthesizes new speech in one async request; only the final audio is returned. [Strengths] No voice enrollment management; language_hint applies to both cloning and synthesis; SSML, hot_fix, and prosody controls. [Best For] One-off cloned narration and demos where a lasting voice library is not needed. [Limitations] Do NOT use this to obtain a reusable voice library entry; the cloned voice is temporary and is not returned. Reference URL must be publicly accessible. model must be cosyvoice-v3.5-plus or cosyvoice-v3.5-flash. [Routing] Choose cosyvoice-v3.5-plus for higher speech quality; cosyvoice-v3.5-flash for lower latency.
curl --request POST \
--url https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'cosyvoice-v3.5-plus',
url: 'https://example.com/reference.wav',
text: 'There is a large garden behind my house.'
})
};
fetch('https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone"
payload = {
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone"
payload := strings.NewReader("{\n \"model\": \"cosyvoice-v3.5-plus\",\n \"url\": \"https://example.com/reference.wav\",\n \"text\": \"There is a large garden behind my house.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.modellix.ai/api/v1/alibaba/cosyvoice-clone")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"cosyvoice-v3.5-plus\",\n \"url\": \"https://example.com/reference.wav\",\n \"text\": \"There is a large garden behind my house.\"\n}")
.asString();const url = 'https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'cosyvoice-v3.5-plus',
url: 'https://example.com/reference.wav',
text: 'There is a large garden behind my house.'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone",
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([
'model' => 'cosyvoice-v3.5-plus',
'url' => 'https://example.com/reference.wav',
'text' => 'There is a large garden behind my house.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"cosyvoice-v3.5-plus\",\n \"url\": \"https://example.com/reference.wav\",\n \"text\": \"There is a large garden behind my house.\"\n}"
response = http.request(request)
puts response.read_bodyimport Foundation
let parameters = [
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))$headers=@{}
$headers.Add("Authorization", "Bearer <token>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.modellix.ai/api/v1/alibaba/cosyvoice-clone' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"model": "cosyvoice-v3.5-plus",
"url": "https://example.com/reference.wav",
"text": "There is a large garden behind my house."
}'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-cosyvoice-clone-001",
"model_id": "alibaba/cosyvoice-clone",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-cosyvoice-clone-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: model is required"
}{
"code": 400,
"message": "Invalid parameters: model is required"
}{
"code": 400,
"message": "Invalid parameters: model is required"
}{
"code": 400,
"message": "Invalid parameters: model is required"
}Authorizations
Modellix API Key. Format: Bearer <your_api_key>
Body
One-shot voice clone + TTS request. Required: model, url, text. The cloned voice is temporary and is not returned.
Target CosyVoice v3.5 TTS model used for synthesis after cloning.
cosyvoice-v3.5-plus, cosyvoice-v3.5-flash Publicly accessible reference audio URL for cloning.
1 - 2048"https://example.com/reference.wav"
Text to synthesize with the temporarily cloned voice. Required. Max 20,000 Unicode characters. Supports plain text and SSML (set enable_ssml to true).
1 - 20000"There is a large garden behind my house."
Language hint for both cloning and synthesis. Default zh.
zh, en, fr, de, ja, ko, ru, pt, th, id, vi "en"
Max reference audio duration in seconds used for cloning (3.0–30.0). Default 10.0.
3 <= x <= 3010
Enable noise reduction and audio enhancement before cloning. Default false.
false
Output audio encoding format. Default mp3.
mp3, pcm, wav, opus "mp3"
Output sample rate in Hz. Default 22050.
8000, 16000, 22050, 24000, 44100, 48000 24000
Output volume. Default 50. Range 0–100.
0 <= x <= 10050
Speech rate multiplier. Default 1.0. Range 0.5–2.0.
0.5 <= x <= 21
Pitch multiplier. Default 1.0. Range 0.5–2.0.
0.5 <= x <= 21
Audio bit rate in kbps. Optional. Range 6–510. Only supported when format is opus; do not send for mp3, pcm, or wav.
6 <= x <= 51032
Optional speaking-style instruction. Weighted length ≤100 (CJK ideographs count as 2).
"Speak in a friendly customer-service tone."
Random seed. Default 0. Range 0–65535.
0 <= x <= 655350
Whether to parse text as SSML. Default false. When true, text must follow Alibaba CosyVoice SSML rules.
false
Text hot-fix before synthesis. Optional object with pronunciation (custom pinyin) and replace (text substitution) arrays, per Alibaba CosyVoice HTTP API.
{ "replace": [{ "Modellix": "Modelix" }] }
Response
Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until the task completes; synthesized audio is returned on the task result.
Response object for asynchronous task submission.