Quickstart - AudioShake Developers
Make your first API call
Create an account
Sign up at dashboard.audioshake.ai. You’ll get 10 free credits to start building immediately.Create an API key
In the dashboard, go to Settings > API Keys and click Create new key. Copy and store the key — you will not be able to view it again.Create your first Task
A Task runs one or more models against a media source. This example separates a track into vocals and instrumental:curl -X POST "https://api.audioshake.ai/tasks" \ -H "Content-Type: application/json" \ -H "x-api-key: your_api_key" \ -d '{\n "url": "https://demos.audioshake.ai/demo-assets/shakeitup.mp3",\n "targets": [\ { "model": "vocals", "formats": ["wav"] },\ { "model": "instrumental", "formats": ["wav"] }\ ]\n }'
import requests
response = requests.post(
"https://api.audioshake.ai/tasks",
headers={
"Content-Type": "application/json",
"x-api-key": "your_api_key"
},
json={
"url": "https://demos.audioshake.ai/demo-assets/shakeitup.mp3",
"targets": [\
{"model": "vocals", "formats": ["wav"]},\
{"model": "instrumental", "formats": ["wav"]}\
]
}
)
print(response.json()["id"])
const response = await fetch("https://api.audioshake.ai/tasks", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "your_api_key"
},
body: JSON.stringify({
url: "https://demos.audioshake.ai/demo-assets/shakeitup.mp3",
targets: [\
{ model: "vocals", formats: ["wav"] },\
{ model: "instrumental", formats: ["wav"] }\
]
})
});
const task = await response.json();
console.log(task.id);
Save the id from the response.
Check Task status
Tasks process asynchronously. Poll until each target’sstatusiscompletedorerror:curl "https://api.audioshake.ai/tasks/<task-id>" \ -H "x-api-key: your_api_key"task = requests.get( f"https://api.audioshake.ai/tasks/{task_id}", headers={"x-api-key": "your_api_key"} ).json()
for target in task["targets"]: print(f"{target['model']}: {target['status']}")
const res = await fetch(https://api.audioshake.ai/tasks/${taskId}, {
headers: { "x-api-key": "your_api_key" }
});
const task = await res.json();
for (const target of task.targets) {
console.log(${target.model}: ${target.status});
}
Each completed target includes an `output` array with download links.
Output download links expire after one hour. Download and store files in your own storage.
Use [webhooks](https://developer.audioshake.ai/api-reference/tasks/webhooks) to get notified when targets complete instead of polling.
## Using a local file
Upload your file first with [Upload File](https://developer.audioshake.ai/api-reference/assets/upload), then use the returned `assetId` instead of `url`:
```json
{
"assetId": "your_asset_id",
"targets": [\
{ "model": "vocals", "formats": ["wav"] },\
{ "model": "instrumental", "formats": ["wav"] }\
]
}
What’s next?
Models \
Browse all available models.
Instrument Separation \
Isolate vocals, drums, bass, and more.
Webhooks \
Get notified when targets complete instead of polling.