Quote a music generation
POST
/audio/music/price
const url = 'https://api.mixen.ai/v1/audio/music/price';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"model":"suno","prompt":"lo-fi hip-hop, rain outside the window, calm"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
MusicCreateRequest
object
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
model
Model
Suno / suno-v5 (song with vocals, 2 tracks) or lyria / lyria-pro (instrumental, 1 track).
string
mode
Mode
Suno: simple (from prompt) | custom (from lyrics+style+title). Ignored by Lyria.
string
style
Style
Suno custom: genre, style, tags.
string
title
Title
Suno custom: track title.
string
Example
{ "model": "suno", "prompt": "lo-fi hip-hop, rain outside the window, calm"}Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}