Skip to main content

Server to Server API

Separate any music track–even mono-track recordings–into stems and instrumentals, for use in sync licensing, immersive mixes, AR/VR, gaming, fitness, UGC, karaoke, and more. From creating stems for catalogs in bulk, through to powering interactive audio in AR apps, AudioShake’s award-winning stem separation is helping power the next wave of audio experiences. See more uses of AudioShake’s AI music stems here.

File Upload

Before creating a job, you must upload a file. The response contains the ID of the uploaded file, which you can use to create a job request to generate a stem.

Further documentation on uploading files can be found here

Create Job

Once you have the asset ID, you can create a job request to generate a stem using the /jobs endpoint. The endpoint accepts a JSON request with the file ID and the stem type you want to generate. You can choose from a variety of stem types, including vocals, drums, bass, and more.

In this example, the Authorization header contains a JWT token for Bearer Authentication, which is used to authenticate the request. The Content-Type header specifies that the request payload is in JSON format. The request payload contains the assetId, format, and stemName parameters, which specify the details of the stem to be generated.

curl -L -X POST 'https://groovy.audioshake.ai/job/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"metadata": {
"format": "wav",
"name": "vocals"
},
"callbackUrl": "https://example.com/webhook/vocals",
"assetId": "abc123"
}'

Upon successful initiation, the server will reply with an HTTP status code of 200, indicating that everything is OK. The response will include a 'job' object, which contains details about the job that has been started.You can use the provided job ID in two ways:

  1. Wait for a callback from AudioShake, which will be sent upon completion or status update of the job.
  2. Periodically check the status of the job by polling using the job id.
{
job: {
id: "clmgndrvo001neumu6nr7gt9i",
clientId: "<YOUR CLIENT ID>",
requestId: "clmgndrvo001neumu6nr7gt9i",
metadata: {
format: "wav",
name: "vocals"
},
callbackUrl: "https://example.com/webhook/vocals",
assetId: "abc123"
},
}

Get Job

After you have created a job request, you can retrieve the results by making a GET request to the /jobs/{job_id} endpoint, where job_id is the ID of the job that you created. Here is an example of a curl command that retrieves the results of a job request:

curl -L -X GET 'https://groovy.audioshake.ai/job/:id' \
-H 'Authorization: Bearer <TOKEN>'

Here's an example of what the response looks like:

{
job: {
id: "clmgndrvo001neumu6nr7gt9i",
clientId: "<YOUR CLIENT ID>",
createdAt: "2023-09-12T18:29:50.072Z",
startedAt: "2023-09-12T18:29:50.135Z",
updatedAt: "2023-09-12T18:30:28.155Z",
requestId: "clmgndrvo001neumu6nr7gt9i",
licenseId: "<YOUR LICENSE ID>",
metadata: {
format: "mp3",
name: "vocals",
},
callbackUrl: "<YOUR CALLBACK URL>",
status: "completed",
statusInfo: {},
sourceAsset: {
name: "<Your-File.mp3>",
id: "clmgn7nkg50527f0mulbhwi6z8",
fileType: "audio/mpeg",
format: "mp3",
link: "<LINK TO FILE>",
},
outputAssets: [
{
name: "vocals.mp3",
id: "clmgnel9q50619f0mud8lhjlwq",
fileType: "audio/mpeg",
format: "mp3",
link: "<LINK TO GENERATED FILE>",
},
],
},
}