Overview
The node "PiAPI Udio" enables music generation and extension using the PiAPI Udio service. Specifically, the Extend Song operation allows users to continue an existing song by providing a song ID and optionally specifying where in the song (in seconds) to continue from. The node supports different ways of handling lyrics during the extension: generating new lyrics, creating instrumental music without lyrics, or using user-provided custom lyrics.
This node is beneficial for scenarios such as:
- Extending a previously generated or existing song with additional music and/or lyrics.
- Creating variations or continuations of musical pieces programmatically.
- Integrating AI-driven music generation into workflows that require dynamic song creation or augmentation.
Practical example:
- A user has a song generated earlier and wants to add a new verse starting at 60 seconds. They provide the song ID, specify the continuation time, and choose whether to generate new lyrics, use instrumental only, or supply their own lyrics to extend the song seamlessly.
Properties
| Name | Meaning |
|---|---|
| Lyrics Type | How lyrics should be handled during the extension: - Generate: Automatically generate lyrics based on description. - Instrumental: Create instrumental music without lyrics. - User Provided: Use custom lyrics supplied by the user. |
| Description Prompt | Descriptive prompt for music generation (e.g., "night breeze, piano"). Required if Lyrics Type is "Generate" or "Instrumental". |
| Style Tags | Style tags for the music (e.g., "jazz, pop"). Used when Lyrics Type is "User Provided" to describe the style of the music. |
| Lyrics | Full lyrics text for the song, supporting structure tags like [Verse], [Chorus], etc. Required if Lyrics Type is "User Provided". |
| Continue Song ID | The unique identifier of the existing song to extend. This is required to specify which song will be continued. |
| Continue At | Time position in seconds within the song to start the extension from. Defaults to 0 (start of the song). |
| Additional Options | Collection of optional parameters: - Negative Tags: Comma-separated tags to avoid in generation. - Seed: Number for reproducible generation (-1 for random). - Service Mode: Processing mode ("Default", "Pay-as-you-go", "Host-your-account"). - Wait for Completion: Boolean to wait for task completion before returning results. |
Output
The node outputs JSON data representing the response from the PiAPI Udio service after requesting the song extension. The output includes details about the generated or extended music task, such as task IDs and metadata.
If the "Wait for Completion" option is enabled, the node waits until the music generation task completes and returns the final result data.
The node does not explicitly output binary audio data directly; instead, it provides metadata and references related to the generated music task.
Dependencies
- Requires an API key credential for authenticating with the PiAPI Udio service.
- The node calls the PiAPI Udio REST API endpoints to submit music generation and extension tasks.
- Optional webhook configuration can be set up for asynchronous task completion notifications (though empty in this implementation).
- No other external dependencies are indicated.
Troubleshooting
Common issues:
- Providing an invalid or expired song ID in "Continue Song ID" will cause the extension request to fail.
- Omitting required fields such as "Description Prompt" or "Lyrics" depending on the selected "Lyrics Type" will result in errors.
- Network or authentication failures with the PiAPI Udio API may cause request errors.
Error messages:
- Errors returned from the API will be surfaced as error messages in the node output unless "Continue on Fail" is enabled.
- If "Wait for Completion" is true but the task ID is missing or invalid, the node may fail waiting for task completion.
Resolutions:
- Ensure all required properties are correctly filled according to the chosen options.
- Verify the validity of the song ID and API credentials.
- Enable "Continue on Fail" to allow workflow continuation despite individual item errors.
Links and References
- PiAPI Udio Documentation (hypothetical link, replace with actual if available)
- n8n documentation on Creating Custom Nodes
- General info on AI music generation services and APIs