Here you can find all the methods and properties of our API.
File Upload
Retrieve a signed URL to upload a file to our temporary server. More info here.
GET /upload
Example Request:
curl --request GET \
--url https://api.music.ai/api/upload \
--header 'Authorization: your-api-key-here'
Example Response:
{
"uploadUrl": "https://storage.googleapis.com/moises/939b7898b3ef?(...)X96cb5",
"downloadUrl": "https://storage.googleapis.com/moises/939b7898b3ef?(...)SSScb5"
}
Jobs
Submit or retrieve a processing job from our servers.
Job Status Types
Every job has a status respresenting its current state:
Status | Description |
---|---|
QUEUED | Awaiting to start |
STARTED | Processing has started |
SUCCEEDED | Everything has completed and the results are ready |
FAILED | There was an error processing your media |
GET /job/:id
Example Request:
curl --request GET \
--url https://api.music.ai/api/job/:id \
--header 'Authorization: your-api-key-here'
Example Response:
{
"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"
}
Please note that this will only work for jobs that were created with the same API key being used on the request.
GET /job
Paginated job listing endpoint. The result is sorted by creation date.
Available filters through query parameters:
Parameter | Description | Example |
---|---|---|
status | Filters by one or more statuses. Possible values: QUEUED , STARTED , SUCCEEDED , and FAILED . | ?status=QUEUED&status=STARTED |
workflow | Filters by workflows given their slugs. | workflow=audio-encoder&workflow=stem-separation |
batchName | Filters by batch name. | batchName=my-batch |
page | Page number (defaults to 0). | page=1 |
size | Page size (defaults to 100). | size=20 |
Example Request:
curl --request GET \
--url https://api.music.ai/api/job?page=0&size=20 \
--header 'Authorization: your-api-key-here'
Example Response:
[
{
"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"
},
// ...
]
Please note that this will only work for jobs that were created with the same API key being used on the request.
POST /job
Body schema:
{
name: string
workflow: string
params: { [key: string]: any }
metadata?: { [key: string]: string | number | boolean }
}
name
: Job name for identification purposes;workflow
: Workflow slug;params
: Workflow params;metadata
: Optional metadata for identification purposes.
Example Request:
curl --request POST \
--url https://api.music.ai/api/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,
}
}'
Example Response:
{
"id": "2e35babc-91c4-4121-89f4-5a2acf956b28"
}
DELETE /job/:id
Example Request:
curl --request DELETE \
--url https://api.music.ai/api/job/:id \
--header 'Authorization: your-api-key-here'
Example Response:
{
"id": "2e35babc-91c4-4121-89f4-5a2acf956b28"
}
Please note that this will only work for jobs that were created with the same API key being used on the request.
Workflows
Retrieves a list of the existing workflows from the account.
GET /workflow
Paginated workflow listing endpoint. The result is sorted by creation date.
Available filters through query parameters:
Parameter | Description | Example |
---|---|---|
page | Page number (defaults to 0). | page=1 |
size | Page size (defaults to 100). | size=20 |
Example Request:
curl --request GET \
--url https://api.music.ai/api/workflow?page=0&size=20 \
--header 'Authorization: your-api-key-here'
Example Response:
{
"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"
}
]
}
Application
Check the information about the current used apiKey/application
GET /application
Example Request:
curl --request GET \
--url https://api.music.ai/api/application \
--header 'Authorization: your-api-key-here'
Example Response:
{
"id": "80b069ab-8410-4cc9-9bfa-1282b97dc1df",
"name": "Default Application"
}