Music

Generate a music file

Queues a standalone music file from a text prompt and a duration in seconds. Does not mix the audio into a video. Costs 20 credits, refunded if generation fails. Required scope: music:write.

post/music

Request

  • Base URL
    https://api.braiv.co/v1
  • Auth
    • HTTP bearer
    • or API key in header X-Api-Key

Headers

Idempotency-Keystring

Caller-generated key for safe POST retries. The API retains the first JSON response for 24 hours. Reusing a key with another path or body returns 409 IDEMPOTENCY_REPLAY.

Request body

promptstring required

Music description sent to generation unchanged.

durationnumber required

Length of the music file in seconds.

Response

Music generation queued.

musicIdstring required

Music generation id.

jobIdstring required

Pollable job id, music_{musicId}.

creditsSpentinteger required

Credits debited for this generation. Flat 20.

balancenumber required

Billing-account balance after the debit.

Changes

No recorded changes to this operation across all 1 revision of this API.