{
"code": 200,
"msg": "success",
"data": {
"taskId": "7d3f0a9c41e85b2f6a1c9e04b8d27f53",
"instruments": [
{
"name": "Acoustic Guitar (steel)",
"notes": [
{
"end": 0.203125,
"pitch": 55,
"start": 0.10416666666666667,
"velocity": 0.30708661417322836
},
{
"end": 0.203125,
"pitch": 59,
"start": 0.10416666666666667,
"velocity": 0.2204724409448819
},
{
"end": 0.203125,
"pitch": 62,
"start": 0.10416666666666667,
"velocity": 0.2204724409448819
}
]
},
{
"name": "Acoustic Bass",
"notes": [
{
"end": 0.8125,
"pitch": 43,
"start": 0.515625,
"velocity": 0.6771653543307087
},
{
"end": 2.5833333333333335,
"pitch": 43,
"start": 2.484375,
"velocity": 0.5433070866141733
},
{
"end": 2.8854166666666665,
"pitch": 35,
"start": 2.5885416666666665,
"velocity": 0.5984251968503937
}
]
},
{
"name": "drums",
"notes": [
{
"end": 0.5166666666666666,
"pitch": 36,
"start": 0.515625,
"velocity": 0.6062992125984252
},
{
"end": 0.8135416666666666,
"pitch": 38,
"start": 0.8125,
"velocity": 0.33858267716535434
},
{
"end": 0.8135416666666666,
"pitch": 42,
"start": 0.8125,
"velocity": 0.33858267716535434
}
]
},
{
"name": "Synth Choir",
"notes": [
{
"end": 21.265625,
"pitch": 66,
"start": 20.671875,
"velocity": 0.25984251968503935
},
{
"end": 21.265625,
"pitch": 74,
"start": 20.671875,
"velocity": 0.41732283464566927
},
{
"end": 21.265625,
"pitch": 69,
"start": 20.671875,
"velocity": 0.25984251968503935
}
]
}
]
}
}Generate MIDI from audio
Generate MIDI from audio: Task callback
When the task was created with callBackUrl, DreamTo sends this POST there once the task succeeds or fails (once): on success the body is {"code": 200, "msg": "success", "data": {"taskId", "instruments"}}, with data.taskId the task ID and instruments the detected instruments and their notes (name, notes[].pitch/start/end/velocity); on failure code is the failure code (not 200), msg the reason and data holds only taskId. Verify the sender with X-DreamTo-Signature and answer with any 2xx.
WEBHOOK
sunoTaskCompleted
{
"code": 200,
"msg": "success",
"data": {
"taskId": "7d3f0a9c41e85b2f6a1c9e04b8d27f53",
"instruments": [
{
"name": "Acoustic Guitar (steel)",
"notes": [
{
"end": 0.203125,
"pitch": 55,
"start": 0.10416666666666667,
"velocity": 0.30708661417322836
},
{
"end": 0.203125,
"pitch": 59,
"start": 0.10416666666666667,
"velocity": 0.2204724409448819
},
{
"end": 0.203125,
"pitch": 62,
"start": 0.10416666666666667,
"velocity": 0.2204724409448819
}
]
},
{
"name": "Acoustic Bass",
"notes": [
{
"end": 0.8125,
"pitch": 43,
"start": 0.515625,
"velocity": 0.6771653543307087
},
{
"end": 2.5833333333333335,
"pitch": 43,
"start": 2.484375,
"velocity": 0.5433070866141733
},
{
"end": 2.8854166666666665,
"pitch": 35,
"start": 2.5885416666666665,
"velocity": 0.5984251968503937
}
]
},
{
"name": "drums",
"notes": [
{
"end": 0.5166666666666666,
"pitch": 36,
"start": 0.515625,
"velocity": 0.6062992125984252
},
{
"end": 0.8135416666666666,
"pitch": 38,
"start": 0.8125,
"velocity": 0.33858267716535434
},
{
"end": 0.8135416666666666,
"pitch": 42,
"start": 0.8125,
"velocity": 0.33858267716535434
}
]
},
{
"name": "Synth Choir",
"notes": [
{
"end": 21.265625,
"pitch": 66,
"start": 20.671875,
"velocity": 0.25984251968503935
},
{
"end": 21.265625,
"pitch": 74,
"start": 20.671875,
"velocity": 0.41732283464566927
},
{
"end": 21.265625,
"pitch": 69,
"start": 20.671875,
"velocity": 0.25984251968503935
}
]
}
]
}
}Authorizations
Headers
Body
application/json
Response
200
Any 2xx status acknowledges the callback; on a timeout (10 seconds) or another status it is retried after 1, 5 and 30 minutes, at most 4 deliveries.

