music-01

This documentation is valid for the following list of our models:

  • music-01

Model Overview

An advanced AI model that generates diverse high-quality audio compositions by analyzing and reproducing musical patterns, rhythms, and vocal styles from the reference track. Refine the process using a text prompt.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

API Schemas

Generate a music sample

This endpoint creates and sends a music generation task to the server — and returns a generation ID and the task status.

post
Authorizations
Body
purposestring · enumRequired
  1. If purpose is song:
  • You need to upload a music file containing both acapella (vocals) and accompaniment.
  • The acapella must be in singing form; normal speech is not supported.
  • Outputs: voice_id and instrumental_id.
  1. If purpose is voice:
  • You need to upload a file containing only acapella in singing form (normal speech audio is not supported).
  • Output: voice_id.
  1. If purpose is instrumental:
  • You need to upload a file containing only accompaniment.
  • Output: instrumental_id.
Possible values:
Responses
default
application/json
post
POST /v2/generate/audio/minimax/upload HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "purpose": "song"
}
default
{
  "voice_id": "vocal-2025011003141025-d5ZEMxmp",
  "instrumental_id": "instrumental-2025011003141125-Akz9eWnD",
  "base_resp": {
    "status_code": 1,
    "status_msg": "text"
  }
}

Retrieve the generated music sample from the server

After sending a request for music generation, this task is added to the queue. Based on the service's load, the generation can be completed in 50-60 seconds or take a bit more.

post
Authorizations
Body
all ofOptional
Responses
default
application/json
post
POST /v2/generate/audio/minimax/generate HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 420

{
  "lyrics": "##Swift and Boundless \n In the realm of innovation, where visions align, \n\nAIML API's the name, making tech shine. \nIntelligent solutions, breaking the mold, \n\nSwift inference power, bold and untold.\n##",
  "model": "music-01",
  "audio_setting": {
    "sample_rate": 16000,
    "bitrate": 32000,
    "format": "mp3"
  },
  "refer_voice": "vocal-2025010100000000-a0AAAaaa",
  "refer_instrumental": "instrumental-2025010100000000-Aaa0aAaA"
}
default
{
  "data": {
    "status": 1,
    "audio": "text"
  },
  "extra_info": {
    "audio_length": 1,
    "audio_size": 1,
    "audio_bitrate": 1,
    "audio_sample_rate": 1
  },
  "trace_id": "text",
  "base_resp": {
    "status_code": 1,
    "status_msg": "text"
  }
}

Last updated

Was this helpful?