ModelsLab/Diffrhythm-Short
diffrhythm-shortGenerate full-length songs with vocals and instrumentals in 10 seconds using latent diffusion—supports English and Chinese, 44.1kHz stereo, up to 4m45s tracks, requires only lyrics and style prompts.
API Endpoint URL
Base URL for all API requests to this endpoint.
https://modelslab.com/api/v6/voice/song_generator
API Authentication
Authentication requires a valid API key included in the request. Generate and manage your API keys from your developer dashboard. Include the key in the key parameter for all API requests.
Integration Examples
Production-ready code samples for API integration
{"init_audio": "https://assets.modelslab.com/generations/020e94f6-2928-438d-bd41-5f981cda7aa4.wav","prompt": "Write a soft romantic song about two people meeting under the rain for the first time, in an acoustic guitar style.","lyrics": "[00:10.00]In the gentle rain, where our eyes first met[00:14.00]Two souls wandering, lost in silhouettes[00:18.00]With a smile that warmed the coldest night[00:22.00]We found our hearts in the soft moonlight","lyrics_generation": true,"model_id": "diffrhythm-short","webhook": null,"track_id": null,"key": "YOUR_API_KEY"}
SDKs
Official SDKs
Production-ready SDKs and client libraries for all major programming languages
API Parameters
Technical specifications for API request parameters.
| Field Name | Parameter | Technical Description |
|---|---|---|
| Audio refrence | init_audio | reference audio file to Copy the style of music |
| prompt | prompt | Enter topic of the song you want to generate. Only useful when Generate Lyrics is set true |
| Lyrics | lyrics | Lyrics must be provided in LRC format (including timestamps and lyric lines). This field is required if lyrics_generation is set to false. |
| Generate Lyrics | lyrics_generation | Set generate lyrics true if you want to generate lyrics with the help of prompt, set it false when you want to Enter your own lyrics |
| Model Id | model_id | ID of the music generation model to use Available options: diffrhythm-short, diffrhythm-long |
| webhook | webhook | URL to receive POST notification upon completion |
| track_id | track_id | ID for webhook identification |