Skip to content
RU

Create music

POST
/audio/music
curl --request POST \
--url https://api.mixen.ai/v1/audio/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "model": "suno", "prompt": "lo-fi hip-hop, rain outside the window, calm" }'

Async music generation (job+poll). Suno (model “suno”) returns 2 tracks; Lyria (“lyria”/“lyria-pro”) returns 1 instrumental track. Poll GET /audio/music/{id} until status=completed, then GET …/content?index=N for the mp3.

Media typeapplication/json
MusicCreateRequest
object
idempotency_key
Any of:
string
>= 1 characters <= 128 characters
webhook_url
Any of:
string
<= 2048 characters
wait
Wait

Hold the request until the job is terminal (or wait_timeout) and return the final job object. Default false — return the queued job immediately and poll.

boolean
wait_timeout
Wait Timeout

Seconds to wait when wait=true; on timeout the job is returned as is (still running).

integer
default: 60 >= 1 <= 300
model
Model

Suno / suno-v6 (song with vocals, 2 tracks) or lyria / lyria-pro (instrumental, 1 track).

string
default: suno
prompt
Any of:
string
<= 5000 characters
mode
Mode

Suno: simple (from prompt) | custom (from lyrics+style+title). Ignored by Lyria.

string
default: simple
lyrics
Any of:
string
<= 5000 characters
style
Style

Suno custom: genre, style, tags.

string
"" <= 500 characters
title
Title

Suno custom: track title.

string
"" <= 200 characters
Example
{
"model": "suno",
"prompt": "lo-fi hip-hop, rain outside the window, calm"
}

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}