curl --request PUT \
--url https://api.soundpiece.co/v1/create.remix_song \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"url": "<string>"
},
"lyrics": "<string>",
"prompt": "<string>",
"callback_url": "<string>",
"n_variations": 1,
"loudness": {
"target_lufs": -14,
"allow_compression": true
}
}
'import requests
url = "https://api.soundpiece.co/v1/create.remix_song"
payload = {
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": { "url": "<string>" },
"lyrics": "<string>",
"prompt": "<string>",
"callback_url": "<string>",
"n_variations": 1,
"loudness": {
"target_lufs": -14,
"allow_compression": True
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: {url: '<string>'},
lyrics: '<string>',
prompt: '<string>',
callback_url: '<string>',
n_variations: 1,
loudness: {target_lufs: -14, allow_compression: true}
})
};
fetch('https://api.soundpiece.co/v1/create.remix_song', 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.soundpiece.co/v1/create.remix_song",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source' => [
'url' => '<string>'
],
'lyrics' => '<string>',
'prompt' => '<string>',
'callback_url' => '<string>',
'n_variations' => 1,
'loudness' => [
'target_lufs' => -14,
'allow_compression' => true
]
]),
CURLOPT_HTTPHEADER => [
"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.soundpiece.co/v1/create.remix_song"
payload := strings.NewReader("{\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": {\n \"url\": \"<string>\"\n },\n \"lyrics\": \"<string>\",\n \"prompt\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"n_variations\": 1,\n \"loudness\": {\n \"target_lufs\": -14,\n \"allow_compression\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.soundpiece.co/v1/create.remix_song")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": {\n \"url\": \"<string>\"\n },\n \"lyrics\": \"<string>\",\n \"prompt\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"n_variations\": 1,\n \"loudness\": {\n \"target_lufs\": -14,\n \"allow_compression\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.soundpiece.co/v1/create.remix_song")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": {\n \"url\": \"<string>\"\n },\n \"lyrics\": \"<string>\",\n \"prompt\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"n_variations\": 1,\n \"loudness\": {\n \"target_lufs\": -14,\n \"allow_compression\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"remixed_song": {
"id": "<string>",
"status": "processing",
"created_at": "2023-11-07T05:31:56Z",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lyrics": "<string>",
"prompt": "<string>",
"n_variations": 2,
"loudness": {
"target_lufs": -14,
"allow_compression": true
},
"outputs": [
{
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"duration": 123,
"loudness": {
"lufs": 123,
"true_peak_dbtp": 123,
"compressed": true
}
}
],
"error": {
"code": "internal_error",
"message": "<string>"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}create.remix_song
Submit a song remix request.
Returns immediately with status: processing. Use the matching GET to
poll for completion, or supply a callback_url to receive a webhook.
Takes an existing song with vocals/lyrics and produces new song
variations of it, guided by the lyrics and prompt you supply. For
remixing an instrumental track (no vocals), use
create.remix_instrumental instead: a source with no recognisable vocals
fails the operation with source_has_no_vocals. Set n_variations (1-3) for how
many variations to produce — each appears as a separate entry in
outputs when the operation is ready.
Add the optional loudness block to have every variation normalised to a
target integrated loudness, at no extra cost — see loudness.
Credits cost: 3 per variation (so n_variations: 2 costs 6).
Insufficient credits returns 402 — see errors.
curl --request PUT \
--url https://api.soundpiece.co/v1/create.remix_song \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"url": "<string>"
},
"lyrics": "<string>",
"prompt": "<string>",
"callback_url": "<string>",
"n_variations": 1,
"loudness": {
"target_lufs": -14,
"allow_compression": true
}
}
'import requests
url = "https://api.soundpiece.co/v1/create.remix_song"
payload = {
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": { "url": "<string>" },
"lyrics": "<string>",
"prompt": "<string>",
"callback_url": "<string>",
"n_variations": 1,
"loudness": {
"target_lufs": -14,
"allow_compression": True
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source: {url: '<string>'},
lyrics: '<string>',
prompt: '<string>',
callback_url: '<string>',
n_variations: 1,
loudness: {target_lufs: -14, allow_compression: true}
})
};
fetch('https://api.soundpiece.co/v1/create.remix_song', 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.soundpiece.co/v1/create.remix_song",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'source' => [
'url' => '<string>'
],
'lyrics' => '<string>',
'prompt' => '<string>',
'callback_url' => '<string>',
'n_variations' => 1,
'loudness' => [
'target_lufs' => -14,
'allow_compression' => true
]
]),
CURLOPT_HTTPHEADER => [
"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.soundpiece.co/v1/create.remix_song"
payload := strings.NewReader("{\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": {\n \"url\": \"<string>\"\n },\n \"lyrics\": \"<string>\",\n \"prompt\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"n_variations\": 1,\n \"loudness\": {\n \"target_lufs\": -14,\n \"allow_compression\": true\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.soundpiece.co/v1/create.remix_song")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": {\n \"url\": \"<string>\"\n },\n \"lyrics\": \"<string>\",\n \"prompt\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"n_variations\": 1,\n \"loudness\": {\n \"target_lufs\": -14,\n \"allow_compression\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.soundpiece.co/v1/create.remix_song")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"source\": {\n \"url\": \"<string>\"\n },\n \"lyrics\": \"<string>\",\n \"prompt\": \"<string>\",\n \"callback_url\": \"<string>\",\n \"n_variations\": 1,\n \"loudness\": {\n \"target_lufs\": -14,\n \"allow_compression\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"remixed_song": {
"id": "<string>",
"status": "processing",
"created_at": "2023-11-07T05:31:56Z",
"idempotency_key": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lyrics": "<string>",
"prompt": "<string>",
"n_variations": 2,
"loudness": {
"target_lufs": -14,
"allow_compression": true
},
"outputs": [
{
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"duration": 123,
"loudness": {
"lufs": 123,
"true_peak_dbtp": 123,
"compressed": true
}
}
],
"error": {
"code": "internal_error",
"message": "<string>"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
A unique UUID you choose. Send the same key to retry safely; we'll return the original response without doing the work again.
The song (with vocals) to remix. The audio must be a WAV, MP3, or FLAC file between 10 seconds and 5 minutes long, and at most 50 MB.
Show child attributes
Show child attributes
Song lyrics. Use [Verse], [Chorus], [Bridge], [Intro], [Outro], [Instrumental] section markers on their own line to structure the song. Each subsequent line within a section is a separate vocal line.
Example:
[Verse]
This is a demo song, don't get too excited
Wrote it in me lounge while slightly half-sighted
[Chorus]
It's only a demo, keep your hopes low
Recorded it once, then decided "that'll go"
1 - 3000Free-text description of the audio to generate. Mix tags, a description of the desired mood and instrumentation, and a scene — use commas to separate tags. Examples: rock song, energetic, male vocal (song), synthwave, melancholic, mid-tempo (instrumental), rock, guitar, energetic, no drums (sample), someone typing on a keyboard (effect).
1 - 1024Optional HTTPS URL we'll POST the final response to when the operation reaches ready or failed. Polling remains the canonical source of truth; webhooks are a best-effort latency optimisation.
1 - 2048How many output variations to produce (1-3).
1 <= x <= 3Optional. Normalise every output to a target integrated loudness. Leave it out for outputs exactly as produced; send {} for the defaults (-14 LUFS, compression allowed). Normalising costs no extra credits. Each ready output then reports the loudness measured on it. See loudness.
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
