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