Metadata-Version: 2.4
Name: abstractmusic
Version: 0.2.1
Summary: Model-agnostic remote and local music/audio generation abstractions for the Abstract ecosystem
Author-email: Laurent-Philippe Albou <contact@abstractcore.ai>
License-Expression: MIT
Project-URL: Homepage, https://github.com/lpalbou/AbstractMusic
Project-URL: Repository, https://github.com/lpalbou/AbstractMusic
Project-URL: Documentation, https://lpalbou.github.io/AbstractMusic/
Project-URL: Changelog, https://github.com/lpalbou/AbstractMusic/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/lpalbou/AbstractMusic/issues
Keywords: music generation,text-to-music,text-to-audio,song generation,lyrics,audio,ace-step,stable-audio,minimax-music3,mlx,abstractcore
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: remote
Provides-Extra: acestep
Requires-Dist: numpy>=1.24.0; extra == "acestep"
Requires-Dist: torch<3.0.0,>=2.0; extra == "acestep"
Requires-Dist: diffusers>=0.38.0; extra == "acestep"
Requires-Dist: transformers<6.0.0,>=4.0; extra == "acestep"
Requires-Dist: accelerate>=0.0; extra == "acestep"
Requires-Dist: safetensors>=0.0; extra == "acestep"
Requires-Dist: huggingface_hub>=0.20.0; extra == "acestep"
Provides-Extra: diffusers
Requires-Dist: numpy>=1.24.0; extra == "diffusers"
Requires-Dist: torch<3.0.0,>=2.0; extra == "diffusers"
Requires-Dist: diffusers>=0.36.0; extra == "diffusers"
Requires-Dist: transformers<6.0.0,>=4.0; extra == "diffusers"
Requires-Dist: accelerate>=0.0; extra == "diffusers"
Requires-Dist: safetensors>=0.0; extra == "diffusers"
Requires-Dist: huggingface_hub>=0.20.0; extra == "diffusers"
Provides-Extra: local
Requires-Dist: numpy>=1.26.0; extra == "local"
Requires-Dist: torch<3.0.0,>=2.3; extra == "local"
Requires-Dist: torchaudio<3.0.0,>=2.0; extra == "local"
Requires-Dist: diffusers>=0.38.0; extra == "local"
Requires-Dist: transformers<6.0.0,>=5.8.0; extra == "local"
Requires-Dist: accelerate>=0.0; extra == "local"
Requires-Dist: safetensors>=0.7.0; extra == "local"
Requires-Dist: huggingface_hub>=1.7.1; extra == "local"
Requires-Dist: tokenizers>=0.22.0; extra == "local"
Requires-Dist: einops>=0.8.2; extra == "local"
Requires-Dist: einops-exts>=0.0.4; extra == "local"
Requires-Dist: alias-free-torch>=0.0.6; extra == "local"
Requires-Dist: vector-quantize-pytorch>=1.22.0; extra == "local"
Requires-Dist: x-transformers>=1.0.0; extra == "local"
Requires-Dist: PyWavelets>=1.4.1; extra == "local"
Requires-Dist: librosa>=0.10.0; extra == "local"
Requires-Dist: soundfile>=0.12.0; extra == "local"
Provides-Extra: apple
Requires-Dist: numpy>=1.26.0; extra == "apple"
Requires-Dist: torch<3.0.0,>=2.3; extra == "apple"
Requires-Dist: torchaudio<3.0.0,>=2.0; extra == "apple"
Requires-Dist: diffusers>=0.38.0; extra == "apple"
Requires-Dist: transformers<6.0.0,>=5.8.0; extra == "apple"
Requires-Dist: accelerate>=0.0; extra == "apple"
Requires-Dist: safetensors>=0.7.0; extra == "apple"
Requires-Dist: huggingface_hub>=1.7.1; extra == "apple"
Requires-Dist: tokenizers>=0.22.0; extra == "apple"
Requires-Dist: einops>=0.8.2; extra == "apple"
Requires-Dist: einops-exts>=0.0.4; extra == "apple"
Requires-Dist: alias-free-torch>=0.0.6; extra == "apple"
Requires-Dist: loguru>=0.7.0; extra == "apple"
Requires-Dist: vector-quantize-pytorch>=1.22.0; extra == "apple"
Requires-Dist: x-transformers>=1.0.0; extra == "apple"
Requires-Dist: PyWavelets>=1.4.1; extra == "apple"
Requires-Dist: librosa>=0.10.0; extra == "apple"
Requires-Dist: soundfile>=0.12.0; extra == "apple"
Requires-Dist: mlx>=0.24.2; extra == "apple"
Requires-Dist: mlx-lm>=0.20.0; extra == "apple"
Provides-Extra: gpu
Requires-Dist: numpy>=1.26.0; extra == "gpu"
Requires-Dist: torch<3.0.0,>=2.3; extra == "gpu"
Requires-Dist: torchaudio<3.0.0,>=2.0; extra == "gpu"
Requires-Dist: diffusers>=0.38.0; extra == "gpu"
Requires-Dist: transformers<6.0.0,>=5.8.0; extra == "gpu"
Requires-Dist: accelerate>=0.0; extra == "gpu"
Requires-Dist: safetensors>=0.7.0; extra == "gpu"
Requires-Dist: huggingface_hub>=1.7.1; extra == "gpu"
Requires-Dist: tokenizers>=0.22.0; extra == "gpu"
Requires-Dist: einops>=0.8.2; extra == "gpu"
Requires-Dist: einops-exts>=0.0.4; extra == "gpu"
Requires-Dist: alias-free-torch>=0.0.6; extra == "gpu"
Requires-Dist: loguru>=0.7.0; extra == "gpu"
Requires-Dist: vector-quantize-pytorch>=1.22.0; extra == "gpu"
Requires-Dist: x-transformers>=1.0.0; extra == "gpu"
Requires-Dist: PyWavelets>=1.4.1; extra == "gpu"
Requires-Dist: librosa>=0.10.0; extra == "gpu"
Requires-Dist: soundfile>=0.12.0; extra == "gpu"
Provides-Extra: all-apple
Requires-Dist: numpy>=1.26.0; extra == "all-apple"
Requires-Dist: torch<3.0.0,>=2.3; extra == "all-apple"
Requires-Dist: torchaudio<3.0.0,>=2.0; extra == "all-apple"
Requires-Dist: diffusers>=0.38.0; extra == "all-apple"
Requires-Dist: transformers<6.0.0,>=5.8.0; extra == "all-apple"
Requires-Dist: accelerate>=0.0; extra == "all-apple"
Requires-Dist: safetensors>=0.7.0; extra == "all-apple"
Requires-Dist: huggingface_hub>=1.7.1; extra == "all-apple"
Requires-Dist: tokenizers>=0.22.0; extra == "all-apple"
Requires-Dist: einops>=0.8.2; extra == "all-apple"
Requires-Dist: einops-exts>=0.0.4; extra == "all-apple"
Requires-Dist: alias-free-torch>=0.0.6; extra == "all-apple"
Requires-Dist: loguru>=0.7.0; extra == "all-apple"
Requires-Dist: vector-quantize-pytorch>=1.22.0; extra == "all-apple"
Requires-Dist: x-transformers>=1.0.0; extra == "all-apple"
Requires-Dist: PyWavelets>=1.4.1; extra == "all-apple"
Requires-Dist: librosa>=0.10.0; extra == "all-apple"
Requires-Dist: soundfile>=0.12.0; extra == "all-apple"
Requires-Dist: mlx>=0.24.2; extra == "all-apple"
Requires-Dist: mlx-lm>=0.20.0; extra == "all-apple"
Provides-Extra: all-gpu
Requires-Dist: numpy>=1.26.0; extra == "all-gpu"
Requires-Dist: torch<3.0.0,>=2.3; extra == "all-gpu"
Requires-Dist: torchaudio<3.0.0,>=2.0; extra == "all-gpu"
Requires-Dist: diffusers>=0.38.0; extra == "all-gpu"
Requires-Dist: transformers<6.0.0,>=5.8.0; extra == "all-gpu"
Requires-Dist: accelerate>=0.0; extra == "all-gpu"
Requires-Dist: safetensors>=0.7.0; extra == "all-gpu"
Requires-Dist: huggingface_hub>=1.7.1; extra == "all-gpu"
Requires-Dist: tokenizers>=0.22.0; extra == "all-gpu"
Requires-Dist: einops>=0.8.2; extra == "all-gpu"
Requires-Dist: einops-exts>=0.0.4; extra == "all-gpu"
Requires-Dist: alias-free-torch>=0.0.6; extra == "all-gpu"
Requires-Dist: loguru>=0.7.0; extra == "all-gpu"
Requires-Dist: vector-quantize-pytorch>=1.22.0; extra == "all-gpu"
Requires-Dist: x-transformers>=1.0.0; extra == "all-gpu"
Requires-Dist: PyWavelets>=1.4.1; extra == "all-gpu"
Requires-Dist: librosa>=0.10.0; extra == "all-gpu"
Requires-Dist: soundfile>=0.12.0; extra == "all-gpu"
Provides-Extra: midi
Provides-Extra: musicgen
Requires-Dist: numpy>=1.24.0; extra == "musicgen"
Requires-Dist: torch<3.0.0,>=2.0; extra == "musicgen"
Requires-Dist: transformers<6.0.0,>=4.31.0; extra == "musicgen"
Requires-Dist: safetensors>=0.0; extra == "musicgen"
Requires-Dist: huggingface_hub>=0.20.0; extra == "musicgen"
Provides-Extra: stable-audio
Requires-Dist: numpy>=1.24.0; extra == "stable-audio"
Requires-Dist: torch<3.0.0,>=2.0; extra == "stable-audio"
Requires-Dist: torchaudio<3.0.0,>=2.0; extra == "stable-audio"
Requires-Dist: transformers<6.0.0,>=4.31.0; extra == "stable-audio"
Requires-Dist: safetensors>=0.0; extra == "stable-audio"
Requires-Dist: huggingface_hub>=0.20.0; extra == "stable-audio"
Requires-Dist: einops>=0.8.1; extra == "stable-audio"
Requires-Dist: einops-exts>=0.0.4; extra == "stable-audio"
Requires-Dist: alias-free-torch>=0.0.6; extra == "stable-audio"
Requires-Dist: vector-quantize-pytorch>=1.22.0; extra == "stable-audio"
Requires-Dist: PyWavelets>=1.4.1; extra == "stable-audio"
Provides-Extra: stable-audio-3
Requires-Dist: numpy>=1.24.0; extra == "stable-audio-3"
Requires-Dist: torch<3.0.0,>=2.0; extra == "stable-audio-3"
Requires-Dist: transformers<6.0.0,>=5.8.0; extra == "stable-audio-3"
Requires-Dist: safetensors>=0.7.0; extra == "stable-audio-3"
Requires-Dist: huggingface_hub>=1.7.1; extra == "stable-audio-3"
Requires-Dist: einops>=0.8.2; extra == "stable-audio-3"
Provides-Extra: minimax-music3
Requires-Dist: numpy>=1.26.0; extra == "minimax-music3"
Requires-Dist: torch<3.0.0,>=2.3; extra == "minimax-music3"
Requires-Dist: safetensors>=0.7.0; extra == "minimax-music3"
Requires-Dist: tokenizers>=0.22.0; extra == "minimax-music3"
Requires-Dist: huggingface_hub>=1.7.1; extra == "minimax-music3"
Provides-Extra: minimax-music3-mlx
Requires-Dist: mlx>=0.24.2; (sys_platform == "darwin" and platform_machine == "arm64") and extra == "minimax-music3-mlx"
Requires-Dist: numpy>=1.26.0; extra == "minimax-music3-mlx"
Requires-Dist: tokenizers>=0.22.0; extra == "minimax-music3-mlx"
Requires-Dist: huggingface_hub>=1.7.1; extra == "minimax-music3-mlx"
Provides-Extra: heartmula
Provides-Extra: omni2sound
Provides-Extra: yue
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Requires-Dist: mkdocs>=1.6.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6.0; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "test"
Requires-Dist: numpy>=1.24.0; extra == "test"
Requires-Dist: torch<3.0.0,>=2.0; extra == "test"
Requires-Dist: diffusers>=0.38.0; extra == "test"
Requires-Dist: transformers<6.0.0,>=4.0; extra == "test"
Requires-Dist: accelerate>=0.0; extra == "test"
Requires-Dist: safetensors>=0.0; extra == "test"
Requires-Dist: huggingface_hub>=0.20.0; extra == "test"
Requires-Dist: einops>=0.8.1; extra == "test"
Dynamic: license-file

# AbstractMusic

[![PyPI version](https://img.shields.io/pypi/v/abstractmusic.svg)](https://pypi.org/project/abstractmusic/)
[![CI](https://github.com/lpalbou/AbstractMusic/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/lpalbou/AbstractMusic/actions/workflows/ci.yml)
[![Docs](https://img.shields.io/badge/docs-lpalbou.github.io%2FAbstractMusic-blue)](https://lpalbou.github.io/AbstractMusic/)

`abstractmusic` is a model-agnostic **text-to-music / text-to-audio** library designed to plug into
**AbstractCore** as an optional capability plugin. One CLI (`abstractmusic`) and one Python facade
(`MusicManager`) drive remote services (ElevenLabs Music, self-hosted ACE-Step API servers) and
local Hugging Face models (ACE-Step, MiniMax-Music3, Stable Audio 3, Stable Audio Open Small,
MusicGen, generic Diffusers checkpoints). The base install is lightweight; local model runtimes live
behind explicit extras.

**What's new in 0.2.0:** every model is described by one typed capability object, which you can
query (`abstractmusic models`, `find_models`) and which decides every request: a value a model
cannot honour is refused with an error that names it, never dropped or replaced. There is no
default engine: you name one (`--backend`) or a registry model (`--model-id`). Environment variables
carry credentials only. This release changes calls that used to succeed silently; see
[Capabilities](docs/capabilities.md) and the
[changelog and migration list](CHANGELOG.md#020---2026-12-02).

## How AbstractMusic behaves

- **What you name is what runs.** A named engine, model, runtime, device, precision, format or
  request field is used exactly, or the call fails with an error that names the value and what is
  accepted. Nothing is substituted, dropped or cut silently.
- **Settings are explicit.** Environment variables carry credentials only (`ELEVENLABS_API_KEY`,
  `ACEMUSIC_API_KEY`, the Hugging Face token variables). Every setting is a CLI flag, a Python
  argument or an AbstractCore host config key.
- **One capability description per model.** The same shape for every provider, and one function
  that decides what happens to a request on a model.

## Install

```bash
pip install abstractmusic
```

The base package is import-light: contracts, manager, CLI, plugin wiring, model metadata, and
standard-library clients for ElevenLabs Music and for self-hosted ACE-Step API servers. It does not
install Torch, Diffusers, Transformers or NumPy.

The behaviour described here is that of AbstractMusic 0.2.0. If PyPI has an older version, install
from the repository:

```bash
pip install "abstractmusic @ git+https://github.com/lpalbou/AbstractMusic"
```

Install a local runtime when you want in-process generation:

```bash
pip install "abstractmusic[acestep]"             # ACE-Step XL checkpoints
pip install "abstractmusic[minimax-music3-mlx]"  # MiniMax-Music3 songs on Apple silicon (MLX)
pip install "abstractmusic[minimax-music3]"      # MiniMax-Music3 on CUDA, Apple MPS or CPU (PyTorch)
pip install "abstractmusic[stable-audio-3]"      # Stable Audio 3 (gated Hugging Face weights)
pip install "abstractmusic[stable-audio]"        # Stable Audio Open Small (gated)
pip install "abstractmusic[musicgen]"            # MusicGen small (non-commercial weights)
pip install "abstractmusic[all-apple]"           # every Apple silicon runtime
pip install "abstractmusic[all-gpu]"             # every CUDA runtime
```

## Choose a model

Ask the registry which models do what you need before you generate:

```bash
abstractmusic models --needs lyrics --language fr
abstractmusic models --needs key --min-duration 180
abstractmusic models --usable
```

The first command lists the runnable models that sing French lyrics (the ACE-Step XL checkpoints
and `MiniMaxAI/MiniMax-Music3`); `--usable` keeps the ones whose runtime is installed and whose
weights are already in the Hugging Face cache, or whose API key is set. See
[Capabilities](docs/capabilities.md) for every filter, the Python equivalents and the generated
capability matrix.

## Generate from the command line

Every `t2m` command names an engine with `--backend`, or a registry model with `--model-id` (its
engine is then used and named on stderr). Without either, the command exits with status 2 and lists
the engines and which of them are usable on this machine.

```bash
# ElevenLabs Music (remote, MP3 output)
export ELEVENLABS_API_KEY=...
abstractmusic --backend elevenlabs t2m "cinematic instrumental synth cue" --duration 30 --out cue.mp3
abstractmusic --backend elevenlabs t2m "upbeat pop song" --lyrics auto --composition-mode plan --duration 30 --out pop.mp3

# A self-hosted ACE-Step API server (remote protocol, your server)
abstractmusic --backend acemusic --acemusic-base-url http://127.0.0.1:8001 t2m "heroic fantasy epic music" --duration 30 --out epic.wav

# Local models
abstractmusic --backend acestep t2m "ambient lo-fi study music" --duration 10 --out lofi.wav
abstractmusic --backend musicgen t2m "ambient lo-fi study music" --duration 10 --out lofi.wav
abstractmusic --backend stable-audio-3 t2m "rhythmic space shooter game music" --duration 30 --out game.wav
abstractmusic --backend minimax-music3 t2m "Upbeat indie pop, bright guitars, male vocal" \
  --lyrics "[verse]\nRunning down the empty street tonight\nNeon signs are burning bright\n[chorus]\nWe are the summer, we are the light\nNever coming down tonight" \
  --duration 15 --out song.wav

# Sound effects: name the model, its engine and task follow
abstractmusic t2m --model-id stabilityai/stable-audio-3-small-sfx --duration 3 --out sfx.wav \
  "A short sci-fi laser zap, crisp transient, no reverb tail"
abstractmusic t2m --backend stable-audio --duration 11 --out slam.wav \
  "A heavy wooden door slam, close-mic, natural room tail"

# ACE-Step with the built-in planner: expanded caption, template lyrics, plan printed first
abstractmusic --backend acestep t2m "heroic fantasy epic music" --enhance-prompt --auto-lyrics --print-plan --duration 30 --out epic.wav
abstractmusic --backend acestep t2m "heroic fantasy epic instrumental music" --instrumental --print-plan --duration 120 --out epic.wav

# Interactive REPL
abstractmusic --backend acestep repl
```

- `--lyrics` reads the two characters `\n` as a line break; `--lyrics-file PATH` reads a UTF-8 file.
- `--out` defaults to `out.<format>`, and the format defaults to the model's own (WAV for the local
  models, MP3 for ElevenLabs). A format the model does not write is an error.
- `--duration` defaults to the model's own default length: 10 s for ACE-Step and MusicGen, 30 s
  for MiniMax-Music3 and the Stable Audio 3 music checkpoints, 5 s for
  `stabilityai/stable-audio-3-small-sfx`, 11 s for Stable Audio Open Small, and 10 s where the
  registry states none (ElevenLabs, an ACE-Step API server, an unlisted Diffusers checkpoint).
  Local models return exactly the requested length; a duration outside a model's limits is an error (Stable Audio Open Small makes
  at most 11 s, ACE-Step 10 to 600 s, ElevenLabs 3 to 600 s).
- An option the selected engine does not read (for example `--runtime` with `acestep`) is an error,
  and so is a request field the model cannot honour (lyrics to a model that does not sing, `--bpm`
  to a model without a tempo control, a guidance value to a turbo ACE-Step checkpoint).

`t2m` writes the output path to stdout and a one-line run summary to stderr:

```text
cue.mp3
run: backend=<backend id> model=<model id> device=<device> dtype=<dtype> audio=<seconds>s@<rate>Hz/<channels>ch wall=<seconds>s seed=<seed> timings[<stage>=<seconds>s, ...]
```

`--metadata-out PATH` (or `--metadata-out auto`) also writes the run's metadata as JSON. Errors are
one `ERROR:` line on stderr; exit status 2 means a value the request cannot carry (fix the command),
1 another failure, 130 Ctrl-C. See [Getting started](docs/getting-started.md) and the
[REPL guide](docs/repl.md).

## Generate from Python

```python
from abstractmusic import MusicManager
from abstractmusic.backends import ElevenLabsMusicBackend, ElevenLabsMusicBackendConfig

backend = ElevenLabsMusicBackend(config=ElevenLabsMusicBackendConfig(api_key="..."))
music = MusicManager(backend=backend)
mp3_bytes = music.t2m("cinematic instrumental synth cue", duration_s=30.0)
open("cue.mp3", "wb").write(mp3_bytes)
```

```python
from abstractmusic import MusicManager
from abstractmusic.backends import AceStepBackend, AceStepBackendConfig

music = MusicManager(backend=AceStepBackend(config=AceStepBackendConfig()))
asset = music.generate_audio("uplifting synthwave with punchy drums", duration_s=10.0)
open("synthwave.wav", "wb").write(asset.data)
print(asset.metadata["format"], asset.metadata["format_source"])  # wav model_default
```

`generate_audio` returns a `GeneratedAsset` (bytes, MIME type, metadata); `t2m` returns the bytes.
A request the model cannot honour raises `abstractmusic.errors.MusicRequestError` (a
`ValueError`) before anything loads. See [API](docs/api.md).

## Songs with vocals: MiniMax-Music3

`minimax-music3` sings the lyrics you write, up to 6 minutes, locally. Its default model is the
8-bit package `AbstractFramework/minimax-music3-8bit` (12.6 GB) on Apple silicon and the published
weights `MiniMaxAI/MiniMax-Music3` (28.6 GB) with the PyTorch runtime; either downloads only when
you pass `--download` (Python: `local_files_only=False`). The file is as
long as `--duration`; write about 1.5 to 2.5 sung words per second so the words fill it (shorter
lyrics are sung as written and wrapped in instrumental sections). Generation takes minutes per song
and 10 to 21 GB of memory with the 8-bit package (17.5 to 34 GB with the published weights) on the
measured Apple silicon machine. `--model-id` names another model: the published weights, or the
smaller `AbstractFramework/minimax-music3-4bit` (9.6 GB); see
[Pre-quantized packages](docs/minimax-music3.md#pre-quantized-packages-apple-silicon).

```bash
pip install "abstractmusic[minimax-music3-mlx]"  # or "abstractmusic[minimax-music3]" for PyTorch
abstractmusic --backend minimax-music3 t2m \
  "Warm acoustic folk ballad, fingerpicked guitar, soft piano, intimate female vocal, 96 bpm" \
  --lyrics-file lyrics.txt --duration 15 --seed 7 --download --out ballad.wav

# Instrumental: no lyrics, and say so in the description
abstractmusic --backend minimax-music3 t2m \
  "Instrumental cinematic piece, solo piano and soft strings, slow and reflective, no vocals" \
  --duration 30 --seed 11 --out piano.wav
```

See [MiniMax-Music3](docs/minimax-music3.md) for lyric guidance, measured performance, how closely
requests are followed, and the licence conditions.

## AbstractCore integration

```python
from abstractcore import create_llm

llm = create_llm(
    "ollama",                  # any provider; the LLM does not synthesize audio
    model="qwen3:4b-instruct",
    music_backend="abstractmusic:acestep",  # the full id; or "abstractmusic:minimax-music3", ...
)
wav_bytes = llm.music.t2m("ambient lo-fi study music", duration_s=10.0)
open("lofi.wav", "wb").write(wav_bytes)
print(wav_bytes.metadata["backend"])  # GeneratedAudioBytes: bytes with .metadata and .mime_type
```

Host settings are `music_*` config keys (for example `music_model_id`, `music_device`,
`music_acemusic_base_url`); a per-backend key `music_<backend>_<name>` wins over the shared one.
Name a backend by its full id (`abstractmusic:acestep`, `abstractmusic:minimax-music3`, ...):
AbstractCore 2.41.0 does not resolve a short name such as `minimax-music3`, and the plugin then
refuses the request, naming the full id, rather than run another backend. A per-request
`provider="minimax-music3"` is not available with AbstractCore 2.41.0. The plugin's
discovery methods (`available_providers`, `provider_details`, `list_models`, `list_provider_models`,
`list_operations`, `capability_catalog`) report only what can run now and attach each model's
capability block; they never load a model. A request that names no backend uses a local one (every
local backend ranks above the remote ones), so it never leaves the machine. See [API](docs/api.md#abstractcore-plugin).

## Notes and limits

- **Hosted ACE Music is not usable.** `api.acemusic.ai` has retired the API the `acemusic` backend
  speaks (HTTP 410); the backend raises `AceMusicEndpointRetiredError` there. It works with a
  self-hosted ACE-Step API server (`--acemusic-base-url`). The hosted task API is not implemented.
- **ElevenLabs `music_v1`** is deprecated by ElevenLabs and will be removed on 2027-01-31 (replacement
  `music_v2_5`, not yet supported here); results carry a `deprecation` entry. Output is MP3 only.
  ElevenLabs Music API access needs a paid plan; voice and text-to-speech belong in AbstractVoice.
- **What was tested in this release.** No real call was made to ElevenLabs or to a self-hosted
  ACE-Step server with this version. The behaviour of the older local backends (exact lengths,
  strict loading, refusals) is covered by tests with stand-in pipelines and real checkpoint headers,
  not by new real generations. MiniMax-Music3 was run on Apple silicon (see its page); NVIDIA CUDA,
  Linux and Windows runs of it have not been made.
- Weights come from the default Hugging Face cache. Local backends download missing weights;
  `acestep` does not when you pass `--no-download`, and `minimax-music3` downloads only with
  `--download` (the other engines refuse these two options). On the CLI,
  `--model-id` must be a Hugging Face repo id.
- On Apple silicon, `--device auto` uses MPS where the backend supports it; a failure on MPS is an
  error. `--allow-cpu-retry` (ACE-Step, Stable Audio, Diffusers) opts into one CPU retry, recorded in
  the run line and metadata.
- Stable Audio Open Small and Stable Audio 3 run on code bundled in this package (modified copies of
  Stability AI's MIT-licensed inference code); you do not install the upstream packages. Their
  weights are gated on Hugging Face: accept the terms and set `HF_TOKEN`.
- The model catalogue is packaged in `src/abstractmusic/assets/music_model_capabilities.json`; see
  [Models](docs/models.md). Full documentation starts at [docs/README.md](docs/README.md).

## Licensing

- `ACE-Step/acestep-v15-xl-turbo-diffusers` and the other ACE-Step XL checkpoints: MIT.
- `MiniMaxAI/MiniMax-Music3`: MiniMax-Music3 Community License. Commercial use is permitted under
  conditions: a commercial product must display "MiniMax-Music3"; above USD 20 million yearly revenue
  a separate authorization from MiniMax is required; hosted services that let others generate must
  implement safeguards; an acceptable-use policy and notice retention apply. The
  [LICENSE file](https://huggingface.co/MiniMaxAI/MiniMax-Music3/blob/main/LICENSE) is the authority.
- `facebook/musicgen-small`: CC BY-NC 4.0 (non-commercial).
- `stabilityai/stable-audio-open-small` and the Stable Audio 3 checkpoints: Stability AI Community
  License (Stable Audio 3 adds text-encoder terms); gated on Hugging Face.
- ElevenLabs Music: the ElevenLabs Music Terms (commercial rights depend on the plan).
- `--backend diffusers`: model licences vary by checkpoint.

`abstractmusic models --commercial allowed|conditional|not-allowed` filters by these terms.

## For AI agents

If you are an AI agent, you can register and use our agent skill
[`abstractmusic`](https://github.com/lpalbou/AbstractMusic/tree/main/skills/abstractmusic) to
become an expert on this package. Install it by copying the `skills/abstractmusic/` folder of the
version you use into your agent's skills directory (for example `~/.claude/skills` for Claude Code;
see your agent's documentation for its skills directory):

```bash
SKILLS_DIR=~/.claude/skills
tmp="$(mktemp -d)"
git clone --depth 1 --branch main https://github.com/lpalbou/AbstractMusic "$tmp" \
  && mkdir -p "$SKILLS_DIR" && cp -R "$tmp/skills/abstractmusic" "$SKILLS_DIR/" \
  && echo "installed: $SKILLS_DIR/abstractmusic"
rm -rf "$tmp"
```

## CI/CD

GitHub Actions validates tests, package builds and documentation builds. Releases run from
`v*.*.*` tags or manual dispatch through `.github/workflows/release.yml`; manual dispatch defaults
to a rehearsal (`publish=false`). See [Release process](docs/release.md).
