Generate
一步到位:一句话 → 完整歌曲(扣 1 次)/ One-shot: text in, finished song out (1 credit)
服务端自动完成编译 → 生成 → 等待。最多等待 waitSeconds(默认 120 秒,上限 180):完成返回 200,超时仍在生成返回 202,之后用 GET /v1/generations/{id} 继续查。扣 1 次额度,返回 2 首候选。
Compiles, submits and waits in one call. Waits up to waitSeconds (default 120, max 180): 200 when finished, 202 if still running (keep polling GET /v1/generations/{id}). Costs 1 credit; returns 2 candidate tracks in generation.clips. A typical song takes 1–3 minutes.
post/v1/songs
Request
- Base URL: https://api.musicsforyou.com
- URL: https://api.musicsforyou.com/v1/songs
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://www.musicsforyou.com/oauth/authorize, token URL https://api.musicsforyou.com/oauth/token, scopes: music)
Request body
Example request
{
"text": "A warm birthday song for my mom who loves singing in the kitchen"
}Response
已完成 / Finished (generation.status = finished)
Example response
{
"generation": {
"spec": {
"composition": {
"sections": [
{
"label": "Verse 1"
}
]
}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.