{
"code": 200,
"msg": "Task completed successfully.",
"data": {
"taskId": "5e2a9c7f13b84d06a8f1c3e5b7d9a2c4",
"model": "gemini-3.8-flash-lite-tts",
"state": "success",
"param": "{\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":\"{\\\"temperature\\\":1,\\\"speakers\\\":[{\\\"speaker_id\\\":\\\"Speaker 1\\\",\\\"voice_name\\\":\\\"Fola\\\"},{\\\"speaker_id\\\":\\\"Speaker 2\\\",\\\"voice_name\\\":\\\"Zephyr\\\"}],\\\"dialogue_turns\\\":[{\\\"speaker_id\\\":\\\"Speaker 1\\\",\\\"text\\\":\\\"Hello there. \\\\u003claugh\\\\u003e That works.\\\",\\\"style\\\":\\\"Speak like a tired night-shift radio host, slow and dry.\\\"},{\\\"speaker_id\\\":\\\"Speaker 2\\\",\\\"text\\\":\\\"Wait, did you hear that? \\\\u003cgasp\\\\u003e I think it actually worked.\\\",\\\"style\\\":\\\"Bright and curious, slightly faster.\\\"}]}\",\"model\":\"gemini-3.8-flash-lite-tts\"}",
"resultJson": "{\"resultUrls\":[\"https://api.dreamto.ai/v1/tasks/5e2a9c7f13b84d06a8f1c3e5b7d9a2c4/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t\"],\"resultObject\":null}",
"failCode": null,
"failMsg": null,
"costTime": 12,
"completeTime": 1794911383000,
"createTime": 1794911371000,
"updateTime": 1794911383000,
"response": {
"resultUrls": [
"https://api.dreamto.ai/v1/tasks/5e2a9c7f13b84d06a8f1c3e5b7d9a2c4/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"
],
"resultObject": null
}
}
}Gemini 3.8 Flash Lite TTS
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
geminiTTSTaskCompleted
{
"code": 200,
"msg": "Task completed successfully.",
"data": {
"taskId": "5e2a9c7f13b84d06a8f1c3e5b7d9a2c4",
"model": "gemini-3.8-flash-lite-tts",
"state": "success",
"param": "{\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":\"{\\\"temperature\\\":1,\\\"speakers\\\":[{\\\"speaker_id\\\":\\\"Speaker 1\\\",\\\"voice_name\\\":\\\"Fola\\\"},{\\\"speaker_id\\\":\\\"Speaker 2\\\",\\\"voice_name\\\":\\\"Zephyr\\\"}],\\\"dialogue_turns\\\":[{\\\"speaker_id\\\":\\\"Speaker 1\\\",\\\"text\\\":\\\"Hello there. \\\\u003claugh\\\\u003e That works.\\\",\\\"style\\\":\\\"Speak like a tired night-shift radio host, slow and dry.\\\"},{\\\"speaker_id\\\":\\\"Speaker 2\\\",\\\"text\\\":\\\"Wait, did you hear that? \\\\u003cgasp\\\\u003e I think it actually worked.\\\",\\\"style\\\":\\\"Bright and curious, slightly faster.\\\"}]}\",\"model\":\"gemini-3.8-flash-lite-tts\"}",
"resultJson": "{\"resultUrls\":[\"https://api.dreamto.ai/v1/tasks/5e2a9c7f13b84d06a8f1c3e5b7d9a2c4/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t\"],\"resultObject\":null}",
"failCode": null,
"failMsg": null,
"costTime": 12,
"completeTime": 1794911383000,
"createTime": 1794911371000,
"updateTime": 1794911383000,
"response": {
"resultUrls": [
"https://api.dreamto.ai/v1/tasks/5e2a9c7f13b84d06a8f1c3e5b7d9a2c4/artifacts/8d2c41f0b7e94a6fa1c3d/content?access=Xq3vR8sK1mN6pT2wY9bC4dF7gH0jL5zA8eU1iO3rS6t"
],
"resultObject": null
}
}
}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.

