Reference · Tools

Gemini Music Gen

Generate music using Google Lyria models via Gemini.

Action (binary) AI v1 Binary data

Gemini Music Gen calls the Google Gemini API with Lyria models to turn a text description into a WAV or MP3 audio file. Connect it to a content pipeline to automatically score background music for videos, podcasts, or apps based on a mood or scene description. The generated audio is stored as binary data and referenced by a metadata pointer, keeping your workflow items lean.

Node type
Action (binary)
Parameters
5
Outputs
Output, Error
Credentials
Google AI

Gemini Music Gen

Generate music using Google Lyria models via Gemini.

Overview

Gemini Music Gen uses the Google Gemini API with Lyria models to generate music audio from a text prompt. It sends a music description with an audio response modality, receives the generated audio inline, and stores it as binary data on the output item. Results come back as WAV or MP3 files, referenced by a lightweight metadata pointer so large audio never travels through the item JSON.

Category: AI
Tool Name: gemini_music_gen
Version: 1

Appearance: Icon: gemini | Color: #ffffff

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Google AI credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoThe Lyria model to use for music generation. The dropdown lists the models currently available for this node; leave it unset to use the default.
PromptstringYesText description of the music to generate. Describe genre, mood, instruments, tempo, etc. If empty, falls back to the input item’s “prompt” field. Supports expressions.
OptionscollectionNo{}Optional generation settings.
— Binary Property NamestringNodataThe name of the binary property where the generated audio file will be stored. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Include InputbooleanNofalseWhether to include the original input item fields in the output alongside the generated audio.
Max ConcurrencynumberNo5Maximum number of items to process concurrently.

Output Data

One output item per input item. The audio file is written to the binary property named by Binary Property Name (default data) as music.wav, music.mp3 or music.ogg depending on what the model returns. Binary data arriving from upstream is preserved.

The output item’s JSON contains only the fields below. The input item’s JSON is merged in only when Include Input is on:

FieldDescription
modelThe model that generated the audio.
promptThe prompt actually used, after expressions were resolved and any fallback to the item’s own prompt field.
mimeTypeMedia type of the stored audio.
fileSizeSize of the stored audio in bytes.
finishReasonWhy generation stopped, when the model reports one.

A request that comes back without audio is treated as an item error rather than a silent empty result.

Reference the result downstream by expression, e.g. {{ $json.fileSize }}, and the audio itself through the binary property name you configured.

Usage Examples

  • Generate a calm lo-fi hip hop beat
  • Create an upbeat electronic dance track
  • Compose ambient background music for a video
  • Produce a jazz piano piece with brush drums
  • Generate a cinematic orchestral score

Example Configuration

Generate a clip with the defaults:

{
  "type": "gemini_music_gen",
  "parameters": {
    "prompt": "Relaxing acoustic guitar fingerpicking, slow tempo, warm tone"
  }
}

A cinematic clip stored under its own binary property:

{
  "type": "gemini_music_gen",
  "parameters": {
    "prompt": "Epic cinematic orchestral music with dramatic brass, sweeping strings, and powerful percussion",
    "includeInput": true,
    "maxConcurrency": 3,
    "options": {
      "binaryPropertyName": "audioClip"
    }
  }
}

Take the description from each item — leave Prompt empty and the node reads the item’s own prompt field:

{
  "type": "gemini_music_gen",
  "parameters": {
    "prompt": "",
    "includeInput": true,
    "maxConcurrency": 2,
    "options": {
      "binaryPropertyName": "backgroundMusic"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Gemini Music Gen generates original music audio from text prompts by calling the Google Gemini API with Lyria models using the audio output modality. Use this tool when a workflow needs to produce scored audio, background music, or soundscapes derived from a natural-language description. It outputs a lightweight metadata pointer referencing base64-decoded WAV or MP3 binary audio data stored in the binary store. Clip length is not configurable — the Lyria request carries no duration field, so length is whatever the model returns for the prompt.

Frequently asked questions

What credentials do I need to use this node?

You need a Google AI credential (type: googleAi) configured in BusyBot. This is the same credential type used for other Gemini-based nodes, so if you've already connected to the Gemini API elsewhere in your workspace, you can reuse that credential here.

Can I control how long the generated audio clip will be?

No. Clip duration is not configurable — the Lyria request sent by this node carries no duration field. The model decides the length based on your prompt. If you need a specific length, your best option is to experiment with prompt wording, but there is no parameter to set seconds or bars directly.

How does the audio data come back through my workflow?

The node stores the base64-decoded audio in BusyBot's binary store and attaches a lightweight metadata pointer to the output item. The raw audio bytes never travel through the item JSON itself, which means downstream nodes won't be slowed by a large payload. You reference the audio through that pointer the same way you'd handle any other binary file node output.

What file format does the node output — WAV or MP3?

The node can return either WAV or MP3 depending on what the Gemini API returns for the given prompt and model response. You don't select the format explicitly; the output format is whatever the Lyria model produces. Check the binary metadata in the output item to confirm the format before passing the file to a converter or storage node.

When should I use this node instead of a generic HTTP request to the Gemini API?

Use this node when you want music audio output without manually constructing the audio response modality payload, handling base64 decoding, or wiring binary storage yourself. The node handles all of that — prompt in, binary audio file out. A raw HTTP node would require you to replicate that logic and manage binary data manually.

Build with the Gemini Music Gen node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Google AI credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.