# Generate Music

**What**：Generate a piece of music from a style description (optionally with lyrics).

**When**：Use for background music, short-video soundtracks or song demos. No image / video materials.

## Endpoints
- POST `/api/cqt/generator/minimax-music`
- GET `/api/cqt/info/minimax-music?id={taskId}`

## Sub-models

| model | Usage | Materials | Output | Price (credits/call) |
| --- | --- | --- | --- | --- |
| `minimax-music-3.0` | 3.0 latest | prompt + optional lyrics | full song 2-3.5 min | 100 |
| `minimax-music-2.6` | 2.6 | prompt + optional lyrics | full song 2-3.5 min | 100 |
| `minimax-music-2.5` | 2.5 | prompt + optional lyrics | full song 2-3.5 min | 100 |
| `minimax-music-2.0` | 2.0; cheaper | prompt + optional lyrics | full song 2-3.5 min | 25 |

## Request params
| Param | Type | Required | Description |
| --- | --- | --- | --- |
| model | string | Yes | Sub-model: minimax-music-3.0 / minimax-music-2.6 / minimax-music-2.5 / minimax-music-2.0 |
| prompt | string | Yes | Style / mood / instruments (optional when lyrics is given) |
| lyrics | string | — | Lyrics (optional); [verse] / [chorus] section tags supported |

## Request example
```bash
curl -X POST https://api.novapi.ai/api/cqt/generator/minimax-music \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "minimax-music-3.0",
    "prompt": "upbeat synth-pop, female vocal, summer night vibe",
    "lyrics": "[verse]\nNeon lights on the rainy street\nEvery step falls on the beat\n[chorus]\nWe are young tonight\nDancing in the city light"
  }'
# -> { "code":200, "data":"<taskId>" }
```

## Response example
```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": "ee7b51a469564381a053792fc2507cbe",
    "resultUrl": "https://cdn.novapi.ai/minimax-music/1791950061137_0aa1dcc337f84ea3bd69165741908aa3.mp3",
    "status": "succeeded",
    "errorMsg": null,
    "createTime": "2026-10-14 11:53:31",
    "completeTime": "2026-10-14 11:54:21"
  }
}
```

## Response fields
| Field | Type | Description |
| --- | --- | --- |
| code | number | 200 means success |
| data.id | string | Task ID (taskId) |
| data.status | string | queued / running / succeeded / failed |
| data.resultUrl | string | Result URL(s) on our CDN (long-lived); multiple results are comma-separated; null until done or on failure |
| data.errorMsg | string \| null | Failure reason; null on success |
