API Reference

Here you can find all the methods and properties of our API.

All requests to the Music AI API must be authenticated using an API key. The API key should be included in the Authorization header of each request. For more information about authentication, please refer to the Authentication documentation.

Summary

File upload

GET /upload Get a signed URL to upload a file to our temporary server.

Jobs

GET /job/:id Get a job by its ID.

GET /job/:id/status Get the status of a job by its ID.

GET /job Get all jobs.

POST /job Create a new job.

DELETE /job/:id Delete a job by its ID.

Workflows

GET /workflow Get all workflows.

Applications

GET /application Get the current application (API key).

File Upload

Prepare Upload GET /upload

Retrieves a signed URL to upload a file to our temporary server. For more information about uploading inputs, please refer to the Uploads documentation.

curl --request GET \
	--url https://api.music.ai/v1/upload \
	--header 'Authorization: your-api-key-here'

Response Fields

FieldTypeDescription
uploadUrlstringURL to upload the file to. This URL is temporary.
downloadUrlstringURL to download the file from after it has been uploaded. This URL is temporary.

Response Codes

CodeDescription
200Success
401Missing or invalid API key

Response Example

{
  "uploadUrl": "https://storage.googleapis.com/moises/939b7898b3ef?(...)X96cb5",
  "downloadUrl": "https://storage.googleapis.com/moises/939b7898b3ef?(...)SSScb5"
}

Jobs

A job represents a single processing task submitted to our AI pipeline. When you upload audio and request processing (like stem separation or audio enhancement), a job is created to handle that work asynchronously.

Each job contains your input parameters, tracks its progress, and stores the final results. Jobs are tied to your API key and can include custom metadata for organization.

Status

The status represents the job current state:

StatusDescription
QUEUEDAwaiting to start
STARTEDProcessing has started
SUCCEEDEDProcessing has completed and the results are ready
FAILEDAn error occurred during processing

Failure

When a job fails, it has a status of FAILED and an error object with the error reason.

Error fields:

FieldTypeDescription
codestringError code
titlestringSummary of the error
messagestringDetailed explanation of the error occurrence

Error codes:

CodeTitlePossible reason
BAD_INPUTInvalid inputThe input is invalid. Likely, the file was not uploaded or not completely uploaded; it is corrupted; it has an invalid format; or it doesn't meet requirements for the workflow.
TIMEOUTTimeoutTimeout reading the input file. If using a storage other than Music AI's, check if the server is reachable and the file is still available.
INTERNAL_ERRORInternal errorOur server encountered and error while running the job. Pleas try again. If the problem persists, contact support providing the job ID and parameters.

Get Job Information GET /job/:id

Retrieves information about a specific job by its ID.

curl --request GET \
	--url https://api.music.ai/v1/job/:id \
	--header 'Authorization: your-api-key-here'

Please note that this will only work for jobs that were created with the same API key being used on the request.

Parameters

ParameterTypeDescription
idstringThe unique identifier of the job to retrieve

Response Fields

FieldTypeDescription
idstringUnique identifier for the job
appstringName of the application that created this job
namestringHuman-readable name for the job
batchNamestring | nullOptional batch identifier if job was created as part of a batch
metadataobjectCustom metadata provided when creating the job
workflowstringName of the workflow used for processing
workflowParamsobjectInput parameters provided when creating the job
statusstringCurrent job status (QUEUED, STARTED, SUCCEEDED, FAILED)
resultobject | nullProcessing results (URLs to output files) when status is SUCCEEDED
errorobject | nullError details if the job failed, null otherwise
error.codestringError code
error.titlestringSummary of the error
error.messagestringDetailed explanation of the error occurrence
createdAtstringISO timestamp when job was created
startedAtstring | nullISO timestamp when processing started
completedAtstring | nullISO timestamp when processing completed

Response Codes

Status CodeDescription
200Job successfully retrieved
400Invalid job ID format
401Missing or invalid API key
404Job not found

Response Example

{
  "id": "2e35babc-91c4-4121-89f4-5a2acf956b28",
  "app": "Your app name",
  "workflow": "your-workflow-slug",
  "status": "SUCCEEDED",
  "batchName": null,
  "workflowParams": {
    "inputUrl": "https://your-server.com/audio-input.m4a"
  },
  "metadata": {},
  "result": {
    "vocals": "https://cdn.music.ai/something/vocals.wav",
    "accompaniments": "https://cdn.music.ai/something/accompaniments.wav"
  },
  "name": "My job 123",
  "createdAt": "2022-12-07T19:21:42.170Z",
  "startedAt": "2022-12-07T19:21:42.307Z",
  "completedAt": "2022-12-07T19:22:00.325Z"
}

Get Job Status GET /job/:id/status

Get the current status of a job by its ID.

curl --request GET \
	--url https://api.music.ai/v1/job/:id/status \
	--header 'Authorization: your-api-key-here'

Please note that this will only work for jobs that were created with the same API key being used on the request.

Response Fields

FieldTypeDescription
idstringUnique identifier for the job
statusstringCurrent job status (QUEUED, STARTED, SUCCEEDED, FAILED)

Response Codes

Status CodeDescription
200Job status successfully retrieved
400Invalid job ID format
401Missing or invalid API key
404Job not found

Response Example

{
  "id": "2e35babc-91c4-4121-89f4-5a2acf956b28",
  "status": "SUCCEEDED",
}

Get Jobs List GET /job

Paginated job listing endpoint. The result is sorted by creation date.

curl --request GET \
	--url https://api.music.ai/v1/job?page=0&size=20 \
	--header 'Authorization: your-api-key-here'

Please note that this will only work for jobs that were created with the same API key being used on the request.

Parameters

ParameterDescriptionExample
statusFilters by one or more statuses. Possible values: QUEUED, STARTED, SUCCEEDED, and FAILED?status=QUEUED&status=STARTED
workflowFilters by workflows given their slugs?workflow=audio-encoder&workflow=stem-separation
batchNameFilters by batch name?batchName=my-batch
pagePage number (defaults to 0)?page=1
sizePage size (defaults to 100)?size=20

Response Fields

FieldTypeDescription
jobsarrayArray of job objects
jobs[].idstringUnique identifier for the job
jobs[].appstringName of the application that created the job
jobs[].namestringHuman-readable name of the job
jobs[].batchNamestring | nullName of the batch if the job is part of one
jobs[].metadataobjectAdditional metadata associated with the job
jobs[].workflowstringName of the workflow used
jobs[].workflowParamsobjectParameters passed to the workflow
jobs[].statusstringCurrent job status (QUEUED, STARTED, SUCCEEDED, FAILED)
jobs[].resultobjectJob results (varies by workflow)
jobs[].errorJobError | nullError details if the job failed, null otherwise
jobs[].error.codestringError code
jobs[].error.titlestringSummary of the error
jobs[].error.messagestringDetailed explanation of the error occurrence
jobs[].createdAtstringISO timestamp when the job was created
jobs[].startedAtstringISO timestamp when the job started processing
jobs[].completedAtstringISO timestamp when the job completed

Response Codes

Status CodeDescription
200Jobs successfully retrieved
400Invalid parameters
401Missing or invalid API key

Response Example

[
  {
    "id": "2e35babc-91c4-4121-89f4-5a2acf956b28",
    "app": "Your app name",
    "workflow": "Your workflow name",
    "status": "SUCCEEDED",
    "error": null,
    "batchName": null,
    "workflowParams": {
      "inputUrl": "https://your-server.com/audio-input.m4a"
    },
    "metadata": {},
    "result": {
      "vocals": "https://cdn.music.ai/something/vocals.wav",
      "accompaniments": "https://cdn.music.ai/something/accompaniments.wav"
    },
    "name": "My job 123",
    "createdAt": "2022-12-07T19:21:42.170Z",
    "startedAt": "2022-12-07T19:21:42.307Z",
    "completedAt": "2022-12-07T19:22:00.325Z"
  },
  {
    "id": "2e35babc-91c4-4121-89f4-5a2acf956b28",
    "app": "Your app name",
    "workflow": "your-workflow-slug",
    "status": "FAILED",
    "error": {
      "code": "BAD_INPUT",
      "title": "Invalid input",
      "message": "File not found."
    },
    "batchName": null,
    "workflowParams": {
      "inputUrl": "https://your-server.com/audio-input.m4a"
    },
    "metadata": {},
    "result": {
      "vocals": "https://cdn.music.ai/something/vocals.wav",
      "accompaniments": "https://cdn.music.ai/something/accompaniments.wav"
    },
    "name": "My job 123",
    "createdAt": "2022-12-07T19:21:42.170Z",
    "startedAt": "2022-12-07T19:21:42.307Z",
    "completedAt": "2022-12-07T19:22:00.325Z"
  }
]

Create Job POST /job

Creates a new job to be processed by the specified workflow.

The job will be processed asynchronously. You can check its status using the GET /job/:id endpoint.

The metadata field is optional and can be used to store arbitrary key-value pairs. This is useful for tracking jobs in your application.

curl --request POST \
	--url https://api.music.ai/v1/job \
	--header 'Authorization: your-api-key-here' \
	--header 'Content-Type: application/json' \
	--data '{
    "name": "My job 123",
    "workflow": "my-workflow-id",
    "params": {
      "inputUrl": "https://music.ai/demo.ogg"
    },
    "metadata": {
      "user": 123,
    }
  }'

Parameters

FieldRequiredTypeDescription
name✔︎stringArbitrary job name.
workflow✔︎stringWorkflow slug. It can be found in the workflow metadata.
params✔︎objectWorkflow parameters. It must match the workflow's input schema.
metadataKey-value pairs, where each key is a string and each value can be a string, number, or boolean.Optional metadata for job identification.

Response Fields

FieldTypeDescription
idstringID of the new job

Response Codes

Status CodeDescription
200Job created successfully
400Invalid fields
401Missing or invalid API key
404Workflow not found
422The workflow contains errors or invalid workflow parameters were given

Response Example

{
  "id": "2e35babc-91c4-4121-89f4-5a2acf956b28"
}

Delete Job DELETE /job/:id

Deletes a job by its ID. This operation is irreversible.

curl --request DELETE \
	--url https://api.music.ai/v1/job/:id \
	--header 'Authorization: your-api-key-here'

Please note that this will only work for jobs that were created with the same API key being used on the request.

Parameters

FieldTypeDescription
idstringJob ID

Response Fields

FieldTypeDescription
idstringID of the deleted job

Response Codes

Status CodeDescription
200Job deleted successfully
401Missing or invalid API key
404Job not found

Response Example

{
  "id": "2e35babc-91c4-4121-89f4-5a2acf956b28"
}

Workflows

Workflows define how a processing task will be executed.

When creating a job, you specify which workflow to use along with its parameters. Music AI then uses the workflow to processes - whether that's transcription, beat detection, stem separation, or any other supported processing task.

Get Workflow List GET /workflow

Paginated workflow listing endpoint. The result is sorted by creation date.

curl --request GET \
	--url https://api.music.ai/v1/workflow?page=0&size=20 \
	--header 'Authorization: your-api-key-here'

Parameters

ParameterDescriptionExample
pagePage number (defaults to 0)?page=1
sizePage size (defaults to 100)?size=20

Response Fields

FieldTypeDescription
workflowsarrayArray of workflow objects
workflows[].idstringUnique identifier for the workflow
workflows[].namestringHuman-readable name of the workflow
workflows[].slugstringURL-friendly identifier used when creating jobs
workflows[].descriptionstringDescription of what this workflow does
workflows[].createdAtstringISO timestamp when workflow was created
workflows[].updatedAtstringISO timestamp when workflow was last modified

Response Example

{
  "workflows": [
    {
      "id": "3a82e3b2-9de6-4979-986d-78805dd2152b",
      "name": "Your workflow name",
      "slug": "your-workflow-slug",
      "description": "",
      "createdAt": "2024-12-16T18:31:36.102Z",
      "updatedAt": "2024-12-16T18:32:34.723Z"
    },
    {
      "id": "2362a51f-e9f9-4472-bbd2-c40a0cc83ae2",
      "name": "Extract Beat map and BPM",
      "slug": "untitled-workflow-e78c2e",
      "description": "Transcribe song BPM and beats with AI for precise rhythm analysis.",
      "createdAt": "2024-12-13T15:11:42.022Z",
      "updatedAt": "2024-12-13T15:11:45.932Z"
    }
  ]
}

Applications (API Keys)

An application represents a client that can interact with the Music AI API. Each application has a unique API key that is used to authenticate requests. Applications can create jobs, manage workflows, and access other API resources.

Applications are created through the Music AI dashboard. Each application has its own set of jobs, ensuring data isolation between different clients.

When making API requests, the application's API key must be included in the Authorization header. This key is used to identify the application and ensure that it only has access to its own resources.

Get Application GET /application

Check the information about the current used application (API key).

curl --request GET \
	--url https://api.music.ai/v1/application \
	--header 'Authorization: your-api-key-here'

Response Fields

FieldTypeDescription
idstringUnique identifier for the application
namestringHuman-readable name of the application

Response Codes

Status CodeDescription
200Application successfully retrieved
401Missing or invalid API key

Response Example

{
  "id": "80b069ab-8410-4cc9-9bfa-1282b97dc1df",
  "name": "Default Application"
}