Generate music from a text prompt
Table of contents
June 24, 2026
- Model Comparison Matrix
- Output modes
- Request Headers
- Request Body
- Parameters
- Responses
- Model
- Examples
- Try It
Use a pixverse.ai account to generate music. A prompt describes the track, and you can produce three kinds of output β an instrumental, a vocal track with model-written lyrics, or a vocal track with your own lyrics.
Generation is asynchronous. The call returns an audio_id immediately, then poll GET music/audio_id until audio_status_final is true, or pass a replyUrl to receive the result by callback.
Model Comparison Matrix
| Model | Prompt max | Custom lyrics | Reference images | PixVerse Credits / Cost | Provider cost* |
|---|---|---|---|---|---|
MiniMaxmusic-2.6 (default) | 2,000 | yes, up to 3,500 chars | β | 40 cr / $0.16 | ~$0.15 / track (β€5 min) |
ElevenLabsmusic-v1 | 4,000 | yes, up to 3,500 chars | β | 150 cr / $0.60 | $0.15-$0.18 / min β ~$0.60-$0.90 |
Google Lyrialyria-3-pro-preview | 5,000 | β | 1-10 via image_path_1β¦10 | 20 cr / $0.08 | $0.08 / song (up to 3 min) |
PixVerse cost is for a $60/m Premium plan ($0.004 per credit, as of June 2026) β use the cost calculator for other plans. *Provider cost is going direct to the modelβs own provider; prices change, check their pages.
All models generate at an automatic duration (the model chooses the length, typically 2-5 minutes). lyria-3-pro-preview does not accept custom lyrics, but it can still produce vocals with model-written lyrics β see instrumental and lyrics below.
Lyria 3 Pro is also available through Flow Music, which runs the same model at a lower price with many more features β cover and restyle, lyrics-adjust remix, extend and replace, and audio effects.
Output modes
The output is determined by instrumental and lyrics β there is no separate auto_lyrics flag, it is derived:
| Request | Result |
|---|---|
instrumental: true | instrumental, no vocals |
lyrics provided | vocals sung from your lyrics (music-2.6 / music-v1 only) |
| neither | vocals with lyrics written by the model |
To retrieve generated music, use:
- GET music/
audio_id - GET music to list all tracks
To cancel a track that is still generating, use DEL scheduler/id.
https://api.useapi.net/v2/pixverse/music/create
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"email": "Optional PixVerse API account email",
"prompt": "Required text prompt",
"model": "music-2.6",
"instrumental": false,
"lyrics": "Optional custom lyrics",
"image_path_1": "upload/eb20c63d-2a1a-5be6-a562-d3578a2831e3.png",
"replyUrl": "Place your call back URL here",
"replyRef": "Place your reference id here",
"maxJobs": 3
}
Parameters
-
emailis optional, if not specified API will randomly select account from available accounts. -
promptis required, describe the track you want. Maximum length is model-specific βmusic-2.62,000,music-v14,000,lyria-3-pro-preview5,000 characters. -
modelis optional. Default:music-2.6. See Model Comparison Matrix for the full list. -
instrumentalis optional, defaultfalse. Whentruethe track has no vocals. Cannot be combined withlyrics. -
lyricsis optional and supported bymusic-2.6andmusic-v1only β providing it onlyria-3-pro-previewis rejected with 400. The vocals are sung from the text you supply. Cannot be combined withinstrumental. Maximum length 3,500 characters. -
image_path_1throughimage_path_10are optional and supported bylyria-3-pro-previewonly. Reference image file paths uploaded via POST files that condition the music. Reference images must be provided sequentially βimage_path_2requiresimage_path_1, etc. -
replyUrlis optional, place here your callback URL. This is the preferred and most optimal way to receive results quickly β the API polls every 10 seconds and will call the providedreplyUrlonce the track is completed or failed. We recommend using sites like webhook.site to test callback URL functionality. Maximum length 1024 characters. Callback body has the same JSON shape as GET music/audio_idresponse. -
replyRefis optional, place here your reference id which will be stored and returned along with this music response / result. Maximum length 1024 characters. -
maxJobsis optional, if not specified value from selected accounts/email will be used. It should not exceed the number of concurrent generations supported by your account subscription plan. Valid range: 1β¦8
Responses
-
Use the returned
audio_idto retrieve status and results using GET music/audio_id. Checkaudio_status_nameforCOMPLETEDandurlfor the generated.mp3link.If you specify the optional parameter
replyUrl, the API will call the providedreplyUrlwith progress updates until the track is complete or fails.{ "audio_id": "user:<userid>-pixverse:<email>-music:<number>", "asset_id": 409848161653065, "asset_type": 2, "asset_source": 1, "create_mode": "music", "status": "making", "audio_status": 5, "credits": 40, "audio_status_name": "QUEUED", "audio_status_final": false } -
Returned when a parameter is invalid, for example a prompt longer than the model allows,
lyricsonlyria-3-pro-preview, orlyricscombined withinstrumental.{ "error": "<Error message>", "code": 400 } -
{ "error": "Unauthorized" } -
Insufficient credits. All Credits have been used up. Please upgrade your membership or purchase credits.
{ "error": "All Credits have been used up. Please upgrade your membership or purchase credits." } -
Wait in a loop for at least 10..30 seconds and retry again.
The API query is full and can not accept new music/create requests. Size of the query is defined by the
maxJobsoptional parameter.{ "error": "Account <email> is busy executing <maxJobs> tasks." "All configured accounts are running at maximum capacity." } -
596 Pending mod message
Your PixVerse.ai account has a pending error. Most likely, you changed your account password or your PixVerse.ai account was placed on hold. Once the issue is resolved, update your account to clear the error by executing POST accounts/email before making any new API calls.
{ "error": "Your PixVerse account has pending error." "Please address this issue at https://useapi.net/docs/api-pixverse-v2/post-pixverse-accounts-email before making any new API calls." }
Model
{ // TypeScript, all fields are optional
audio_id: string
asset_id: number
asset_type: number
asset_source: number
create_mode: string
status: string
audio_status: number
credits: number
error: string
code: number
// added
audio_status_name: string
audio_status_final: boolean
}
Examples
-
curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer β¦" \ -X POST "https://api.useapi.net/v2/pixverse/music/create" \ -d '{"prompt": "An upbeat synthwave track with a clear female vocal"}' -
const prompt = "An upbeat synthwave track with a clear female vocal"; const apiUrl = `https://api.useapi.net/v2/pixverse/music/create`; const token = "API token"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ prompt }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result}); -
import requests prompt = "An upbeat synthwave track with a clear female vocal" apiUrl = f"https://api.useapi.net/v2/pixverse/music/create" token = "API token" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } body = { "prompt": f"{prompt}" } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json())