> ## Documentation Index
> Fetch the complete documentation index at: https://developer.audioshake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Legacy API Reference

> Reference documentation for the legacy Jobs API (groovy.audioshake.ai)

<Warning>
  AudioShake is migrating all customers to the [Tasks API](/quickstart). This page is provided for reference only. New integrations should use the Tasks API.
</Warning>

The legacy API is hosted at `https://groovy.audioshake.ai` and uses a Jobs-based model where **one job processes one model against one audio file**. If you are starting a new integration, use the [Tasks API](/api-reference/authentication) instead.

## Authentication

All requests require a `Bearer` token in the `Authorization` header.

```
Authorization: Bearer YOUR_API_TOKEN
```

Contact [support@audioshake.ai](mailto:support@audioshake.ai) to obtain a legacy API token. Never store tokens in client-side code. If a token is compromised, contact support to invalidate it immediately.

## Upload a file

Before creating a job, upload your audio file to receive an asset ID.

### Upload from disk

```bash theme={null}
curl -X POST "https://groovy.audioshake.ai/upload" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: multipart/form-data" \
  -H "Accept: application/json" \
  -F 'file=@song.mp3;type=audio/mpeg'
```

### Upload from URL

```bash theme={null}
curl -X POST "https://groovy.audioshake.ai/upload/link" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "link": "https://example.com/audio.mp3",
    "name": "song"
  }'
```

### Upload response

```json theme={null}
{
  "name": "song",
  "id": "clyxaywtp00ne0jpi4nf435dv",
  "fileType": "audio/mpeg",
  "format": "mp3",
  "link": "https://..."
}
```

Save the `id` — you will use it as `assetId` when creating a job.

## Create a job

Each job runs **one model** against one asset. The model name and output format are specified inside the `metadata` object.

```bash theme={null}
curl -X POST "https://groovy.audioshake.ai/job" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "metadata": {
      "format": "wav",
      "name": "vocals"
    },
    "assetId": "clyxaywtp00ne0jpi4nf435dv",
    "callbackUrl": "https://your-app.com/webhooks"
  }'
```

To process multiple models (for example, vocals + instrumental + drums), submit a separate job for each.

### Job request fields

| Field             | Description                                                           |
| ----------------- | --------------------------------------------------------------------- |
| `metadata.name`   | Model name (for example, `vocals`, `instrumental`, `music_detection`) |
| `metadata.format` | Output file format: `wav`, `mp3`, or `json`                           |
| `assetId`         | Asset ID returned from file upload                                    |
| `callbackUrl`     | Optional. URL to receive a webhook when the job completes             |

### Job response

```json theme={null}
{
  "job": {
    "id": "<job-id>",
    "clientId": "<your-client-id>",
    "requestId": "<request-id>",
    "metadata": {
      "format": "wav",
      "name": "vocals"
    },
    "assetId": "clyxaywtp00ne0jpi4nf435dv",
    "status": "queued"
  }
}
```

Save the `job.id` to poll for status.

## Check job status

```bash theme={null}
curl -X GET "https://groovy.audioshake.ai/job/<job-id>" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
```

When `status` is `completed`, the response includes an `outputAssets` array with download links.

## Music detection

The `music_detection` model returns a JSON array of time ranges where music is present.

```bash theme={null}
curl -X POST "https://groovy.audioshake.ai/job" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "format": "json",
      "name": "music_detection"
    },
    "assetId": "<asset-id>"
  }'
```

Output format:

```json theme={null}
[
  {
    "start_time": 20.0,
    "end_time": 30.0,
    "confidence": 0.179
  }
]
```

Confidence values closer to `1` indicate higher certainty that music is present.

## Check usage

```bash theme={null}
curl -X GET "https://groovy.audioshake.ai/usage" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

Returns the last 3 months of usage:

```json theme={null}
{
  "clientId": "<your-client-id>",
  "usage": [
    {
      "month": "2026-03",
      "totalJobs": 412,
      "totalMinutes": 823.5
    }
  ]
}
```

## Migrating to the Tasks API

See [Migrating from Jobs](/migrating-from-jobs) for a step-by-step guide.
