Перейти к содержимому
EN

Quote a music generation

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

Price of POST /audio/music for the same body, without creating a job or charging (flat per generation: Suno — 2 tracks, Lyria — 1).

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-v5 (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": {}
}
]
}