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"
}Generate music from a text prompt using Sonilo text-to-music AI. Requires a prompt describing the desired music. Duration is optional and will be inferred if not provided. Returns a streaming NDJSON response with duration, titles, audio chunks, and completion events.
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"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OK - Streaming NDJSON response with audio generation events
A single NDJSON event from the Sonilo streaming response.
Was this page helpful?