> ## 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.

# Music Identification

> Detect and identify music in audio and video content

The `music_identification` model analyzes audio or video content to determine when music is present and whether that music can be identified. It is designed for short-form content, automated highlights, and cue sheet workflows, with a focus on copyright compliance and music clearance.

## What the model provides

* Time-aligned detection of music within media
* Identification of recognizable music when possible
* A single, structured JSON output for review, export, and integration

## Create a Task

```python music_identification.py theme={null}
import requests

API_KEY = "your_api_key"
HEADERS = {"Content-Type": "application/json", "x-api-key": API_KEY}

response = requests.post(
    "https://api.audioshake.ai/tasks",
    headers=HEADERS,
    json={
        "assetId": "your_asset_id",
        "targets": [
            {"model": "music_identification", "formats": ["json"]}
        ]
    }
)

task_id = response.json()["id"]
print(f"Task created: {task_id}")
```

```javascript musicIdentification.js theme={null}
const API_KEY = "your_api_key";
const headers = { "Content-Type": "application/json", "x-api-key": API_KEY };

const createRes = await fetch("https://api.audioshake.ai/tasks", {
  method: "POST",
  headers,
  body: JSON.stringify({
    assetId: "your_asset_id",
    targets: [
      { model: "music_identification", formats: ["json"] }
    ]
  })
});

const { id: taskId } = await createRes.json();
console.log(`Task created: ${taskId}`);
```

```bash curl theme={null}
curl -X POST "https://api.audioshake.ai/tasks" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $AUDIOSHAKE_API_KEY" \
  -d '{
    "assetId": "your_asset_id",
    "targets": [
      { "model": "music_identification", "formats": ["json"] }
    ]
  }'
```

[Check Task status](https://developer.audioshake.ai/check-task-status.md) to monitor progress and download results, or use [webhooks](https://developer.audioshake.ai/api-reference/tasks/webhooks.md) to be notified when each target completes.

## Example response

```json theme={null}
{
  "events": [
    {
      "start_time_s": 0.0,
      "end_time_s": 10.0,
      "music_detected": true,
      "music_identified": false,
      "detection_confidence": 0.70
    },
    {
      "start_time_s": 12.0,
      "end_time_s": 18.0,
      "music_detected": true,
      "music_identified": true,
      "detection_confidence": 0.99,
      "identification_confidence": 0.76,
      "title": "Schön Rosmarin",
      "artists": [
        "Gil Shaham",
        "Orpheus Chamber Orchestra"
      ],
      "album": "Violin Romances",
      "label": "Deutsche Grammophon",
      "release_date": "1996-09-02",
      "isrc": "DEF059503430"
    }
  ]
}
```

## Event fields

| Field | Description |
| - | - |
| `start_time_s` | Start time of the event (seconds) |
| `end_time_s` | End time of the event (seconds) |
| `music_detected` | Whether music is present |
| `music_identified` | Whether the music was identified |
| `detection_confidence` | Confidence score for music detection |
| `identification_confidence` | Confidence score for identification (when available) |
| `title` | Track title (if identified) |
| `artists` | Performing artist(s) |
| `album` | Album name |
| `label` | Record label |
| `release_date` | Release date |
| `isrc` | ISRC code |

Identification fields are only included when music is successfully identified.

## Use cases

* Verify whether music appears in media
* Understand when music occurs and for how long
* Support music clearance and publishing decisions
* Automate cue sheet generation for broadcast


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.