music-2.6

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

  • minimax/music-2.6

A powerful music generation model optimized for high-quality song production, capable of creating fully arranged tracks from lyrics and style instructions with precise control over tempo, key, structure, vocal performance, and emotional progression.

How to Make a Call

Step-by-Step Instructions

Generating an audio using this model involves sequentially calling two endpoints:

  • The first one is for creating and sending a video generation task to the server (returns a generation ID).

  • The second one is for requesting the generated video from the server using the generation ID received from the first endpoint.

Below, you can find two corresponding API schemas and examples for both endpoint calls.


If you want to learn how to call AI models via API from the very basics, feel free to use our Quickstart guide.

API Schemas

Generate music sample

This endpoint generates a music piece based on the prompt (which includes style instructions) and the provided lyrics. It returns a generation task ID, its status, and related metadata.

post
Body
modelstring Β· enumRequiredPossible values:
promptstring Β· max: 2000Optional

A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters.

lyricsstring Β· max: 3000Optional

Lyrics of the song. Use ( ) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters.

Example: [Verse] Streetlights flicker, the night breeze sighs Shadows stretch as I walk alone An old coat wraps my silent sorrow Wandering, longing, where should I go [Chorus] Pushing the wooden door, the aroma spreads In a familiar corner, a stranger gazes
lyrics_optimizerbooleanOptional

Whether to automatically generate lyrics based on the prompt description. When set to true and lyrics is empty, the system will automatically generate lyrics from the prompt.

Default: false
is_instrumentalbooleanOptional

Whether to generate instrumental music (no vocals). When set to true, the lyrics field is not required.

Default: false
Responses
200Success
application/json
idstringRequired

The ID of the generated audio.

Example: 60ac7c34-3224-4b14-8e7d-0aa0db708325
statusstring Β· enumRequired

The current status of the generation task.

Example: completedPossible values:
post
/v2/generate/audio
200Success

Retrieve the generated music sample from the server

After sending a request for music generation, this task is added to the queue. This endpoint lets you check the status of a audio generation task using its id, obtained from the endpoint described above. If the video generation task status is complete, the response will include the final result β€” with the generated audio URL and additional metadata.

get
Authorizations
AuthorizationstringRequired

Bearer key

Query parameters
generation_idstringRequiredExample: <REPLACE_WITH_YOUR_GENERATION_ID>
Responses
200Success
application/json
idstringRequired

The ID of the generated audio.

Example: 60ac7c34-3224-4b14-8e7d-0aa0db708325
statusstring Β· enumRequired

The current status of the generation task.

Example: completedPossible values:
get
/v2/generate/audio
200Success

Quick Code Example

Here’s an example of generating an audio file using a prompt with style instructions and a separate parameter for the lyrics.

Response

Listen to the track we generated:

Last updated

Was this helpful?