Text to Music generates a finished track from a prompt. Describe the genre, mood, instruments and vocal character, add lyrics if you want them sung, and the Audial music model renders the audio on Audial's hosted engine.
Length is yours to set, from 10 to 600 seconds, with 60 seconds as the default. Ask for up to 8 variations in a single call and keep the one that works. Output comes back as MP3 by default, or WAV, FLAC, OPUS or AAC. Lyrics accept section tags such as [verse] and [chorus], and an instrumental switch skips vocals entirely.
The same endpoint covers more than text to music: cover mode follows a reference track, while remix, extract, lego, complete and understand modes take a source file and rebuild, extend or describe it. Run any of it from the Music Generator tab, from audial.generate_music in Python, from /functions/run/music-generator, or as the generate_music MCP tool.
What you get
- Full tracks from a text prompt, with or without lyrics
- Lyrics support section tags like [verse] and [chorus], or go instrumental
- 10 to 600 seconds per generation, 60 seconds by default
- Up to 8 variations per call
- MP3, WAV, FLAC, OPUS or AAC output
- Cover, remix, extract, complete and understand modes work from a source or reference track
Use it from code
curl -X POST "https://api.audialmusic.ai/api/functions/run/music-generator" \
-H "X-API-Key: your_api_key" -H "X-User-ID: your_user_id" \
-F "userId=your_user_id" \
-F "task_type=cover" \
-F "prompt=acoustic folk cover, fingerpicked guitar, warm male vocal" \
-F "referenceFile=@/path/to/reference.mp3"import audial
audial.config.set_api_key("your_api_key")
audial.config.set_user_id("your_user_id")
result = audial.generate_music(
prompt="upbeat electronic dance track with driving bass and ethereal synths",
lyrics="[verse]\nFeel the rhythm in the night\n[chorus]\nDance until the morning light",
audio_duration=60,
batch_size=2,
audio_format="mp3",
)
print(list(result["files"]["files"]))# In Claude, Cursor or any MCP client with audial-mcp installed:
"Generate a 90 second dark techno instrumental at 140 BPM and save two variations."Frequently asked questions
Yes. Pass lyrics along with the prompt and the vocal is sung as part of the track. Leave lyrics out, or set the instrumental flag, for an instrumental.
Between 10 and 600 seconds. The default is 60 seconds.
Yes. The endpoint takes a task type: cover follows a reference file, and remix, extract, lego and complete work from a source file. Understand mode returns a description of a track instead of audio.
MP3 by default, plus WAV, FLAC, OPUS and AAC.
The Audial music model, running on Audial's hosted engine. Nothing is downloaded or computed on your machine.
Yes. Set a batch size up to 8 and each variation comes back as its own file.
