Preventivo Voice Changer
Get a price quote for converting a source recording of a given length.
Voice Changer is billed off the length of the source recording, rounded up to the next whole minute. This endpoint prices the length you declare, so the result is an estimate: the amount actually charged is computed from the length Venice measures server-side when the recording is queued. Where the two round to the same minute, the prices are identical — /audio/voice-changer/queue returns the measured duration_seconds so the estimate can be reconciled.
The whole-minute tiers are also published directly as pricing.durations in /models.
curl --request POST \
--url https://api.venice.ai/api/v1/audio/voice-changer/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-voice-changer",
"duration_seconds": 60
}
'import requests
url = "https://api.venice.ai/api/v1/audio/voice-changer/quote"
payload = {
"model": "elevenlabs-voice-changer",
"duration_seconds": 60
}
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', duration_seconds: 60})
};
fetch('https://api.venice.ai/api/v1/audio/voice-changer/quote', 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/quote",
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',
'duration_seconds' => 60
]),
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/quote"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-voice-changer\",\n \"duration_seconds\": 60\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/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-voice-changer\",\n \"duration_seconds\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/audio/voice-changer/quote")
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 \"duration_seconds\": 60\n}"
response = http.request(request)
puts response.read_body{
"quote": 0.35,
"duration_seconds": 60
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}/audio/voice-changer/queue per stimare il costo in USD della conversione di una registrazione sorgente di una data lunghezza. Il Voice Changer viene fatturato in base alla durata della sorgente, arrotondata per eccesso al minuto intero successivo. La risposta di queue restituisce il valore duration_seconds misurato, così puoi riconciliare la stima.
I modelli voice-changer non sono accettati su /audio/quote.
Postman Collection
Per ulteriori esempi, consulta questa Postman Collection.Autorizzazioni
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
The voice-changer model to price. Models that are not voice changers are not supported here; use /api/v1/audio/quote instead.
"elevenlabs-voice-changer"
Length of the source recording in seconds. Voice Changer preserves timing, so the source length is the billable quantity, priced in whole-minute tiers. This is an estimate: the charge is computed from the length Venice measures server-side when the recording is queued. The per-model maximum is published as max_source_audio_duration_seconds in /models.
x > 060
Questa pagina è stata utile?
curl --request POST \
--url https://api.venice.ai/api/v1/audio/voice-changer/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-voice-changer",
"duration_seconds": 60
}
'import requests
url = "https://api.venice.ai/api/v1/audio/voice-changer/quote"
payload = {
"model": "elevenlabs-voice-changer",
"duration_seconds": 60
}
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', duration_seconds: 60})
};
fetch('https://api.venice.ai/api/v1/audio/voice-changer/quote', 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/quote",
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',
'duration_seconds' => 60
]),
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/quote"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-voice-changer\",\n \"duration_seconds\": 60\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/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-voice-changer\",\n \"duration_seconds\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/audio/voice-changer/quote")
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 \"duration_seconds\": 60\n}"
response = http.request(request)
puts response.read_body{
"quote": 0.35,
"duration_seconds": 60
}{
"error": "<string>",
"details": {
"_errors": [],
"field": {
"_errors": [
"Field is required"
]
}
}
}{
"error": "<string>"
}