## Make your first API call

1. **Create an account**  
   Sign up at [dashboard.audioshake.ai](https://dashboard.audioshake.ai/auth/sign-up/). You’ll get 10 free credits to start building immediately.

2. **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.

3. **Create your first Task**  
   A Task runs one or more [models](https://developer.audioshake.ai/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.

4. **Check Task status**  
   Tasks process asynchronously. Poll until each target’s `status` is `completed` or `error`:
   
   ```
   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.](https://developer.audioshake.ai/models)

[**Instrument Separation** \  
 Isolate vocals, drums, bass, and more.](https://developer.audioshake.ai/separate-stems)

[**Webhooks** \  
 Get notified when targets complete instead of polling.](https://developer.audioshake.ai/api-reference/tasks/webhooks)

[**API Reference** \  
 Full endpoint reference.](https://developer.audioshake.ai/api-reference/authentication)
