- Get Started
- Endpoints
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Song(Suno+Udio)
- Trellis
- Luma Dream Machine
- Kling
- Hailuo
- Skyreels
- WanX
- Hunyuan Video
- PiAPI Account Management
- Mmaudio
- DiffRhythm
- Tools
- Resources
- Legacy Documentation
[Udio] Generate Lyrics
POST
https://api.piapi.ai/api/v1/task
Request
Header Params
x-api-key
string
required
Body Params application/json
model
enum<string>
required
Allowed value:
music-u
task_type
enum<string>
required
Allowed value:
generate_lyrics
input
object
required
prompt
string
required
config
object
optional
webhook_config
object
optional
service_mode
enum<string>
optional
the user chose on the workspace setting of your account.
public
means this task will be processed under PAYG mode.private
means this task will be processed under HYA mode.Allowed values:
publicprivate
Example
{
"model": "music-s",
"task_type": "generate_lyrics",
"input": {
"prompt": "White egrets fly over the vast paddy fields"
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
},
"service_mode": ""
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "music-s",
"task_type": "generate_lyrics",
"input": {
"prompt": "White egrets fly over the vast paddy fields"
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
},
"service_mode": ""
}
}'
Responses
🟢200Success
application/json
Body
code
integer
required
data
object
required
task_id
string
required
model
string
required
task_type
string
required
status
enum<string>
required
Allowed values:
CompletedProcessingPendingFailedStaged
input
object
required
output
object
required
meta
object
required
detail
null
required
logs
array [object]
required
error
object
required
message
string
required
Example
{
"code": 200,
"data": {
"task_id": "8ec657c9-a2b8-4ea7-824f-4547d108a779",
"model": "music-u",
"task_type": "generate_lyrics",
"status": "pending",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {},
"output": {
"lyrics_pairs": [
{
"title": "Winter Wind",
"text": "[Verse]\nSnowflakes falling skies so dim\nCold breeze whispers light and slim\nFootsteps fade in frozen sand\nEchoes lost in a snowy land\n\n[Verse 2]\nI walk alone through icy streets\nEach step a heart that's lost its beat\nSilent nights so crystal clear\nWinter wind wipes away my tear\n\n[Chorus]\nWinter wind where do you blow\nThrough the pines and through the snow\nChilling hearts and numbing souls\nWinter's tale forever told\n\n[Verse 3]\nNights are long as shadows grow\nBlankets thick with frost so slow\nFires burn in hearths so bright\nChase away the winter's bite\n\n[Bridge]\nBut even in this icy gloom\nStars above still gently bloom\nGuiding me like whispers kind\nIn the heart of the winter wind\n\n[Chorus]\nWinter wind where do you blow\nThrough the pines and through the snow\nChilling hearts and numbing souls\nWinter's tale forever told"
},
{
"title": "Winter Wind",
"text": "[Verse]\nSnowflakes dance and swirl on high\nSilent whispers from the sky\nFootprints vanish where we tread\nWarmth and shivers in our bed\n\n[Verse 2]\nBreath of frost and cheeks aglow\nTrees like statues in a row\nStars wink through the icy veil\nDreams embark without a sail\n\n[Chorus]\nWinter wind don't let me go\nHold me tight in crystal snow\nEvery chill a sweet embrace\nLife's a wonder in this place\n\n[Verse 3]\nIce skates carve our fleeting flight\nMoonlight paints the world in white\nNorthern lights ignite the night\nFrozen wonder such a sight\n\n[Bridge]\nIn the hush the world stands still\nPeaceful moments winter's thrill\nNature's canvas frost and chill\nEchoes silent hearts they fill\n\n[Chorus]\nWinter wind don't let me go\nHold me tight in crystal snow\nEvery chill a sweet embrace\nLife's a wonder in this place"
}
]
},
"meta": {},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
Modified at 2025-03-20 16:24:24