Skip to main content
POST
Generate music from text prompt

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
duration
integer
required

Desired duration of the output track in seconds.

Required range: 1 <= x <= 360
prompt
string
required

Text prompt describing the desired music. Max length 1000 characters.

Required string length: 1 - 1000

Response

OK - Streaming NDJSON response with audio generation events

A single NDJSON event from the Sonilo streaming response. Additional event types beyond those listed may appear; unknown types should be ignored by clients.

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
summary
string

Short natural-language description of the generated track.