Data Models
Job
Job contains all properties used for the client to track the status of a stem/transcription/alignment generation request. On completion the job will provide the asset links.
Newly Created Job Response
This is an example of a created job response that would be returned when posting a new job on the /job
route. It only contains just the basic information about the job request.
{
job: {
id: "clksrfob8000bf7of6xkscy8m",
clientId: "<YOuR Client ID>",
requestId: "clksrfob8000bf7of6xkscy8m",
metadata: {
format: "json",
name: "alignment"
},
callbackUrl: "<YOUR CALLBACK URL>",
status: "created"
}
}
Completed Separation Job Response
This is an example of a completed separation job response that would be returned when querying the /job
route.
{
job: {
id: "clksrfob8000bf7of6xkscy8m",
clientId: "<YOUR CLIENT ID>",
createdAt: "2023-08-01T20:37:06.656Z",
startedAt: "2023-08-01T20:37:07.839Z",
updatedAt: "2023-08-01T20:37:28.392Z",
requestId: "clksrfob8000bf7of6xkscy8m",
licenseId: "",
callbackUrl: "<YOUR CALLBACK URL>",
status: "completed",
statusInfo: {},
sourceAsset: {
name: "COOKIN-EUROPA_Drum.mp3",
id: "clksq2o6c1506f7ofcyvzpdh8",
fileType: "audio/mpeg",
format: "mp3",
link: "<LINK TO FILE>",
outputAssets: [
{
name: "instrumental.wav",
id: "clksrg52j2319f7of26wleinn1",
fileType: "audio/wav",
format: "wav",
link: "<LINK TO FILE>"
},
],
metadata: {
format: "wav",
name: "instrumental"
}
}
}
}
Completed Transcription / Alignment Job Response
This is an example of a completed transcription / alignment job response that would be returned when querying the /job
route.
{
job: {
id: "clksrfob8000bf7of6xkscy8m",
clientId: "<YOUR CLIENT ID>",
createdAt: "2023-08-01T20:37:06.656Z",
startedAt: "2023-08-01T20:37:07.839Z",
updatedAt: "2023-08-01T20:37:28.392Z",
requestId: "clksrfob8000bf7of6xkscy8m",
licenseId: "",
metadata: {
format: "json",
name: "alignment"
},
callbackUrl: "<YOUR CALLBACK URL>",
status: "completed",
statusInfo: {},
sourceAsset: {
name: "COOKIN-EUROPA_Drum.mp3",
id: "clksq2o6c1506f7ofcyvzpdh8",
fileType: "audio/mpeg",
format: "mp3",
link: "<LINK TO FILE>"
},
outputAssets: [
{
name: "transcription.json",
id: "clksrg52j2319f7of26wleinn",
fileType: "application/json",
format: "json",
link: "<LINK TO FILE>"
}
]
}
}
Job Data Model Fields
Key | Type | Example | Description |
---|---|---|---|
id | string | cuid format | The unique cuid of the job. |
createdAt | Date | 2023-08-01T20:37:06.656Z | When the object was created. |
updatedAt | Date | 2023-08-01T20:37:06.656Z | When the object was last updated. |
startedAt | Date | 2023-08-01T20:37:06.656Z | When the job was started. |
completedAt | Date | 2023-08-01T20:37:06.656Z | When the job was completed. |
requestId | string | cuid format | The request id associated with the job. |
metadata | JSON | {"format":"wav", "name":"instrumental"} | Metadata used to describe the client's request. |
stemMetadata | JSON | {"format":"wav", "name":"instrumental"} | Metadata used to describe the client's requested stems. |
callbackUrl | URI | https://path/to/callback | URL to call back the client. We will call this URL when the job status changes. |
clientId | string | cuid format | The unique id of the client associated with the job. (cuid format) |
licenseId | string | cuid format | The unique id of the client's license associated with the job. (cuid format) |
status | string | "created", "processing", "completed" | The current status of the job. |
sourceAsset | Object | {"name": "COOKIN-EUROPA_Drum.mp3", "id": "clksq2o6c1506f7ofcyvzpdh8", "fileType": "audio/mpeg", "format": "mp3", "link": ""} | Details about the source asset. |
stemAssets | Array | [{"name": "stem1.wav", "id": "stem1_id", "fileType": "audio/wav", "format": "wav", "link": "https://path/to/stem1"}, {"name": "stem2.wav", "id": "stem2_id", "fileType": "audio/wav", "format": "wav", "link": "https://path/to/stem2"}] | Array of objects containing information about stem assets related to the job. |
otherAssets | Array | [{"name": "transcription.json", "id": "clksrg52j2319f7of26wleinn", "fileType": "application/json", "format": "json", "link": ""}] | Array of objects containing information about other assets related to the job. |
Asset
An asset is the representation of either a response object or a source file. Asset objects are returned for any actions dealing with the separation/transcription/alignment service.
Newly Created Asset Response
Here's an example of what an asset payload can look like after uploading a new asset using one the /upload
routes.
{
"name": "audioshake-it-up",
"id": "clyxaywtp00ne0jpi4nf435dv",
"fileType": "audio/mpeg",
"format": "mp3",
"link": "YOUR_AUDIO_FILE_LINK"
}
Asset Data Model Fields
Key | Type | Example | Description |
---|---|---|---|
id | string | cuid1234 | The unique id of the Asset, following the cuid format. |
name | string | MySong.wav | The name of the asset. |
format | string | wav, mp3, flac | Describes the file format for the asset file. |
link | string | https://link/to/file | A temporary link for downloading the asset. (Optional) |
fileType | string | audio/mpeg | MIME type of the asset file, used as a Content-Type header. |
clientId | string | cuid5678 | The id of the client associated with the asset object. |