Add a songwriting node to a Dify workflow
Dify supports both MCP tools and custom OpenAPI tools: for MCP use https://api.musicsforyou.com/mcp with an Authorization header; for OpenAPI import https://api.musicsforyou.com/openapi-coze.json (3.0.3). Compile first, then generate, with a human-approval node in between if you like.
Steps
- Tools → MCP → add server → URL + Authorization header
- Or Tools → custom → import OpenAPI → openapi-coze.json
- Nodes: compile → approval → generate → get (poll with waitSeconds)
- When credits run out, get_purchase_link returns a checkout URL
Config
The one-shot REST endpoint POST /v1/songs suits a single Dify node: send text and waitSeconds, get the finished song back.
https://api.musicsforyou.com/openapi-coze.jsonHow it works
11 tools: one-call songs, lyrics before you pay, revisions, redo one section, stems, cue-length scoring, plus credits and purchase.
Seeing lyrics is free. One Song ¥19.9 (3 generations); Pro ¥399/year, 30 a month, commercial licence included.
Questions
- Which OpenAPI file?
- Dify and Coze use the 3.0.3 openapi-coze.json; other clients use the 3.1 openapi.json.
- Timeouts?
- waitSeconds goes up to 180; on timeout you get 202 and an id, then GET /v1/generations/{id} to keep waiting.