プロジェクトの削除
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 | リクエストが多すぎます(制限:1分間に10リクエスト) |
| 500 | INTERNAL_ERROR | 予期しないサーバーエラー |
このページは役に立ちましたか?

