ai-music-api/regenerate-phrase is part of the Suno Voice custom voice flow: when the earlier validation phrase failed, expired, or the user wants a different one to read, it generates a new validation phrase for the original validation task.
Regeneration updates the original validation task: keep querying that task (input.task_id) and read the new phrase from its response.data.verify_phrase_text. The task this endpoint returns only confirms the request; its result resultUrls holds the ID of the original validation task. Once the new phrase is ready, have the user read it aloud, record it and submit the recording to the create voice endpoint.
Setup
The Suno endpoints use an asynchronous task protocol: every endpoint creates its task withPOST /api/v1/jobs/createTask (model selects the endpoint and the parameters go in input) and is queried with GET /api/v1/jobs/recordInfo?taskId=; with callBackUrl the result is pushed to that URL when the task finishes. See the Suno introduction for the flow, chaining tasks and how long files are kept. The base URL is https://api.dreamto.ai; send the API Key in the Authorization: Bearer header.
Every response has HTTP status 200; the code in the body tells the outcome: 200 is success, anything else an error (see the response examples of each endpoint).
Parameters
model is ai-music-api/regenerate-phrase; the parameters go in input. Requests that break a rule return code: 422; no task is created or charged.
Pricing
Billed per request: each succeeded task is charged once at the model price shown in the console. The balance is checked for that price when the task is created (code: 402 when insufficient); invalid requests and failed tasks are not charged.
Quick start
Create a task to getdata.taskId, poll about every 10 seconds and read response once state is success; or pass callBackUrl to be called back when the task finishes. $DREAMTO_API_KEY is your API Key.
Callback
PasscallBackUrl (a public http / https URL) when creating the task; when the task succeeds or fails DreamTo POSTs the result there once (callback format): on success code is 200, data.callbackType is complete, data.task_id is the task ID and data.data the result; on failure code is the failure code (not 200), msg the reason, and data has only callbackType and task_id. DreamTo calls back once when the task finishes and sends no intermediate-stage (text / first) callbacks.
The request carries X-DreamTo-Event: task.completed, X-DreamTo-Timestamp (UTC, RFC 3339) and X-DreamTo-Signature:
status is success when the task succeeded and failed when it failed. The secret is generated in the DreamTo console; without one no signature header is sent. Answer with any 2xx to acknowledge; otherwise the callback is retried.
Notes
- A validation phrase task stays pending (
stateisgenerating) while it waits for the user’s recording, and this endpoint can be called in that state; a failed validation task cannot be regenerated. - The new phrase is not in this task’s result: once this task succeeds, query the original validation task; its
response.data.verify_phrase_textis the new phrase and the old one no longer applies. - The original validation task calls back only when it ends (voice ready or validation failed); regenerating the phrase does not trigger that callback. This task’s
callBackUrlonly reports that the request finished and does not carry the new phrase. taskIdis issued by DreamTo (32 hex digits) and can only be queried with an API Key of the same account; an unknown or expired task returnscode: 422withmsg: recordInfo is null.- The body accepts only
model,callBackUrlandinput; undeclaredinputfields, wrong types and values that break a rule returncode: 422with an English reason inmsg; no task is created or charged. - Every file link in a result (audio, cover image, video and so on) is a DreamTo download link (
/v1/tasks/{task_id}/artifacts/...) that works without an API Key and supportsRange; files are kept for 14 days after the task is created, so download them promptly. paramechoes the create request, withinputas a JSON string that needs a second parse; the credits used are not returned, and the charge is shown in the DreamTo console bills.failCode/failMsgof a failed task come from the model service (content moderation, a source audio that cannot be downloaded and so on); internal errors are reported asfailCode: "500"withfailMsg: "Internal Error, Please try again later.".

