프로젝트 삭제
curl --request DELETE \
--url https://api.voicecheap.ai/v1/translate/{projectId} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.voicecheap.ai/v1/translate/{projectId}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.voicecheap.ai/v1/translate/{projectId}', 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://api.voicecheap.ai/v1/translate/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.voicecheap.ai/v1/translate/{projectId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.voicecheap.ai/v1/translate/{projectId}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/translate/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"projectId": "<string>"
}번역
프로젝트 삭제
번역 프로젝트를 영구적으로 삭제합니다
프로젝트 삭제
curl --request DELETE \
--url https://api.voicecheap.ai/v1/translate/{projectId} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.voicecheap.ai/v1/translate/{projectId}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.voicecheap.ai/v1/translate/{projectId}', 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://api.voicecheap.ai/v1/translate/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.voicecheap.ai/v1/translate/{projectId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.voicecheap.ai/v1/translate/{projectId}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/translate/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"projectId": "<string>"
}프로젝트 삭제
번역 프로젝트와 관련 자산을 영구적으로 삭제합니다. 이 정리 작업은 프로젝트를 위해 생성된 저장된 음성 복제 미리보기 예제 파일도 제거합니다. 삭제가 완료되기 전에 일부 내부 생성 파일이나 세그먼트 기록이 이미 제거된 경우, 정리는 최선 노력 모드로 계속되며 프로젝트 삭제를 마무리합니다.이 작업은 되돌릴 수 없습니다. 프로젝트, 작업물, 생성된 미디어 자산 및 저장된 음성 복제 미리보기 예제 파일이 삭제됩니다.
요청
헤더
string
필수
귀하의 VoiceCheap API 키입니다. app.voicecheap.ai/page-api에서 키를 받으세요.
경로 매개변수
string
필수
삭제할 번역 프로젝트의 고유 식별자입니다.
응답
boolean
필수
삭제 작업이 성공적으로 완료되었음을 나타냅니다.
string
필수
사람이 읽을 수 있는 확인 메시지입니다.
string
필수
삭제된 프로젝트의 ID입니다.
예시
curl -X DELETE "https://api.voicecheap.ai/v1/translate/abc123-def456-ghi789" \
-H "x-api-key: vc_your-api-key"
interface DeleteProjectResponse {
success: true;
message: string;
projectId: string;
}
async function deleteProject(projectId: string): Promise<DeleteProjectResponse> {
const response = await fetch(
`https://api.voicecheap.ai/v1/translate/${projectId}`,
{
method: 'DELETE',
headers: {
'x-api-key': 'vc_your-api-key',
},
},
);
if (!response.ok) {
const error = await response.json();
throw new Error(error.message || 'Failed to delete project');
}
return response.json();
}
// Usage
deleteProject('abc123-def456-ghi789')
.then((result) => console.log('Deleted:', result.projectId))
.catch((error) => console.error('Error:', error));
import requests
project_id = 'abc123-def456-ghi789'
headers = {'x-api-key': 'vc_your-api-key'}
response = requests.delete(
f'https://api.voicecheap.ai/v1/translate/{project_id}',
headers=headers
)
if not response.ok:
error = response.json()
raise Exception(error.get('message', 'Failed to delete project'))
result = response.json()
print(f"Deleted: {result['projectId']}")
<?php
$apiKey = 'vc_your-api-key';
$projectId = 'abc123-def456-ghi789';
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voicecheap.ai/v1/translate/{$projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
"x-api-key: {$apiKey}"
]
]);
$response = curl_exec($curl);
$result = json_decode($response, true);
if (!isset($result['success'])) {
$message = $result['message'] ?? 'Failed to delete project';
throw new Exception($message);
}
echo "Deleted: " . $result['projectId'];
오류
| 상태 | 코드 | 설명 |
|---|---|---|
| 401 | INVALID_API_KEY | 제공된 API 키가 유효하지 않습니다 |
| 403 | FORBIDDEN | 이 프로젝트를 삭제할 권한이 없습니다 |
| 404 | PROJECT_NOT_FOUND | 지정된 프로젝트가 존재하지 않습니다 |
| 429 | RATE_LIMIT_EXCEEDED | 요청이 너무 많습니다 (제한: 분당 10회 요청) |
| 500 | INTERNAL_ERROR | 예기치 않은 서버 오류 |
이 페이지가 도움이 되었나요?

