Skip to main content
POST
/
tasks
Create Task
curl --request POST \
  --url https://api.audioshake.ai/tasks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "assetId": "your_asset_id",
  "targets": [
    {
      "model": "vocals",
      "formats": [
        "wav"
      ]
    },
    {
      "model": "instrumental",
      "formats": [
        "wav"
      ]
    }
  ]
}
'
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "completedAt": "2023-11-07T05:31:56Z",
  "clientId": "<string>",
  "cost": 123,
  "assetId": "<string>",
  "url": "<string>",
  "metadata": "<string>",
  "targets": [
    {
      "id": "<string>",
      "model": "<string>",
      "status": "processing",
      "formats": [
        "<string>"
      ],
      "output": [
        {
          "name": "<string>",
          "format": "<string>",
          "link": "<string>"
        }
      ],
      "cost": 123,
      "error": {
        "code": 123,
        "message": "<string>"
      },
      "duration": 123,
      "residual": true,
      "language": "<string>",
      "transcriptUrl": "<string>",
      "transcriptAssetId": "<string>"
    }
  ]
}
Submit a media source and up to 20 model targets for processing. Each target specifies a model and output format. Provide exactly one source — either a public url or an assetId from a previous upload.

Examples

Separate vocals and instrumental:
{
  "assetId": "your_asset_id",
  "targets": [
    { "model": "vocals", "formats": ["wav"] },
    { "model": "instrumental", "formats": ["wav"] }
  ]
}
Transcribe lyrics:
{
  "assetId": "your_asset_id",
  "targets": [
    { "model": "transcription", "formats": ["json"] }
  ]
}

Checking results

Tasks process asynchronously. The response returns a Task id you can use to check progress:
1

Task is created

Each target begins in processing status.
2

Check for completion

Call Get Task by ID and check each target’s status. When a target finishes, its status becomes completed (with output download links) or error.
Use webhooks to get notified when a Task completes instead of polling.

Authorizations

x-api-key
string
header
required

Body

application/json
assetId
string
required

Asset ID of an input media file

targets
object[]
required

One or more model targets to process

Required array length: 1 - 20 elements
metadata
string

Client-provided metadata. Stored and returned as-is in responses and webhooks.

Maximum string length: 4096

Response

200 - application/json

Default Response

id
string

Unique identifier of the Task

createdAt
string<date-time>

Timestamp of when the Task was created

completedAt
string<date-time> | null

Timestamp of when the Task was completed

clientId
string

Unique identifier of the client

cost
number

Processing cost in credits

assetId
string

Asset ID of an input media file. Mutually exclusive with url

url
string | null

URL of an input media file. Mutually exclusive with assetId

metadata
string

Client-provided metadata. Stored and returned as-is in responses and webhooks.

targets
object[]

Processing targets and their current status