# Hermoso: generate_music: Generate music · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/create/generate_music/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Creative generation](https://hermoso.ai/docs/reference/create/) / generate_music

# `generate_music`

Generate music

Area: raw playground: voice · [Creative generation](https://hermoso.ai/docs/reference/create/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

RAW music: describe it (genre, mood, instruments, tempo), get an instrumental MP3. No length: a full track at a flat fee (explainerMusicCredits in hermoso_capabilities). With seconds: by the second up to about 38 s. A named model always runs.

## Parameters

Parameter Type Description

`prompt` required `string` the music in words, e.g. 'lo-fi jazz, brushed drums, 80 bpm'

`seconds` `number` track length, up to 300

`model` `string` minimax-music-3 or lyria-3.5

`get_cost` `boolean` true: return the price only; nothing runs or bills

`expected_credits` `number` the get_cost price; refused unbilled if the live price differs

`idempotency_key` `string` chosen once, resent unchanged on retries: the same key never buys twice

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/generate_music`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_music","arguments":{"prompt":"<string>"}}}`
**CLI**

`hermoso call generate_music --json '{"prompt":"<string>"}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [hermoso_capabilities](https://hermoso.ai/docs/reference/publish/hermoso_capabilities/) Hermoso models, options and credit costs
- [generate_sfx](https://hermoso.ai/docs/reference/create/generate_sfx/) Generate a sound effect
- [generate_text](https://hermoso.ai/docs/reference/create/generate_text/) Generate text
- [generate_voice](https://hermoso.ai/docs/reference/create/generate_voice/) Generate voiceover or dialogue

[All 102 Creative generation tools](https://hermoso.ai/docs/reference/create/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
