Skip to main content
POST
Creates a music generation job powered by Mureka AI on WaveSpeed. Credits are deducted when the job is queued. Poll Poll music status with the returned generation.id until status is COMPLETED or FAILED. For the dashboard UI (models, lyrics, playback, and the global player), see Music generator and Playback & player.

Headers

Request body

string
Song lyrics. Required for song models (auto, mureka-9, mureka-8, mureka-o2, mureka-7.6). Max 3000 characters.
string
Style prompt — genre, mood, tempo, vocal style. Max 1024 characters. Optional for song models; mureka-7.5 needs a prompt or lyrics.
string
Model key. Default: auto (Mureka V9).
string
Output audio format: mp3, wav, or flac. Default: mp3.

Async completion

Poll Poll music status with generation.id until status is COMPLETED or FAILED. Webhooks are not supported on the public API.

Response

Example

Errors

Authorizations

Authorization
string
header
required

An Unsora API key (uns_…). A Clerk session token also works.

Headers

Idempotency-Key
string

API key requests only. Retrying with the same key within 24 hours replays the first response (with the Idempotent-Replayed: true header) instead of charging again. The body isn't compared; reusing the key on a different endpoint returns 409 IDEMPOTENCY_CONFLICT. Keys over 128 characters are ignored.

Maximum string length: 128

Body

application/json

Send lyrics for every model except mureka-7.5, which makes background music from prompt (or lyrics). Credits per run: auto, mureka-9 and mureka-8 3; mureka-7.6 and mureka-7.5 4; mureka-o2 6.

lyrics
string

Song lyrics, up to 3,000 characters. Required by every model except mureka-7.5.

Maximum string length: 3000
prompt
string

Style: genre, mood, vocal style (up to 1,024 characters).

Maximum string length: 1024
model
enum<string>
default:auto

auto runs Mureka V9. mureka-7.5 makes background music without vocals.

Available options:
auto,
mureka-9,
mureka-8,
mureka-o2,
mureka-7.6,
mureka-7.5
output_format
enum<string>
default:mp3
Available options:
mp3,
wav,
flac

Response

Job queued

success
boolean
required
generation
object
required
creditsDeducted
number
required
creditsRemaining
number
required