Reference · Audio
POST/music
Make a song or an instrumental
Make a song or an instrumental, as the Music page does. Simple: describe the song in prompt and leave customMode off (the words and the sound are written for it). Custom: customMode on, the lyrics as sung in prompt (or for an instrumental, how it should feel), with a style and a title. One price a track, whatever the model and length. It comes back as a job (kind "music") to follow with GET /api/v1/jobs/{jobId}, which gives the track and its cover once made.
- Key needs
create· Make things and spend credits- Price it first
POST /music/quote· free- Answers
- A job to follow
Request
curl -X POST https://vessero.com/api/v1/music \ -H "Authorization: Bearer $VESSERO_API_KEY" \ -H "Idempotency-Key: 47f8f6f5-ea00-4fb1-925f-76aac956a0ec" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A warm lo-fi beat for a coffee ad", "instrumental": true, "confirmCredits": 6 }'
Response202 Accepted
{ "object": "job", "id": "music.8f1c2d3e-4b5a-4789-8abc-def012345678", "kind": "music", "status": "working", "stage": "Queued", "files": [], "credits": 58, "url": "/api/v1/jobs/music.8f1c2d3e-4b5a-4789-8abc-def012345678" }
POST/music/quoteFree
The same body without confirmCredits. It answers the price and your balance, and runs nothing.
Header
- Idempotency-KeystringYour id for this request: 8–64 letters, digits, - or _. A repeat within 10 minutes gets the first answer back and never runs twice. Use the same one for the quote and the run.
- Preferstring
wait=N(up to 60): hold the answer up to N seconds while the job is made, within 80 seconds for the whole call.
Body
- promptstringrequiredSimple: the song described, e.g. "An upbeat summer pop song about a road trip" (up to 500 characters are read). Custom: the lyrics as they are sung, with [Verse] and [Chorus] tags (up to 5,000), or for an instrumental, how it should feel.
- customModebooleantrue for custom (lyrics, style and title as given); false for simple. Default: custom when a style or title is given.
- stylestringCustom: the style, e.g. "lo-fi hip hop, warm Rhodes, vinyl crackle".
- titlestringCustom: the track’s title.
- instrumentalbooleantrue for no vocals. Default: with vocals.
- modelstringA music model id from GET /api/v1/models (studio "music"). Default: the newest.
V6V6_MINIV6_WILD - durationintegerA custom instrumental’s length in seconds, 10–360. Otherwise the song sets its own.
- vocalGenderstringCustom: a male (m) or female (f) voice.
mf - negativeTagsstringCustom: styles to keep out, e.g. "heavy metal, screaming".
- styleWeightnumberCustom, 0–1: how strictly it keeps to the style.
- weirdnessConstraintnumberCustom, 0–1: how experimental it may get.
- audioWeightnumberCustom, 0–1: the balance of the audio.
- confirmCreditsintegerrequiredThe price you agree to, in credits: the
creditsits quote gave. It runs at that price, or at a lower one when that figure was quoted for this Idempotency-Key; above the price now, nothing runs (409price_changed). Left out, nothing runs and the error carries the quote. - webhookUrlstring · httpsAn https address to POST the job to once it is done or has failed, signed (see Webhooks).
Answers
- 202jobStarted: follow the job, or wait for its webhook.
- 200jobA job that ended at once: done, or failed (see error and charged).
- 400confirm_credits_requiredA run that spends needs confirmCredits: the quote is in details.
- 402insufficient_creditsThe account has too few credits for this.
- 409price_changedThe price is above the confirmCredits sent: nothing ran; the new quote is in details.
- 422content_refusedThe content check refused it.
- 429daily_cap_reachedThe key’s daily credit cap would be passed: see Retry-After.