Queue Audio Generation
Queue a new audio generation request.
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/queue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-music",
"prompt": "A warm spoken narration introducing a product launch.",
"lyrics_prompt": "Verse 1: Walking through the city lights...",
"duration_seconds": 60,
"force_instrumental": false,
"lyrics_optimizer": false,
"loop": false,
"voice": "Aria",
"language_code": "en",
"speed": 1,
"reference_audio_urls": [
"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA"
]
}
'import requests
url = "https://api.venice.ai/api/v1/audio/queue"
payload = {
"model": "elevenlabs-music",
"prompt": "A warm spoken narration introducing a product launch.",
"lyrics_prompt": "Verse 1: Walking through the city lights...",
"duration_seconds": 60,
"force_instrumental": False,
"lyrics_optimizer": False,
"loop": False,
"voice": "Aria",
"language_code": "en",
"speed": 1,
"reference_audio_urls": ["data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA"]
}
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-music',
prompt: 'A warm spoken narration introducing a product launch.',
lyrics_prompt: 'Verse 1: Walking through the city lights...',
duration_seconds: 60,
force_instrumental: false,
lyrics_optimizer: false,
loop: false,
voice: 'Aria',
language_code: 'en',
speed: 1,
reference_audio_urls: [
'data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA'
]
})
};
fetch('https://api.venice.ai/api/v1/audio/queue', 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/queue",
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-music',
'prompt' => 'A warm spoken narration introducing a product launch.',
'lyrics_prompt' => 'Verse 1: Walking through the city lights...',
'duration_seconds' => 60,
'force_instrumental' => false,
'lyrics_optimizer' => false,
'loop' => false,
'voice' => 'Aria',
'language_code' => 'en',
'speed' => 1,
'reference_audio_urls' => [
'data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA'
]
]),
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/queue"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-music\",\n \"prompt\": \"A warm spoken narration introducing a product launch.\",\n \"lyrics_prompt\": \"Verse 1: Walking through the city lights...\",\n \"duration_seconds\": 60,\n \"force_instrumental\": false,\n \"lyrics_optimizer\": false,\n \"loop\": false,\n \"voice\": \"Aria\",\n \"language_code\": \"en\",\n \"speed\": 1,\n \"reference_audio_urls\": [\n \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA\"\n ]\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/queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-music\",\n \"prompt\": \"A warm spoken narration introducing a product launch.\",\n \"lyrics_prompt\": \"Verse 1: Walking through the city lights...\",\n \"duration_seconds\": 60,\n \"force_instrumental\": false,\n \"lyrics_optimizer\": false,\n \"loop\": false,\n \"voice\": \"Aria\",\n \"language_code\": \"en\",\n \"speed\": 1,\n \"reference_audio_urls\": [\n \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/audio/queue")
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-music\",\n \"prompt\": \"A warm spoken narration introducing a product launch.\",\n \"lyrics_prompt\": \"Verse 1: Walking through the city lights...\",\n \"duration_seconds\": 60,\n \"force_instrumental\": false,\n \"lyrics_optimizer\": false,\n \"loop\": false,\n \"voice\": \"Aria\",\n \"language_code\": \"en\",\n \"speed\": 1,\n \"reference_audio_urls\": [\n \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"model": "elevenlabs-music",
"queue_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "QUEUED"
}{
"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": "<string>",
"suggested_prompt": "A cinematic instrumental track inspired by stormy weather and dramatic tension."
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}/audio/quote to estimate cost, then poll /audio/retrieve with the returned queue_id until the generation finishes. If you keep generated media after retrieval, call /audio/complete once you have downloaded it. Voice-changer models use /audio/voice-changer/queue instead.
Postman Collection
For additional examples, please see this Postman Collection.Authorizations
Body
Optional reference audio clips. Only supported when /models reports supports_reference_audios=true; send at most max_reference_audios clips. Refer to them in the prompt in order as @Audio1, @Audio2, and so on. Each clip must be audio without video, at most 30 seconds and 10 MB, sent as a base64 data URL (for example data:audio/mpeg;base64,...). http(s) URLs are not supported. All clips together must be at most about 22 MB. Cannot be combined with a preset voice; omit voice or set it to Describe in prompt.
[
"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA"
]
Response
Audio generation request queued successfully
Was this page helpful?
curl --request POST \
--url https://api.venice.ai/api/v1/audio/queue \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-music",
"prompt": "A warm spoken narration introducing a product launch.",
"lyrics_prompt": "Verse 1: Walking through the city lights...",
"duration_seconds": 60,
"force_instrumental": false,
"lyrics_optimizer": false,
"loop": false,
"voice": "Aria",
"language_code": "en",
"speed": 1,
"reference_audio_urls": [
"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA"
]
}
'import requests
url = "https://api.venice.ai/api/v1/audio/queue"
payload = {
"model": "elevenlabs-music",
"prompt": "A warm spoken narration introducing a product launch.",
"lyrics_prompt": "Verse 1: Walking through the city lights...",
"duration_seconds": 60,
"force_instrumental": False,
"lyrics_optimizer": False,
"loop": False,
"voice": "Aria",
"language_code": "en",
"speed": 1,
"reference_audio_urls": ["data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA"]
}
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-music',
prompt: 'A warm spoken narration introducing a product launch.',
lyrics_prompt: 'Verse 1: Walking through the city lights...',
duration_seconds: 60,
force_instrumental: false,
lyrics_optimizer: false,
loop: false,
voice: 'Aria',
language_code: 'en',
speed: 1,
reference_audio_urls: [
'data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA'
]
})
};
fetch('https://api.venice.ai/api/v1/audio/queue', 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/queue",
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-music',
'prompt' => 'A warm spoken narration introducing a product launch.',
'lyrics_prompt' => 'Verse 1: Walking through the city lights...',
'duration_seconds' => 60,
'force_instrumental' => false,
'lyrics_optimizer' => false,
'loop' => false,
'voice' => 'Aria',
'language_code' => 'en',
'speed' => 1,
'reference_audio_urls' => [
'data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA'
]
]),
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/queue"
payload := strings.NewReader("{\n \"model\": \"elevenlabs-music\",\n \"prompt\": \"A warm spoken narration introducing a product launch.\",\n \"lyrics_prompt\": \"Verse 1: Walking through the city lights...\",\n \"duration_seconds\": 60,\n \"force_instrumental\": false,\n \"lyrics_optimizer\": false,\n \"loop\": false,\n \"voice\": \"Aria\",\n \"language_code\": \"en\",\n \"speed\": 1,\n \"reference_audio_urls\": [\n \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA\"\n ]\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/queue")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"elevenlabs-music\",\n \"prompt\": \"A warm spoken narration introducing a product launch.\",\n \"lyrics_prompt\": \"Verse 1: Walking through the city lights...\",\n \"duration_seconds\": 60,\n \"force_instrumental\": false,\n \"lyrics_optimizer\": false,\n \"loop\": false,\n \"voice\": \"Aria\",\n \"language_code\": \"en\",\n \"speed\": 1,\n \"reference_audio_urls\": [\n \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venice.ai/api/v1/audio/queue")
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-music\",\n \"prompt\": \"A warm spoken narration introducing a product launch.\",\n \"lyrics_prompt\": \"Verse 1: Walking through the city lights...\",\n \"duration_seconds\": 60,\n \"force_instrumental\": false,\n \"lyrics_optimizer\": false,\n \"loop\": false,\n \"voice\": \"Aria\",\n \"language_code\": \"en\",\n \"speed\": 1,\n \"reference_audio_urls\": [\n \"data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"model": "elevenlabs-music",
"queue_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "QUEUED"
}{
"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": "<string>",
"suggested_prompt": "A cinematic instrumental track inspired by stormy weather and dramatic tension."
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}