删除音色
curl --request POST \
--url https://open.bigmodel.cn/api/paas/v4/voice/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice": "voice_clone_20240315_143052_001",
"request_id": "voice_save_req_001"
}
'import requests
url = "https://open.bigmodel.cn/api/paas/v4/voice/delete"
payload = {
"voice": "voice_clone_20240315_143052_001",
"request_id": "voice_save_req_001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({voice: 'voice_clone_20240315_143052_001', request_id: 'voice_save_req_001'})
};
fetch('https://open.bigmodel.cn/api/paas/v4/voice/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://open.bigmodel.cn/api/paas/v4/voice/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voice\": \"voice_clone_20240315_143052_001\",\n \"request_id\": \"voice_save_req_001\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://open.bigmodel.cn/api/paas/v4/voice/delete"
payload := strings.NewReader("{\n \"voice\": \"voice_clone_20240315_143052_001\",\n \"request_id\": \"voice_save_req_001\"\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://open.bigmodel.cn/api/paas/v4/voice/delete",
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([
'voice' => 'voice_clone_20240315_143052_001',
'request_id' => 'voice_save_req_001'
]),
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;
}{
"voice": "voice_clone_20240315_143052_001",
"update_time": "2024-03-15 14:30:52"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}模型 API
删除音色
删除指定的音色。点击 Try it 按钮可快速试用。
POST
/
paas
/
v4
/
voice
/
delete
删除音色
curl --request POST \
--url https://open.bigmodel.cn/api/paas/v4/voice/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voice": "voice_clone_20240315_143052_001",
"request_id": "voice_save_req_001"
}
'import requests
url = "https://open.bigmodel.cn/api/paas/v4/voice/delete"
payload = {
"voice": "voice_clone_20240315_143052_001",
"request_id": "voice_save_req_001"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({voice: 'voice_clone_20240315_143052_001', request_id: 'voice_save_req_001'})
};
fetch('https://open.bigmodel.cn/api/paas/v4/voice/delete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://open.bigmodel.cn/api/paas/v4/voice/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voice\": \"voice_clone_20240315_143052_001\",\n \"request_id\": \"voice_save_req_001\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://open.bigmodel.cn/api/paas/v4/voice/delete"
payload := strings.NewReader("{\n \"voice\": \"voice_clone_20240315_143052_001\",\n \"request_id\": \"voice_save_req_001\"\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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://open.bigmodel.cn/api/paas/v4/voice/delete",
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([
'voice' => 'voice_clone_20240315_143052_001',
'request_id' => 'voice_save_req_001'
]),
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;
}{
"voice": "voice_clone_20240315_143052_001",
"update_time": "2024-03-15 14:30:52"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Body
application/json
Was this page helpful?
⌘I