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

> Remove background music while preserving speech and effects

Strip background music from any audio or video content while keeping speech and sound effects intact. Use this for cleaning up interviews with music beds, preparing content for re-editing, or isolating non-musical audio.

## Create a Task

<CodeGroup>
  ```python music_removal.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_removal", "formats": ["wav"]}
          ]
      }
  )

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

  ```javascript musicRemoval.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_removal", formats: ["wav"] }
      ]
    })
  });

  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_removal", "formats": ["wav"] }
      ]
    }'
  ```
</CodeGroup>

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

## Use cases

* Clean up interviews or podcasts that have background music beds
* Prepare broadcast content for re-editing or archival
* Remove music from sports commentary for international distribution
* Preprocess audio before speech-to-text for better accuracy

<CardGroup cols={2}>
  <Card title="Music Detection" icon="magnifying-glass" href="/detect-music-in-content">
    Find where music appears before removing it.
  </Card>

  <Card title="Dialogue Separation" icon="film" href="/remove-dialogue-for-dubbing">
    Separate dialogue from effects and music instead.
  </Card>
</CardGroup>
