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.
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
}
'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
}
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
})
};
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
]),
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}")
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}")
.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}"
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": "<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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The model to use for audio generation. Voice-changer models are not supported here; use the /api/v1/audio/voice-changer endpoints instead.
"elevenlabs-music"
The prompt describing the audio to generate. Minimum and maximum prompt lengths vary by model; inspect /models for min_prompt_length and prompt_character_limit.
1"A warm spoken narration introducing a product launch."
Optional lyrics/text for lyric-capable models. Required when /models reports lyrics_required=true; unsupported when /models reports supports_lyrics=false.
"Verse 1: Walking through the city lights..."
Optional duration hint in seconds. Only supported for models that expose duration metadata via /models. Accepts either an integer or a numeric string. If omitted, the model default duration is used when available.
x > 060
Optional instrumental toggle. Only supported when /models reports supports_force_instrumental=true.
false
When enabled, auto-generates lyrics from the prompt. Only supported when /models reports supports_lyrics_optimizer=true. lyrics_prompt must be empty when this is true.
false
Render the clip so its end splices back into its start without an audible seam. Only supported when /models reports supports_loop=true.
false
Optional voice selection for voice-enabled models. See /models?type=music for the model's supported voices and default_voice.
"Aria"
Optional ISO 639-1 language code. Only supported when /models reports supports_language_code=true.
"en"
Optional audio speed multiplier. Only supported when /models reports supports_speed=true; use the model-specific min_speed and max_speed values.
0.25 <= x <= 41
Response
Audio generation request queued successfully
The ID of the model used for audio generation. Voice-changer models are not supported on /api/v1/audio/retrieve or /api/v1/audio/complete; use the /api/v1/audio/voice-changer endpoints instead.
"elevenlabs-music"
The ID of the audio generation request. Use this to poll for status and retrieve the result.
"123e4567-e89b-12d3-a456-426614174000"
The status of the audio generation request.
QUEUED "QUEUED"
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
}
'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
}
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
})
};
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
]),
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}")
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}")
.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}"
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": "<string>",
"suggested_prompt": "A cinematic instrumental track inspired by stormy weather and dramatic tension."
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}