api, userAddress, and the returned songId are available. api includes the session token and selected account headers.
Add an instrument
trackName and Base mode. prompt describes the part; globalCaption describes the song. Use trackClasses for instrument groups.
To layer against a mixed arrangement, render that context, upload it and set srcAudioUrl. A list of legoContextTrackIds does not replace audible source context. The /layer shortcut is available when you do not need seed, BPM, key or language controls.
Create accompaniment
srcAudioUrl or the target stemId. Accompany also requires Base mode.
Use the polling function from job handling.
taskId, songId, task, and optional stemId. A polling timeout stops your client from waiting; it does not cancel the job.
A Layer candidate can become its own stem through base activation, leaving the master in place. To combine a Layer with Master permanently, render the original plus the candidate and use the composition merge flow.