Skip to main content
POST
Generate music

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json
prompt
string
required

Music description: style, mood, vocals, instrumentation and arrangement.

Example:

"Genre: acoustic pop. BPM: 96. Key: C major. Warm and intimate, building gently into the chorus."

lyrics
string
required

The lyrics to sing. Structure tags such as [intro], [verse], [chorus] and [outro] must each be on their own line; text on the same line as a leading tag is dropped by the model.

Example:

"[verse]\nMorning light filtering through the pine\n[chorus]\nSoftly the world begins to breathe"

duration
number
default:60

Upper bound on the generated audio length in seconds. The model may stop earlier; the actual length comes back as duration_seconds.

Required range: 10 <= x <= 300
seed
integer

Seed for reproducibility. Omit for a random seed.

num_inference_steps
integer
default:30

Flow-matching steps per denoising chunk. More steps improve quality at the cost of speed.

Required range: 1 <= x <= 100
guidance_scale
number
default:1.7

Classifier-free guidance scale of the flow-matching stage.

Required range: 0 <= x <= 20
account_id
string<uuid>

Optional. Generate on behalf of another account you can access (self, shared organization, or admin). Defaults to the calling account.

organization_id
string<uuid>

Optional. Organization to scope the generation to. Omit for a personal generation.

Response

Generation accepted and queued.

The accepted generation. Poll it until status is terminal.

status
enum<string>

Status of the request

Available options:
success
generation
object

One music generation.