استرجاع تغيير الصوت
Poll a queued voice conversion. While the conversion is still running this returns status: "PROCESSING" as JSON; once it finishes it returns the converted audio bytes.
A completed response carries the audio alongside x-venice-audio-format, x-venice-audio-duration, x-venice-inference-time, x-venice-model-id and x-venice-model-name.
Only the account that queued a conversion can poll it. Any other queue_id — unknown, belonging to someone else, malformed, or older than the retrieve window — is reported the same way, as an invalid request id.
If the provider fails the conversion, the charge is refunded automatically and the response reports whether that refund succeeded in credits_refunded. The outcome is recorded, so polling again replays the same result rather than refunding twice.
When credits_refunded is false and the conversion was charged, the error message says what to do about it: a refund that was attempted and did not go through asks you to contact support and is retried by polling again, and a request id the provider no longer recognises is reported as too weak a verdict to reverse a charge on. A conversion that was never charged, or one already delivered, reports false with nothing further.
Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions. A 401 response with code X402_USER_NOT_ALLOWED means the wallet’s Venice account is banned or deleted, or the wallet’s x402 credit account belongs to a different user.
curl --request POST \
--url https://api.venice.ai/api/v1/audio/voice-changer/retrieve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-voice-changer",
"queue_id": "0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34",
"delete_media_on_completion": false
}
'import requests
url = "https://api.venice.ai/api/v1/audio/voice-changer/retrieve"
payload = {
"model": "elevenlabs-voice-changer",
"queue_id": "0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34",
"delete_media_on_completion": False
}
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({
model: 'elevenlabs-voice-changer',
queue_id: '0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34',
delete_media_on_completion: false
})
};
fetch('https://api.venice.ai/api/v1/audio/voice-changer/retrieve', 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.venice.ai/api/v1/audio/voice-changer/retrieve",
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' => 'elevenlabs-voice-changer',
'queue_id' => '0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34',
'delete_media_on_completion' => false
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.venice.ai/api/v1/audio/voice-changer/retrieve"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-voice-changer\",\n \"queue_id\": \"0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34\",\n \"delete_media_on_completion\": false\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.venice.ai/api/v1/audio/voice-changer/retrieve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-voice-changer\",\n \"queue_id\": \"0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34\",\n \"delete_media_on_completion\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/audio/voice-changer/retrieve")
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\": \"elevenlabs-voice-changer\",\n \"queue_id\": \"0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34\",\n \"delete_media_on_completion\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "PROCESSING",
"average_execution_time": 10000,
"execution_duration": 4200
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "This API key is restricted to configured IP addresses, and this request's source IP is not allowed"
}{
"error": "Media could not be found. Request may may be invalid, expired, or deleted.",
"credits_refunded": false
}{
"error": "<string>",
"suggested_prompt": "A cinematic instrumental track inspired by stormy weather and dramatic tension."
}{
"error": "<string>"
}{
"error": "Media could not be found. Request may may be invalid, expired, or deleted.",
"credits_refunded": false
}{
"error": "<string>"
}{
"error": "Media could not be found. Request may may be invalid, expired, or deleted.",
"credits_refunded": false
}queue_id المُعاد من /audio/voice-changer/queue للتحقق من حالة التحويل. أثناء تنفيذ المهمة، تُعيد هذه الـ endpoint JSON يحتوي على status: "PROCESSING". عند اكتمالها تُعيد audio/mpeg. عيّن delete_media_on_completion على true لتنظيف الوسائط المُخزَّنة في الاستدعاء نفسه، أو استدعِ /audio/voice-changer/complete بعد تنزيل الملف.
نماذج تغيير الصوت غير مقبولة على /audio/retrieve.
مجموعة Postman
للمزيد من الأمثلة، يرجى مراجعة مجموعة Postman هذه.التفويضات
الجسم
الاستجابة
Conversion still processing, or the completed audio
هل كانت هذه الصفحة مفيدة؟
curl --request POST \
--url https://api.venice.ai/api/v1/audio/voice-changer/retrieve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-voice-changer",
"queue_id": "0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34",
"delete_media_on_completion": false
}
'import requests
url = "https://api.venice.ai/api/v1/audio/voice-changer/retrieve"
payload = {
"model": "elevenlabs-voice-changer",
"queue_id": "0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34",
"delete_media_on_completion": False
}
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({
model: 'elevenlabs-voice-changer',
queue_id: '0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34',
delete_media_on_completion: false
})
};
fetch('https://api.venice.ai/api/v1/audio/voice-changer/retrieve', 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.venice.ai/api/v1/audio/voice-changer/retrieve",
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' => 'elevenlabs-voice-changer',
'queue_id' => '0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34',
'delete_media_on_completion' => false
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.venice.ai/api/v1/audio/voice-changer/retrieve"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-voice-changer\",\n \"queue_id\": \"0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34\",\n \"delete_media_on_completion\": false\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.venice.ai/api/v1/audio/voice-changer/retrieve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-voice-changer\",\n \"queue_id\": \"0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34\",\n \"delete_media_on_completion\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/audio/voice-changer/retrieve")
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\": \"elevenlabs-voice-changer\",\n \"queue_id\": \"0190f2c4-9c1e-7a3b-8f42-2c9d5e7a1b34\",\n \"delete_media_on_completion\": false\n}"
response = http.request(request)
puts response.read_body{
"status": "PROCESSING",
"average_execution_time": 10000,
"execution_duration": 4200
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "This API key is restricted to configured IP addresses, and this request's source IP is not allowed"
}{
"error": "Media could not be found. Request may may be invalid, expired, or deleted.",
"credits_refunded": false
}{
"error": "<string>",
"suggested_prompt": "A cinematic instrumental track inspired by stormy weather and dramatic tension."
}{
"error": "<string>"
}{
"error": "Media could not be found. Request may may be invalid, expired, or deleted.",
"credits_refunded": false
}{
"error": "<string>"
}{
"error": "Media could not be found. Request may may be invalid, expired, or deleted.",
"credits_refunded": false
}