PiAPI Udio icon

PiAPI Udio

Generate music using PiAPI Udio

Overview

This node integrates with the PiAPI Udio service to generate music and lyrics based on user input prompts. It supports three main operations:

  • Generate Music: Create new music tracks from descriptive text prompts, optionally including generated or user-provided lyrics.
  • Generate Lyrics: Produce song lyrics from a textual prompt.
  • Extend Song: Continue an existing song from a specified time position.

Common use cases include automating music creation workflows, generating custom songs for multimedia projects, or experimenting with AI-assisted songwriting. For example, a user can input a description like "night breeze, piano" to generate a calm instrumental track or provide full lyrics to create a styled song.

Properties

Name Meaning
Operation The action to perform: Generate Music, Generate Lyrics, or Extend Song.
Lyrics Type How lyrics are handled when generating/extending music:
- Generate: AI generates lyrics
- Instrumental: No lyrics, just music
- User Provided: Use custom lyrics supplied by user
Description Prompt Descriptive text prompt guiding music generation (e.g., "night breeze, piano"). Required for Generate and Instrumental lyrics types.
Style Tags Style tags describing the music style (e.g., "jazz, pop"). Used only when Lyrics Type is User Provided.
Lyrics Full song lyrics with structure markers like [Verse], [Chorus]. Required if Lyrics Type is User Provided.
Lyrics Prompt Text prompt to guide lyrics generation. Required for Generate Lyrics operation.
Continue Song ID Identifier of the song to extend. Required for Extend Song operation.
Continue At Time in seconds to continue the song from. Optional for Extend Song operation.
Additional Options Collection of optional parameters:
- Negative Tags: Comma-separated tags to avoid in generation.
- Seed: Number for reproducible results (-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 an array of JSON objects, each representing the result of a generation task. The JSON typically contains:

  • Task metadata and status.
  • Generated music or lyrics data depending on the operation.
  • If "Wait for Completion" is enabled, the output includes the completed task results.

Binary data is not explicitly handled or returned by this node; all outputs are JSON structured responses from the PiAPI Udio service.

Dependencies

  • Requires an API key credential for PiAPI authentication.
  • Uses internal helper functions (piApiRequest and waitForTaskCompletion) to communicate with the PiAPI Udio REST API.
  • The node expects network access to PiAPI endpoints.
  • No additional environment variables are required beyond the API credential.

Troubleshooting

  • Common Issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Providing incomplete or empty required fields (e.g., missing description prompt or lyrics) will result in errors.
    • Using an invalid song ID when extending a song may cause task failure.
    • Network issues or service downtime can interrupt requests.
  • Error Messages:

    • Errors from the API are propagated as messages in the output JSON under an error field if "Continue On Fail" is enabled.
    • Typical error messages relate to invalid inputs, unauthorized access, or task processing failures.
  • Resolutions:

    • Ensure all required parameters are correctly filled.
    • Verify API credentials and permissions.
    • Check network connectivity.
    • Use the "Wait for Completion" option to get detailed task results and diagnose issues.

Links and References

Discussion