Index of every page on this site: llms.txt
All skills
openmontageinc avatar

/music

@2e003e6
by openmontageincopenmontageinc/openmontage82k stars
11,135
Run it yourself

Generate music using ElevenLabs Music API. Use when creating instrumental tracks, songs with lyrics, background music, jingles, or any AI-generated music composition. Supports prompt-based generation, composition plans for granular control, and detailed output with metadata.

Use this Skill: https://skilld.dev/gh/openmontageinc/openmontage/music

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesapi_reference.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Music API Reference

Table of Contents

compose

Generate music from a text prompt. Returns an audio stream.

Parameters

Parameter Type Required Description
prompt string Yes* Description of desired music
composition_plan object Yes* Pre-defined composition plan (alternative to prompt)
music_length_ms integer No Duration in milliseconds (3,000–600,000) when using prompt; if omitted, the model chooses
model_id string No Defaults to music_v1
force_instrumental boolean No Guarantee an instrumental output (prompt mode only)
respect_sections_durations boolean No Enforce exact duration_ms in each composition plan section

*Provide either prompt or composition_plan, not both.

Python

audio = client.music.compose(
    prompt="An upbeat electronic track with synth leads",
    music_length_ms=30000
)

with open("output.mp3", "wb") as f:
    for chunk in audio:
        f.write(chunk)

JavaScript

const audio = await client.music.compose({
  prompt: "An upbeat electronic track with synth leads",
  musicLengthMs: 30000,
});

const writeStream = createWriteStream("output.mp3");
audio.pipe(writeStream);

With Composition Plan

plan = client.music.composition_plan.create(
    prompt="A jazz ballad with piano and saxophone",
    music_length_ms=60000
)

# Modify the plan as needed
audio = client.music.compose(
    composition_plan=plan,
    music_length_ms=60000
)

composition_plan.create

Generate a structured composition plan from a prompt for granular control before generating audio.

Parameters

Parameter Type Required Description
prompt string Yes Music description
music_length_ms integer Yes Duration in milliseconds

Response Structure

{
  "positiveGlobalStyles": ["jazz", "smooth", "warm"],
  "negativeGlobalStyles": ["aggressive", "distorted"],
  "sections": [
    {
      "name": "Intro",
      "localStyles": ["soft", "building"],
      "duration_ms": 15000,
      "lines": [
        { "text": "Instrumental intro", "type": "instrumental" }
      ]
    }
  ]
}

Python

plan = client.music.composition_plan.create(
    prompt="A peaceful ambient track with nature sounds",
    music_length_ms=60000
)

# Inspect and modify the plan
print(plan.positiveGlobalStyles)
for section in plan.sections:
    print(f"{section.name}: {section.duration_ms}ms")

compose_detailed

Generate music while returning both the composition plan and metadata alongside the audio.

Returns

Field Description
json Composition plan + song metadata (includes lyrics if applicable)
filename Output file identifier
audio Audio bytes

Python

result = client.music.compose_detailed(
    prompt="A pop song about summer adventures",
    music_length_ms=120000
)

# Access the composition plan and metadata
print(result.json)

# Save the audio
with open(result.filename, "wb") as f:
    f.write(result.audio)

upload

Upload a music file for later inpainting workflows. This endpoint is available to enterprise clients with access to the inpainting feature.

Parameters

Parameter Type Required Description
file file Yes The audio file to upload
extract_composition_plan boolean No If true, the response includes an extracted composition plan and may take longer to return

Returns

Field Description
song_id Unique identifier for the uploaded song
composition_plan Extracted composition plan, or null when extract_composition_plan is not enabled

Python

client.music.upload(
    file="example_file",
)

cURL

curl -X POST "https://api.elevenlabs.io/v1/music/upload" \
  -H "xi-api-key: $ELEVENLABS_API_KEY" \
  -F "file=@<file1>"

Error Handling

bad_prompt

Occurs when the prompt references copyrighted material (specific artists, bands, or copyrighted lyrics). The error response includes a prompt_suggestion with alternative phrasing.

try:
    audio = client.music.compose(
        prompt="A song like Beatles",
        music_length_ms=30000
    )
except Exception as e:
    print(f"Request failed: {e}")

bad_composition_plan

Returned when a composition plan contains copyrighted styles. The error includes a composition_plan_suggestion with corrected styles. No suggestion is provided for harmful content.

Common HTTP Errors

Code Meaning
401 Invalid API key
422 Invalid parameters
429 Rate limit exceeded

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts11d3 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    The skill is a standard integration with the ElevenLabs Music API. It is considered low risk, primarily due to the potential for indirect prompt injection when processing music generation prompts sourced from external data.

  • Socket12d

    No alerts

  • Snyk11d

    Risk: LOW · No issues

Signed by skilld at 2e003e6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 8 months ago
compatibility
Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).
Other metadata
metadata
{
  "openclaw": {
    "requires": {
      "env": [
        "ELEVENLABS_API_KEY"
      ]
    },
    "primaryEnv": "ELEVENLABS_API_KEY"
  }
}

README badge

README badge for openmontageinc/openmontage/music