Skip to main content
POST
/
proxy
/
sonilo
/
t2m
/
generate
Generate music from text prompt
curl --request POST \
  --url https://api.comfy.org/proxy/sonilo/t2m/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'prompt=<string>' \
  --form duration=180
{
  "copy_index": 1,
  "display_tags": [
    "<string>"
  ],
  "prompt_index": 1,
  "stream_index": 1,
  "title": "<string>",
  "type": "title"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
prompt
string
required

Text prompt describing the desired music.

Minimum string length: 1
duration
number

Target duration in seconds. Will be inferred if not provided.

Required range: 0 < x <= 360

Response

OK - Streaming NDJSON response with audio generation events

A single NDJSON event from the Sonilo streaming response.

copy_index
integer
required
Required range: x >= 0
display_tags
string[]
required
prompt_index
integer
required
Required range: x >= 0
stream_index
integer
required
Required range: x >= 0
title
string
required
type
enum<string>
required
Available options:
title