---
title: "Generate Custom Music"
method: POST
path: "/v2/MusicAI"
---

# Generate Custom Music

`POST /v2/MusicAI`

## Request

- Base URL: `https://api.musicgpt.com/api/public`
- URL: `https://api.musicgpt.com/api/public/v2/MusicAI`
- Auth: API key in header `Authorization`

Create music powered by AI using just a prompt, lyrics, or a defined music style.

## Request body

- object
  - `prompt` string: A natural language prompt for music generation. Keep it under 280 characters for guaranteed results, but detailed—the clearer and more descriptive it is, the better the outcome.
  - `music_style` string: Style of music to generate (e.g., Rock, Pop)
  - `lyrics` string: Custom lyrics for the generated music
  - `make_instrumental` boolean: Whether to make the music instrumental
  - `vocal_only` boolean: Whether to generate only vocals of output audio
  - `title` string: Title of the generated music track
  - `gender` string: Gender of the voice model
  - `voice_id` string: Voice model to convert generated audio
  - `generate_album_cover` boolean: Whether to generate an album cover for the generated audio
  - `model` 'v6' | 'v6-pro' | 'v7' | 'v7-pro': Model version to use for generation
  - `webhook_url` string: URL for callback upon completion

## Response `200`

Successful response

- object
  - `success` boolean
  - `message` string
  - `task_id` string
  - `conversion_id_1` string
  - `conversion_id_2` string
  - `eta` integer

## Other responses

- `402`: Payment Required
- `500`: Internal Server Error

---

[API](https://skmtc.dev/musicgpt/apis/musicgpt-api.md) - [All operations](https://skmtc.dev/musicgpt/apis/musicgpt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/musicgpt/apis/musicgpt-api/revisions/6753dccf4c5d?raw)
