Suno · Generate Persona
ai-music-api/generate-persona creates a personalized Persona (a music character) from one track of a song you generated, giving the music a distinct identity: give it an easily recognizable name and describe its musical characteristics, style and personality.
Pass the task_id of the original music task and the audio_id of one of its tracks; vocal_start / vocal_end pick the 10–30 second segment that is analysed. The endpoint answers synchronously with a persona_id; pass it to Generate music, Extend music, Upload and cover or Upload and extend to create music with similar style characteristics.
Authentication
- Base URL
https://api.dreamto.ai- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Model name (model)
ai-music-api/generate-persona
Setup
The Suno endpoints share POST /api/v1/jobs/createTask (model selects the endpoint and the parameters go in input). This endpoint is synchronous: the create request returns the result directly, with no need to poll the query endpoint. 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 this endpoint).
| Endpoint | Purpose |
|---|---|
POST /api/v1/jobs/createTask | Create task |
GET /api/v1/jobs/recordInfo?taskId=... | Get task |
Parameters
model is ai-music-api/generate-persona; the parameters go in input. Requests that break a rule return code: 422; no task is created or charged.
| Field | Values |
|---|---|
task_id | Required taskId of the finished original music task (generate, extend, upload and cover / extend, add vocals / instrumental, replace section, mashup) |
audio_id | Required ID of one track of that task (response.data[].id) |
name | Required Persona name |
description | Required description of the Persona's musical characteristics, style and personality |
vocal_start | Optional start of the analysed segment (seconds), ≥ 0, default 0; must be less than vocal_end |
vocal_end | Optional end of the analysed segment (seconds), ≥ 0 with at most 2 decimal places, default 30; vocal_end - vocal_start must be 10–30 seconds |
style | Optional music style tag of the Persona, such as Electronic Pop or Jazz Trio |
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.
This endpoint answers synchronously and is charged once when the request succeeds.
Quick start
This endpoint answers synchronously: data in the create response is the result, so there is nothing to poll and no need to call the query endpoint. $DREAMTO_API_KEY is your API Key.
curl -X POST "https://api.dreamto.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $DREAMTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ai-music-api/generate-persona",
"input": {
"task_id": "c2a81e5f09d34b7e8f61a2d4c9b03e75",
"audio_id": "f924248f-e765-48fd-9ea9-c64290225e4e",
"name": "Electronic Pop Singer",
"description": "A modern electronic music style pop singer, skilled in dynamic rhythms and synthesizer tones",
"vocal_start": 0,
"vocal_end": 30,
"style": "Electronic Pop"
}
}'Callback
This endpoint returns its result at once and sends no callback; callBackUrl can be left out.
Notes
- Call it only after the original music task has fully finished; a task that is still generating fails.
- Each
audio_idmakes one Persona: calling again with the sameaudio_idreturns the samepersona_id. - To use it, pass the
persona_idas is ininput.persona_idof Generate music and the other music endpoints withpersona_modelset tostyle_persona;voice_personais only for custom voices (a ready voice task of this account) and does not apply to Personas made here. - The more specific the description (genre, mood, instrumentation, vocal qualities), the better the Persona captures the musical style.
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.".