Skip to main content
Glama

Generate Music

generate_music

Use this to create an AI music track (full songs with vocals, or instrumentals). Three models: music-3.0 (default, 200 credits — songs from a prompt and/or lyrics, lyrics optimizer on by default so a prompt alone works), mureka-v9 (60 credits — sings the user's EXACT lyrics verbatim, or instrumental/BGM), and lyria-3 (100 credits — high-fidelity from a rich prompt, can condition on up to 10 reference images), and sonilo-music (instrumental/background music of an EXACT length via duration, 5–360 s — priced PER SECOND at 4 credits/s with a 10-second minimum, no vocals). VIDEO-TO-MUSIC: pass a video URL (upload_media first for local files) and sonilo-video-music composes a licensed soundtrack for the clip's content, pacing and mood — priced per second of the video's measured length (15 credits/s, 10 s minimum, ≤360 s). Flat price per track (per second for the Sonilo models), charged on success only; the user's plan discounts apply automatically. Submits an async job and returns a numeric job_id — music takes a minute or three: poll check_generation_status with the job_id AND type "music" every 15–30 seconds, then share the finished track's listen/download link with the user (chat can't embed audio players).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoMusic model id. Omit for the default (music-3.0 — latest MiniMax, all-purpose songs, 200 credits; passing a video auto-selects sonilo-video-music). Alternatives: music-2.6 (previous generation, same price), mureka-v9 (sings exact lyrics, cheapest at 60), lyria-3 (high-fidelity, image conditioning, 100), sonilo-music (instrumental/background music of an exact length, priced per second — pass duration). Call list_models for details.
videoNoVideo-to-music: URL of a video (≤360 s, ≤30 MB for public URLs) to compose a licensed soundtrack FOR — the music follows the clip's content, pacing and mood, and matches its length. Must be a URL — upload local files with upload_media first. Uses sonilo-video-music: 15 credits per second of the video's measured duration (10-second minimum). prompt becomes optional direction (genre/mood/instrumentation); no lyrics or duration.
formatNomusic-2.6/music-3.0 only: output audio format, wav (default) or mp3.
imagesNolyria-3 only: up to 10 reference images to condition the mood — each a URL, data URI, or raw base64 (upload local files with upload_media).
lyricsNoLyrics to sing. mureka-v9 sings them VERBATIM ([verse]/[chorus] tags supported); music-2.6/music-3.0 polish them unless lyrics_optimizer is false; lyria-3 treats them as optional guidance.
promptNoStyle/mood description of the track. Required for lyria-3 (10–2000 chars) and for instrumental tracks; optional on music-2.6/music-3.0 when lyrics are given.
durationNosonilo-music only: track length in seconds (5–360, default 30). Billed per second with a 10-second minimum (4 credits/s → 30 s = 120 credits). Other music models ignore length (sonilo-video-music sizes the music to the video).
instrumentalNoGenerate an instrumental track (no vocals). music-2.6/music-3.0 and mureka-v9 (mureka requires a prompt in this mode).
vocal_genderNomureka-v9 only: preferred vocal gender for songs (default auto).
lyrics_optimizerNomusic-2.6/music-3.0 only. Write/polish lyrics from the prompt — DEFAULT TRUE (matches web/API). Set false to sing the provided lyrics as-is.

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the sparse annotations by disclosing async job submission, numeric job_id return, polling cadence with check_generation_status using type "music", success-only billing, per-second pricing, and automatic plan discounts. It also warns that chat cannot embed audio players, which is important for the agent's user interaction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but densely packed with essential decision-making and operational details. It is front-loaded with the core purpose, and the model/pricing/video sections are logically organized. A few details are repeated from the schema, but the overall structure is efficient for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters, no output schema, and modest annotations, the description is remarkably complete. It explains return behavior (numeric job_id), how to poll for results, how to deliver the finished track, billing semantics, and model-specific constraints. There is no obvious missing information that would prevent correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaningful interpretative detail beyond the schema, such as the credit cost per model, the 10-second minimum billing, the default lyrics_optimizer behavior, and the fact that passing a video auto-selects sonilo-video-music. This helps the agent choose parameter values correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: "create an AI music track (full songs with vocals, or instrumentals)". It clearly distinguishes this from sibling tools like generate_sound_effect and generate_video, and the model details further refine what the tool produces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive decision guidance for model selection: exact lyrics use mureka-v9, high-fidelity/image conditioning use lyria-3, exact-length instrumentals use sonilo-music, and video soundtracks use sonilo-video-music. It does not explicitly state exclusions or direct when-not-to-use versus sibling tools, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: generation is split cleanly by media type, status polling is centralized, and upload/upscale/history/credits/social-post tools are clearly separate. Cross-references inside descriptions (e.g., sound effects vs music) remove any real ambiguity.

Naming Consistency5/5

All tool names follow the same predictable verb_noun snake_case pattern (generate_image, get_credit_balance, upscale_video, create_social_post). There are no mixed conventions, abbreviations, or vague generic verb names.

Tool Count5/5

Twelve tools is a well-scoped size for a media generation platform: four generation tools, two upscalers, and supporting utilities for status, history, models, uploads, credits, and social sharing. Each tool earns its place and none feel redundant.

Completeness5/5

The tool surface covers the full user workflow: discover models, upload inputs, generate all media types, poll async jobs, review history, upscale results, check credits, and share finished work. Non-essential lifecycle operations like job cancellation are absent but do not create dead ends for the stated purpose.