Documentation Index
Fetch the complete documentation index at: https://docs.soundpiece.co/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Every Soundpiece operation follows the same pattern:- Submit a request — receive an operation
idandstatus: processing. - Poll the same endpoint (or wait for a webhook) until
statusisreadyorfailed. - Download the audio using the signed URL in the response.
Step 1: Get your API key
API keys are issued from your account dashboard. Each key comes paired with a webhook signing secret. Both are shown once at creation — save them somewhere safe. Keys start with the prefixspk_. Pass yours as a Bearer token on every request:
Step 2: Submit a song generation request
Pass anidempotency_key (a UUID you choose) so you can safely retry the request over an unreliable network.
id (operation id) is the handle you’ll use to fetch the result. Notice that the request you sent is echoed back on the response — useful for keeping the request and its outcome together without your own bookkeeping.
Step 3: Poll until the operation is ready
Call the same endpoint withGET and the operation id. Pass ?wait=true to long-poll for up to 20 seconds — the server returns as soon as the operation reaches ready or failed, or after 20 seconds if it is still running. Repeat until you get a terminal status.
outputs.
Step 4: Download the audio
Each output carries a signed URL you canGET to download the audio as a FLAC file (44.1 kHz). The URL is time-limited; check the expires_at field. If it has expired, call the GET endpoint again — we’ll generate a fresh URL.
That’s it. The same pattern applies to every endpoint:
PUT /v1/create.new_song— generate a song from lyrics + prompt or reference.PUT /v1/create.new_instrumental— generate an instrumental from a prompt or reference.PUT /v1/create.new_sample— generate a short sample at a target duration.PUT /v1/create.new_fx— generate a one-shot effect.PUT /v1/create.remix_song— remix an existing song (with vocals/lyrics) into new song variations, guided bylyricsandprompt.PUT /v1/create.remix_instrumental— remix an existing instrumental track into new instrumental variations.PUT /v1/adapt.separate_stems— separate a track into vocals, drums, bass, other.PUT /v1/adapt.auto_cut_down— trim a track to a target duration at musically natural cut points.
