Overview
This node integrates with the PiAPI Udio service to generate music and lyrics based on text prompts. It supports three main operations: generating music, generating lyrics, and extending an existing song. The "Generate Lyrics" operation specifically creates song lyrics from a user-provided prompt, which can be useful for songwriters, content creators, or developers building music-related applications.
Practical examples:
- Automatically creating original song lyrics from a theme or idea described in a prompt.
- Generating instrumental music or full songs with custom or AI-generated lyrics.
- Extending an existing song by continuing it from a specified time position.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose between "Generate Music", "Generate Lyrics", or "Extend Song". |
| Lyrics Prompt | Text prompt guiding the generation of lyrics (required for "Generate Lyrics" operation). |
| Lyrics Type | How lyrics are handled when generating music: "Generate" new lyrics, "Instrumental" only, or "User Provided" custom lyrics. |
| Description Prompt | Descriptive prompt for music generation (e.g., "night breeze, piano"). Required for music generation with generated or instrumental lyrics. |
| Style Tags | Style tags for the music (e.g., "jazz, pop"). Used when providing user lyrics. |
| Lyrics | Full custom lyrics text, supporting structure tags like [Verse], [Chorus]. Used when lyrics type is "User Provided". |
| Continue Song ID | The ID of the song to extend (required for "Extend Song" operation). |
| Continue At | Time position in seconds to continue the song from (used in "Extend Song"). |
| Additional Options | Collection of optional parameters:
|
Output
The node outputs JSON data representing the response from the PiAPI Udio service task creation or completion. This includes:
- Task metadata such as task ID and status.
- Generated lyrics or music data depending on the operation.
- If "Wait for Completion" is enabled, the output contains the final result of the generation task.
- No binary data output is indicated; all results are returned as JSON.
Example output snippet (simplified):
{
"task_id": "abc123",
"status": "completed",
"result": {
"lyrics": "...generated lyrics text...",
"music_url": "https://..."
}
}
Dependencies
- Requires an API key credential for PiAPI Udio service authentication.
- Uses internal helper functions (
piApiRequestandwaitForTaskCompletion) to interact with the PiAPI endpoints. - Node configuration must include valid credentials for the external PiAPI service.
- Network access to PiAPI endpoints is necessary.
Troubleshooting
Common issues:
- Missing or invalid API credentials will cause authentication failures.
- Providing incomplete or empty required fields (e.g., missing lyrics prompt) will result in errors.
- Network connectivity problems may prevent task submission or status polling.
- Using "Wait for Completion" may lead to longer execution times; if tasks take too long, consider disabling this option.
Error messages:
- Errors returned from the PiAPI service will be included in the output if "Continue On Fail" is enabled.
- Typical error messages relate to invalid input parameters or service unavailability.
Resolutions:
- Ensure all required inputs are provided and correctly formatted.
- Verify API credentials and network connectivity.
- Adjust "Wait for Completion" setting based on expected task duration.
Links and References
- PiAPI Udio Documentation (hypothetical link for reference)
- n8n documentation on Creating Custom Nodes
- General info on Music Generation APIs