> ## Documentation Index
> Fetch the complete documentation index at: https://docs.creatify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax Music 3.0 Text to Music API

> Generate songs with custom or automatic lyrics, or vocal-free instrumental tracks. Track length is model-determined.

[← MiniMax Music](https://docs.creatify.ai/api-documentation/ai-generation/models/minimax-music.md)

**Model name:** `minimax-music-3.0/text-to-music`\
**Generation type:** `text_to_music`\
**Endpoint:** [`POST /api/asset_generator/`](https://docs.creatify.ai/api-reference/ai-generation/post-ai-generation)

## Pricing

**3.0** credits per output.

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

## Quick start

```bash cURL theme={null}
curl --request POST \
  --url https://api.creatify.ai/api/asset_generator/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: your-api-id' \
  --header 'X-API-KEY: your-api-key' \
  --data '{
    "model_name": "minimax-music-3.0/text-to-music",
    "input_params": {
      "prompt": "An upbeat acoustic track for a summer product ad.",
      "model": "music-3.0",
      "audio_setting": {
        "sample_rate": 44100,
        "bitrate": 128000,
        "format": "mp3"
      },
      "output_format": "url"
    }
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.creatify.ai/api/asset_generator/",
    headers={"X-API-ID": "your-api-id", "X-API-KEY": "your-api-key"},
    json={
        "model_name": "minimax-music-3.0/text-to-music",
        "input_params": {
            "prompt": "An upbeat acoustic track for a summer product ad.",
            "model": "music-3.0",
            "audio_setting": {
                "sample_rate": 44100,
                "bitrate": 128000,
                "format": "mp3"
            },
            "output_format": "url"
        },
    },
)
print(response.json()["id"])
```

## Input parameters

Send these fields in `input_params`.

**prompt** `string` *required*

The text description that guides the audio generation process. This prompt defines what you want to hear in the generated audio content.

Minimum characters: `1`.
Maximum characters: `2000`.

**model** `string` *required* (default: music-3.0)

The AI model to use for music generation

Allowed values: `"music-3.0"`.

**audio\_setting** `object` *required*

Audio configuration settings

**output\_format** `string` *required* (default: url)

Specifies the format of the output audio.

Allowed values: `"url"`.

**lyrics** `string`

Optional lyrics with structure tags such as \[Verse] and \[Chorus]. Leave empty to generate lyrics from the prompt.

Minimum characters: `0`.
Maximum characters: `3500`.

**lyrics\_optimizer** `boolean` (default: true)

Generate lyrics from the prompt when lyrics are empty.

**is\_instrumental** `boolean` (default: false)

Generate music without vocals; lyrics are not required.

> [accordion] Complete JSON schema
>
> ```json theme={null}
> {
>   "$schema": "http://json-schema.org/draft-07/schema#",
>   "required": [
>     "prompt",
>     "model",
>     "audio_setting",
>     "output_format"
>   ],
>   "properties": {
>     "model": {
>       "enum": [
>         "music-3.0"
>       ],
>       "type": "string",
>       "title": "Model",
>       "default": "music-3.0",
>       "description": "The AI model to use for music generation",
>       "x-is-hidden": true
>     },
>     "lyrics": {
>       "type": "string",
>       "title": "Lyrics",
>       "maxLength": 3500,
>       "minLength": 0,
>       "description": "Optional lyrics with structure tags such as [Verse] and [Chorus]. Leave empty to generate lyrics from the prompt."
>     },
>     "prompt": {
>       "type": "string",
>       "title": "Prompt",
>       "maxLength": 2000,
>       "minLength": 1,
>       "description": "The text description that guides the audio generation process. This prompt defines what you want to hear in the generated audio content.",
>       "x-ui-name": "prompt"
>     },
>     "audio_setting": {
>       "type": "object",
>       "title": "Audio Settings",
>       "required": [
>         "sample_rate",
>         "bitrate",
>         "format"
>       ],
>       "x-ui-name": "audioSettings",
>       "properties": {
>         "format": {
>           "enum": [
>             "mp3"
>           ],
>           "type": "string",
>           "title": "Format",
>           "default": "mp3",
>           "description": "Audio format",
>           "x-is-hidden": true
>         },
>         "bitrate": {
>           "enum": [
>             64000,
>             128000,
>             256000
>           ],
>           "type": "integer",
>           "title": "Bitrate",
>           "default": 128000,
>           "description": "The bitrate of the generated audio in kbps (kilobits per second). Higher bitrates preserve more audio quality but create larger files.",
>           "x-advance-settings": true
>         },
>         "sample_rate": {
>           "enum": [
>             24000,
>             32000,
>             44100
>           ],
>           "type": "integer",
>           "title": "SampleRate",
>           "default": 44100,
>           "x-ui-name": "sampleRate",
>           "description": "The sample rate of the generated audio in Hz (samples per second). Higher sample rates capture more audio detail and frequency range but result in larger file sizes.",
>           "x-advance-settings": true
>         }
>       },
>       "description": "Audio configuration settings"
>     },
>     "output_format": {
>       "enum": [
>         "url"
>       ],
>       "type": "string",
>       "title": "Output format",
>       "default": "url",
>       "x-ui-name": "outputFormat",
>       "description": "Specifies the format of the output audio.",
>       "x-is-hidden": true
>     },
>     "lyrics_optimizer": {
>       "type": "boolean",
>       "title": "Auto-generate lyrics",
>       "default": true,
>       "description": "Generate lyrics from the prompt when lyrics are empty.",
>       "x-advance-settings": true
>     },
>     "is_instrumental": {
>       "type": "boolean",
>       "title": "Instrumental only",
>       "default": false,
>       "description": "Generate music without vocals; lyrics are not required."
>     }
>   },
>   "allOf": [
>     {
>       "if": {
>         "properties": {
>           "is_instrumental": {
>             "const": false
>           },
>           "lyrics_optimizer": {
>             "const": false
>           }
>         },
>         "required": [
>           "is_instrumental",
>           "lyrics_optimizer"
>         ]
>       },
>       "then": {
>         "required": [
>           "lyrics"
>         ],
>         "properties": {
>           "lyrics": {
>             "minLength": 1
>           }
>         }
>       }
>     }
>   ]
> }
> ```

## Response

The request returns the task with `status: "initializing"`. Poll [GET /api/asset\_generator/\{id}/](https://docs.creatify.ai/api-reference/ai-generation/get-ai-generation-.md) until `status` is `done` or `failed`, or pass a `webhook_url` to be notified. A finished task lists its files in `assets` and the credits it charged in `credits_used`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.