Suno · Boost Music Style

ai-music-api/boost-music-style
AudioSunoSuno Lyricsboost-music-style

ai-music-api/boost-music-style expands a short style description (such as Pop, Mysterious) into a richer, more professional music style text that covers rhythm, instrumentation, timbre, vocal treatment and arrangement.

Use the text as style in custom mode of music generation to steer the result closer to the style you have in mind. The endpoint answers synchronously: data.result of the create response is the expanded style text, with nothing to poll.

Authentication

Base URL
https://api.dreamto.ai
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
Model name (model)
ai-music-api/boost-music-style

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).

Parameters

model is ai-music-api/boost-music-style; the parameters go in input. Requests that break a rule return code: 422; no task is created or charged.

FieldValues
contentRequired style description: describe the music style you expect in concise, clear words, e.g. Pop, Mysterious

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

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.

cURLbash
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/boost-music-style",
    "callBackUrl": "https://your-domain.com/api/callback",
    "input": {
      "content": "Pop, Mysterious"
    }
  }'

Callback

This endpoint returns its result at once; with callBackUrl DreamTo also pushes the same result to that URL once (success only: a failure is returned by the create request itself).

Pass callBackUrl (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 the body is {"code": 200, "msg": "All generated successfully.", "data": {"callbackType": "complete", "task_id", "data": {"resultUrls": [style text]}}}, with data.task_id the task ID and data.data the same as response of the query endpoint; on failure code is the failure code (not 200), msg the reason, and data has only callbackType and task_id. As the endpoint answers synchronously, usually only the success callback is sent; a failure is returned by the create request itself.

The request carries X-DreamTo-Event: task.completed, X-DreamTo-Timestamp (UTC, RFC 3339) and X-DreamTo-Signature:

X-DreamTo-Signature = hex( HMAC-SHA256( secret, X-DreamTo-Timestamp + "." + data.task_id + "." + status ) )

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

  • The expanded style text is data.result of the create response; the query endpoint returns it in response.resultUrls[0] (the field keeps the name resultUrls but holds text, not a link).
  • taskId is issued by DreamTo (32 hex digits) and can only be queried with an API Key of the same account; an unknown or expired task returns code: 422 with msg: recordInfo is null.
  • The body accepts only model, callBackUrl and input; undeclared input fields, wrong types and values that break a rule return code: 422 with an English reason in msg; 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 supports Range; files are kept for 14 days after the task is created, so download them promptly.
  • param echoes the create request, with input as 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 / failMsg of a failed task come from the model service (content moderation, a source audio that cannot be downloaded and so on); internal errors are reported as failCode: "500" with failMsg: "Internal Error, Please try again later.".