# A complete program that also waits for the result and downloads it:
# https://docs.soundpiece.co/guides/create/new_instrumental
# One key per job: keep it, and send the same key if you retry.
IDEMPOTENCY_KEY=$(uuidgen)
curl --request PUT \
--url https://api.soundpiece.co/v1/create.new_instrumental \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"idempotency_key": "$IDEMPOTENCY_KEY",
"prompt": "synthwave, melancholic, mid-tempo"
}
EOF# A complete program that also waits for the result and downloads it:
# https://docs.soundpiece.co/guides/create/new_instrumental
import uuid
import requests
url = "https://api.soundpiece.co/v1/create.new_instrumental"
# One key per job: keep it, and send the same key if you retry.
idempotency_key = str(uuid.uuid4())
payload = {
"idempotency_key": idempotency_key,
"prompt": "synthwave, melancholic, mid-tempo",
}
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, json=payload, headers=headers, timeout=30)
print(response.json())// A complete program that also waits for the result and downloads it:
// https://docs.soundpiece.co/guides/create/new_instrumental
import { randomUUID } from "node:crypto";
// One key per job: keep it, and send the same key if you retry.
const idempotencyKey = randomUUID();
const response = await fetch("https://api.soundpiece.co/v1/create.new_instrumental", {
method: "PUT",
headers: {Authorization: "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({
idempotency_key: idempotencyKey,
prompt: "synthwave, melancholic, mid-tempo",
}),
});
console.log(await response.json());{
"instrumental": {
"id": "op_01m3vcs7e0f8rsq32d5sqhmetw",
"status": "processing",
"created_at": "2026-10-01T09:30:00Z",
"idempotency_key": "3f2b8c1e-9d4a-4e7b-b6c5-1a2d3e4f5a6b",
"prompt": null,
"n_variations": 2,
"outputs": null,
"error": null
}
}create.new_instrumental (submit)
Submit an instrumental generation request.
Returns immediately with status: processing. Use the matching GET to
poll for completion, or supply a callback_url to receive a webhook.
Instrumentals (no vocals) are generated from either a text prompt or a
reference track URL. 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, given in LUFS or as a named preset (streaming,
podcast or broadcast), at no extra cost — see loudness.
Credits cost: 3 per variation (so n_variations: 2 costs 6).
Insufficient credits returns 402 — see errors.
# A complete program that also waits for the result and downloads it:
# https://docs.soundpiece.co/guides/create/new_instrumental
# One key per job: keep it, and send the same key if you retry.
IDEMPOTENCY_KEY=$(uuidgen)
curl --request PUT \
--url https://api.soundpiece.co/v1/create.new_instrumental \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"idempotency_key": "$IDEMPOTENCY_KEY",
"prompt": "synthwave, melancholic, mid-tempo"
}
EOF# A complete program that also waits for the result and downloads it:
# https://docs.soundpiece.co/guides/create/new_instrumental
import uuid
import requests
url = "https://api.soundpiece.co/v1/create.new_instrumental"
# One key per job: keep it, and send the same key if you retry.
idempotency_key = str(uuid.uuid4())
payload = {
"idempotency_key": idempotency_key,
"prompt": "synthwave, melancholic, mid-tempo",
}
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, json=payload, headers=headers, timeout=30)
print(response.json())// A complete program that also waits for the result and downloads it:
// https://docs.soundpiece.co/guides/create/new_instrumental
import { randomUUID } from "node:crypto";
// One key per job: keep it, and send the same key if you retry.
const idempotencyKey = randomUUID();
const response = await fetch("https://api.soundpiece.co/v1/create.new_instrumental", {
method: "PUT",
headers: {Authorization: "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({
idempotency_key: idempotencyKey,
prompt: "synthwave, melancholic, mid-tempo",
}),
});
console.log(await response.json());{
"instrumental": {
"id": "op_01m3vcs7e0f8rsq32d5sqhmetw",
"status": "processing",
"created_at": "2026-10-01T09:30:00Z",
"idempotency_key": "3f2b8c1e-9d4a-4e7b-b6c5-1a2d3e4f5a6b",
"prompt": null,
"n_variations": 2,
"outputs": null,
"error": null
}
}Authorizations
Body
- From a reference
- From a prompt
Optional 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 - 2048"https://example.com/webhooks/soundpiece"
