{
"code": 200,
"msg": "Task completed successfully.",
"data": {
"taskId": "4b9e2d7a0c1f48e6a3d5b7c9e1f20a84",
"model": "magi-2/text-to-video",
"state": "success",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"At dusk an old lighthouse keeper climbs the spiral stairs while the camera slowly rises behind him from below. He stops at the window and says quietly: \\\\\\\"The wind is strong tonight.\\\\\\\" Sound: howling sea wind and creaking wooden stairs\\\",\\\"duration\\\":5,\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"resolution\\\":\\\"1080p\\\",\\\"generate_audio\\\":true}\",\"model\":\"magi-2/text-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 Text 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/text-to-video",
"state": "success",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"At dusk an old lighthouse keeper climbs the spiral stairs while the camera slowly rises behind him from below. He stops at the window and says quietly: \\\\\\\"The wind is strong tonight.\\\\\\\" Sound: howling sea wind and creaking wooden stairs\\\",\\\"duration\\\":5,\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"resolution\\\":\\\"1080p\\\",\\\"generate_audio\\\":true}\",\"model\":\"magi-2/text-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.

