POST
/
voice
/
song_generator
Generate song from lyrics and reference audio
curl --request POST \
  --url https://modelslab.com/api/v6/voice/song_generator \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "lyrics_generation": true,
  "lyrics": "<string>",
  "prompt": "<string>",
  "init_audio": "<string>",
  "webhook": "<string>",
  "track_id": 123
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "future_links": [
    "<string>"
  ],
  "links": [
    "<string>"
  ],
  "meta": {},
  "eta": 123,
  "message": "<string>",
  "tip": "<string>",
  "fetch_result": "<string>",
  "audio_time": 123
}

Request

Make a POST request to below endpoint and pass the required parameters as a request body.
curl
--request POST 'https://modelslab.com/api/v6/voice/song_generator' \

Body

Sample request when lyrics_generation is false
json
{       
    "key":"your_api_key",   
    "lyrics_generation":false,    
    "init_audio":"https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav",    
    "lyrics":"[00:10.00]Moonlight spills through broken blinds [00:13.20]Your shadow dances on the dashboard shrine [00:16.85]Neon ghosts in gasoline rain",    
    "webhook":null,     
    "track_id": null
}
Sample request when lyrics_generation is true
json
{       
    "key":"your_api_key",   
    "lyrics_generation":true,    
    "init_audio":"https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav",    
    "prompt":"a rock song with lyrics about moonlight and shadows",    
    "webhook":null,     
    "track_id": null
}

Body

application/json
key
string
required

API key for authentication

init_audio
string<uri>
required

URL to reference audio file to influence style

lyrics_generation
boolean

Pass true to generate lyrics automatically

lyrics
string

Lyrics in LRC format (timestamp + lyrics). Required if lyrics_generation is false

prompt
string

Topic for lyrics generation. Required if lyrics_generation is true

webhook
string<uri>

URL to receive POST notification upon completion

track_id
integer

ID for webhook identification

Response

Song generation response

status
enum<string>

Status of the voice generation

Available options:
success,
processing,
error
generationTime
number

Time taken to generate the audio in seconds

id
integer

Unique identifier for the voice generation

output
string<uri>[]

Array of generated audio URLs

Array of proxy audio URLs

Array of future audio URLs for queued requests

Array of audio URLs (voice cover response)

meta
object

Metadata about the audio generation including all parameters used

eta
integer

Estimated time for completion in seconds (processing status)

message
string

Status message or additional information

tip
string

Additional information or tips for the user

fetch_result
string<uri>

URL to fetch the result when processing

audio_time
number

Duration of the generated audio in seconds