curl --request POST \
--url https://api.dreamto.ai/api/v1/jobs/createTask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3.8-flash-lite-tts",
"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. <laugh> That works.",
"style": "Speak like a tired night-shift radio host, slow and dry."
},
{
"speaker_id": "Speaker 2",
"text": "Wait, did you hear that? <gasp> I think it actually worked.",
"style": "Bright and curious, slightly faster."
}
]
}
}
'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5e2a9c7f13b84d06a8f1c3e5b7d9a2c4"
}
}Gemini 3.8 Flash Lite TTS
Create task
Creates a text-to-speech task: model picks the model, the speakers and lines go in input, and the optional callBackUrl receives a completion callback. On success data.taskId is returned and the task runs asynchronously; poll the query endpoint for the result. Every response has HTTP status 200; check code.
POST
/
api
/
v1
/
jobs
/
createTask
curl --request POST \
--url https://api.dreamto.ai/api/v1/jobs/createTask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-3.8-flash-lite-tts",
"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. <laugh> That works.",
"style": "Speak like a tired night-shift radio host, slow and dry."
},
{
"speaker_id": "Speaker 2",
"text": "Wait, did you hear that? <gasp> I think it actually worked.",
"style": "Bright and curious, slightly faster."
}
]
}
}
'{
"code": 200,
"msg": "success",
"data": {
"taskId": "5e2a9c7f13b84d06a8f1c3e5b7d9a2c4"
}
}Authorizations
Body
application/json
Request body of createTask.
Response
200 - application/json
Always HTTP 200. With code 200 the task was created and data.taskId is its ID; any other code is an error with the reason in msg and data null.
Response of createTask; always HTTP 200.
Result code:
200: success401: missing or invalid API Key402: insufficient balance404: the model does not exist or is not enabled405: wrong HTTP method422: invalid request, with the reason inmsg; no task is created or charged429: too many requests; retry later455: service under maintenance500: server error; retry later501: generation failed505: feature disabled

