// AGENT MEDIA · CLAUDE CODE
Claude Code music generation: one command, one MP3
Install Clize and Claude Code can score things: clize gen music "warm lo-fi house, mellow piano, loopable" --instrumental --confirm submits the track and writes an MP3 into your working directory. It costs $0.12, flat, however long the track turns out — and how long it turns out is not something you set. The duration flag is accepted by the command line but is not forwarded to the model, so the model decides; --instrumental is the switch that genuinely takes effect, and the prompt is the rest of the control surface. Failures are refunded. Nothing is charged until you add --confirm. There is no Suno account, no API key, and no browser step anywhere in the loop.
One command, one MP3
Search this and you get a shelf of hobby projects — a repo, a couple of forum threads, a personal blog post about wiring Claude to a music service by hand, a Show HN. Every one of them is somebody solving it for themselves, and not one is a product you can install. That is unusual for a search term in 2026 and it is the honest reason this page exists.
The installed version:
$ npm i -g @clize/clize
$ clize install --claude
$ clize gen music "warm lo-fi house, mellow piano, cosy and unhurried, loopable" --instrumental --confirm
The command submits the track, waits for it, downloads it and writes an MP3. What returns through stdout is the record, not the audio: a job id, the model, the state, the file path and the cost. A real row from clize gen list --modality music on this account:
{
"id": "gen_580562d1",
"modality": "music",
"model": "suno",
"state": "succeeded",
"costUsd": 0.12,
"prompt": "warm aesthetic chill lo-fi house, soft mellow piano and gentle beat, …"
}
No account with the music provider is created, and no key of yours is involved — the hosted path carries the credential, the same way picture generation works from the same install. What you spend comes out of your Clize balance, and you are shown the figure first.
How long is the track? Not something you set.
This is the question that sends people to the search box, so here is the unvarnished version rather than a flag list.
clize gen music advertises a --duration <sec> option. The command line accepts it. It travels as far as the request, and then the adapter that talks to the music model does not put it in the payload — the body carries your prompt and the instrumental switch, and nothing else. The practical result is that the value has no effect: the model returns a track of whatever length it thinks the prompt implies, typically a couple of minutes, and passing --duration 30 does not shorten it.
We would rather write that down than let you discover it after three paid attempts. Two things follow.
- Ask for length in the prompt, not in a flag. Words like short loop, eight-bar idea, seamless loopable bed steer the result far more than any argument you can pass. It is steering, not control, and the difference is worth budgeting for.
- Trim afterwards. For a background bed under a page or a clip, the reliable path is to generate once, then cut to length with whatever audio tool you already have. An MP3 in your working directory is easy to hand to
ffmpeg; a track locked inside a web app is not.
Length also has no bearing on what you pay, which removes the usual reason to fight the flag — see the pricing section below. And it is a different situation from video, where the eight-second ceiling is a hard, documented model limit rather than a dropped argument; that page covers the video side.
The one switch that does take effect
--instrumental is forwarded, and it does what it says: no vocals. For the majority of what agents are actually asked to produce — a bed under a product demo, a loop behind a landing-page hero, hold music, a title sting — that is the switch you want, because generated lyrics are the fastest way to make a professional-looking thing look unserious.
$ clize gen music "sparse ambient pad, slow swell, no percussion, for a product demo" --instrumental --confirm
$ clize gen music "upbeat indie-pop chorus with a lead vocal, summer festival energy" --confirm
Everything else lives in the prompt, and prompts for music behave differently from prompts for pictures. Genre, instrumentation, tempo feel, mood and use case all land. Structural instructions — a verse here, a drop at forty seconds — mostly do not. Write the brief a producer could act on in one sentence, then judge the result by ear and rewrite. At twelve cents an attempt, three tries to find the right register is cheap; what is expensive is the listening time, which is the subject two sections down.
One model is available today, named suno, and it is the default — so --model is a flag you can ignore until there is a second one.
What lands on disk: an MP3, and a record of it
The output format is MP3, served as audio/mpeg. Behind the scenes the finished track sits at a durable URL on the provider’s file host; the CLI fetches those bytes and writes them locally, so the copy you end up with is a file you own rather than a link that may rot. By default it goes to ./clize-assets/, and --out ./bed.mp3 puts it wherever you like.
$ clize gen music "slow ambient bed, warm tape hiss" --instrumental --out ./assets/bed.mp3 --confirm
Two conveniences come with that. clize gen list --modality music replays every track ever generated on the account with its prompt, cost and source URL — useful because a filename tells you nothing about a piece of music and a prompt tells you everything. And a long job survives a dead session: --async returns the job id immediately, clize gen jobs lists running work first, and clize gen status <id> polls once and writes the file if it has finished. Music jobs are usually quicker than video, but the same machinery is there when a batch is queued.
From disk, the track is just an asset. It can go into a site you are about to publish, ride along as an email attachment for a client to approve — that mail still stops for your confirmation — or sit under a clip you made with the same install. That is the practical argument for a CLI over a browser tool: the thing you generated is already in the directory where the next step needs it.
Twelve cents, regardless of length
Run the command without --confirm and it spends nothing at all — it prints the quote and stops:
$ clize gen music "warm lo-fi house, mellow piano"
{ "quote": { "model": "suno", "modality": "music", "estUsd": 0.12, "currency": "USD" },
"message": "📋 Quote about $0.12 (music). Add --confirm to generate." }
The figure does not move. There is no per-second term and no per-minute term in music pricing here, so a ninety-second loop and a three-minute piece cost the same twelve cents. Combined with the length behaviour above, the planning rule is refreshingly short: count attempts, not minutes.
Failed jobs are refunded automatically — the balance is debited when the job is submitted and credited back if the provider errors, if the submission is rejected, or if a poll later reports failure. What is not refunded is a track that arrives and simply is not right; it was generated, so it was billed, and the next attempt is another twelve cents. There is no pre-approved allowance and no self-service spending ceiling in the hosted product: the gate is --confirm on each call, which is deliberately blunt and has no mode where a loop drains a budget quietly. The command reference marks every verb that can spend.
Somebody has to listen, and it cannot be the agent
Claude can open a PNG and tell you the crop is wrong. It has no ears. When a track finishes, the hint Clize returns alongside the file says exactly that — the bytes are on disk, audio cannot be judged from here, hand the path to a person and let them decide rather than concluding for them. The skill carries the same rule, so a session that behaves well gives you a filename and its own uncertainty instead of a verdict.
That makes music the slowest of the three modalities in a way that has nothing to do with the API. Generating six candidate loops takes one command each and costs seventy-two cents; auditioning six loops takes you six times however long each one runs. The economics of the workflow are dominated by your attention, not by the bill, which suggests a different habit from image work: generate two or three deliberately different directions rather than eight variations on one, and listen to the first fifteen seconds of each before committing to a full pass.
None of this is exposed as an MCP tool, and the page will not imply otherwise — generation lives in the CLI, invoked by the skill. The MCP server covers the other side of Clize: mail, domains, deploys and the storefront. It is not needed to make a track.
// FAQ
Can Claude Code generate music?
Not on its own, but with the Clize skill installed it runs clize gen music "<prompt>" --confirm, which submits the job, waits for it and writes an MP3 into the working directory. No account with the music provider is created and no API key of yours is involved; the hosted path carries the credential and your Clize balance pays.
How do I control how long the track is?
You largely cannot. The --duration option is accepted on the command line but is not forwarded to the model, so it has no effect; the model picks the length from your prompt, usually a couple of minutes. Ask for a short loop or a seamless bed in the prompt itself, and trim the MP3 afterwards if you need an exact length.
How much does one track cost?
A flat $0.12, and length does not change it — a ninety-second loop and a three-minute piece are billed the same. Running the command without --confirm prints the quote and charges nothing, so the number is always visible before it is spent.
What audio format comes back, and where is it saved?
An MP3, served as audio/mpeg. It is written to ./clize-assets/ by default, or to whatever path --out names. Only metadata comes back through stdout, and clize gen list --modality music replays every track made on the account with its prompt, cost and source URL.
Can I get an instrumental with no vocals?
Yes — --instrumental is forwarded to the model and is the one switch on this command that genuinely takes effect. It is the right default for beds under demos, landing-page loops and title stings, where generated lyrics tend to undercut the result.
Can Claude tell me whether the track is any good?
No, and the tool says so rather than letting it guess. The hint returned with the finished file states that audio cannot be judged from the agent side and that the path should be handed to a person. Generating six candidates costs seventy-two cents; auditioning them costs your listening time, which is the real budget on this modality.
Let Claude Code score it.
One install, twelve cents a track, an MP3 in the directory where the next step already is — and an honest note about the one flag that does not do what it looks like.
$ npm i -g @clize/clize && clize login $ clize install --claude $ clize gen music "warm lo-fi house, mellow piano, loopable" --instrumental[ Agent Media → ]