{
"code": 200,
"msg": "Task completed successfully.",
"data": {
"taskId": "4b9e2d7a0c1f48e6a3d5b7c9e1f20a84",
"model": "magi-2/reference-to-video",
"state": "success",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"Use the woman in the reference image as the lead. She stands on a rooftop after the rain, turns to the camera and says: \\\\\\\"We finally made it.\\\\\\\" Her voice follows the reference audio\\\",\\\"reference_image_urls\\\":[\\\"https://cdn.example.com/lead.jpg\\\"],\\\"reference_audio_urls\\\":[\\\"https://cdn.example.com/voice.wav\\\"],\\\"duration\\\":5,\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"resolution\\\":\\\"1080p\\\",\\\"generate_audio\\\":true}\",\"model\":\"magi-2/reference-to-video\"}",
"resultJson": "{\"resultUrls\":[\"https://api.dreamto.ai/v1/tasks/4b9e2d7a0c1f48e6a3d5b7c9e1f20a84/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t\"]}",
"failCode": null,
"failMsg": null,
"costTime": 56,
"completeTime": 1795046596000,
"createTime": 1795046540000,
"updateTime": 1795046596000,
"response": {
"resultUrls": [
"https://api.dreamto.ai/v1/tasks/4b9e2d7a0c1f48e6a3d5b7c9e1f20a84/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"
]
}
}
}
MAGI-2 Reference to Video
Task callback
When the task was created with callBackUrl, DreamTo sends this POST there once the task succeeds or fails. The outer code is 200 (success) or 501 (failure) and data is the same as the data of the query endpoint. Verify the sender with X-DreamTo-Signature and answer with any 2xx.
WEBHOOK
magi2TaskCompleted
{
"code": 200,
"msg": "Task completed successfully.",
"data": {
"taskId": "4b9e2d7a0c1f48e6a3d5b7c9e1f20a84",
"model": "magi-2/reference-to-video",
"state": "success",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"Use the woman in the reference image as the lead. She stands on a rooftop after the rain, turns to the camera and says: \\\\\\\"We finally made it.\\\\\\\" Her voice follows the reference audio\\\",\\\"reference_image_urls\\\":[\\\"https://cdn.example.com/lead.jpg\\\"],\\\"reference_audio_urls\\\":[\\\"https://cdn.example.com/voice.wav\\\"],\\\"duration\\\":5,\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"resolution\\\":\\\"1080p\\\",\\\"generate_audio\\\":true}\",\"model\":\"magi-2/reference-to-video\"}",
"resultJson": "{\"resultUrls\":[\"https://api.dreamto.ai/v1/tasks/4b9e2d7a0c1f48e6a3d5b7c9e1f20a84/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t\"]}",
"failCode": null,
"failMsg": null,
"costTime": 56,
"completeTime": 1795046596000,
"createTime": 1795046540000,
"updateTime": 1795046596000,
"response": {
"resultUrls": [
"https://api.dreamto.ai/v1/tasks/4b9e2d7a0c1f48e6a3d5b7c9e1f20a84/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"
]
}
}
}
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.

