---
title: "V3 Generate Music"
method: POST
path: "/v3/music/generate"
tags: ["AI-Music-Generator"]
---

# V3 Generate Music

`POST /v3/music/generate`

Generate music with or without lyrics using AI models.

## Headers

- `x-api-key` string

## Request body

- union
  - AutoGenerateRequest
    - `action` 'auto', required — Generate songs based on input description words, creating songs of different styles according to the provided description words.
    - `style` string, nullable — The prompt parameter is used to control the melody, tune, style, and so on of the entire song.
    - `mv` 'v5.0' | 'v4.5-plus' | 'v4.5' | 'v4.0' | 'v3.5' | 'v3.0' — v5.0: Generates songs with the most realistic vocals, delivering natural tone and lifelike expression. v4.5-plus: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. v4.5: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. It boasts studio-quality sound, optimal genre fusion, and faster generation speeds. v4.0: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are more vivid and sound better. v3.5: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are smoother and more engaging. v3.0: Generates songs up to 2 minutes long and supports lyrics inputs of up to 1,000 words. The credit deduction rules for song generation with different models are as follows: When using the V3.0/V3.5/V4.0 models, 2 credits will be deducted each time 2 songs are generated; when using the V4.5/V4.5 Plus models, 3 credits will be deducted each time 2 songs are generated.
    - `instrumental` integer, nullable — The instrumental parameter is used to control whether the song is pure music or not. When instrumental is set to 1, the lyrics parameter will not be applied, even if it is included in your request
    - `gender` 'male' | 'female' | '', nullable — Voice gender preference, used to control the gender of the singer.
  - CustomGenerateRequest
    - `action` 'custom', required — Generate songs with customized lyrics, controlling the generation effect of the songs based on the lyrics, style and title.
    - `mv` 'v5.0' | 'v4.5-plus' | 'v4.5' | 'v4.0' | 'v3.5' | 'v3.0' — v5.0: Generates songs with the most realistic vocals, delivering natural tone and lifelike expression. v4.5-plus: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. v4.5: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. It boasts studio-quality sound, optimal genre fusion, and faster generation speeds. v4.0: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are more vivid and sound better. v3.5: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are smoother and more engaging. v3.0: Generates songs up to 2 minutes long and supports lyrics inputs of up to 1,000 words. The credit deduction rules for song generation with different models are as follows: When using the V3.0/V3.5/V4.0 models, 2 credits will be deducted each time 2 songs are generated; when using the V4.5/V4.5 Plus models, 3 credits will be deducted each time 2 songs are generated.
    - `instrumental` integer, nullable — The instrumental parameter is used to control whether the song is pure music or not. When instrumental is set to 1, the lyrics parameter will not be applied, even if it is included in your request
    - `style` string, nullable — The prompt parameter is used to control the melody, tune, style, and so on of the entire song.
    - `lyrics` string, nullable — The lyrics parameter controls what the song is about, If this field is set to None, then pure music will be generated.
    - `title` string, nullable — Create a title for the song you're writing.
    - `gender` 'male' | 'female' | '', nullable — Voice gender preference, used to control the gender of the singer.
  - ExtendGenerateRequest
    - `action` 'extend', required — Continue writing songs, generating additional suitable song segments for a specific song.
    - `mv` 'v5.0' | 'v4.5-plus' | 'v4.5' | 'v4.0' | 'v3.5' | 'v3.0' — v5.0: Generates songs with the most realistic vocals, delivering natural tone and lifelike expression. v4.5-plus: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. v4.5: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. It boasts studio-quality sound, optimal genre fusion, and faster generation speeds. v4.0: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are more vivid and sound better. v3.5: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are smoother and more engaging. v3.0: Generates songs up to 2 minutes long and supports lyrics inputs of up to 1,000 words. The credit deduction rules for song generation with different models are as follows: When using the V3.0/V3.5/V4.0 models, 2 credits will be deducted each time 2 songs are generated; when using the V4.5/V4.5 Plus models, 3 credits will be deducted each time 2 songs are generated.
    - `instrumental` integer, nullable — The instrumental parameter is used to control whether the song is pure music or not. When instrumental is set to 1, the lyrics parameter will not be applied, even if it is included in your request
    - `style` string, nullable — The prompt parameter is used to control the melody, tune, style, and so on of the entire song.
    - `lyrics` string, nullable — The lyrics parameter controls what the song is about, If this field is set to None, then pure music will be generated.
    - `title` string, nullable — Create a title for the song you're writing.
    - `gender` 'male' | 'female' | '', nullable — Voice gender preference, used to control the gender of the singer.
    - `continue_at` union — This field is used in the continuation function and is used to control from which point in the current song the continuation should start.
      - integer
      - number
    - `continue_song_id` string, nullable — This parameter tells us which song you want to extend.
  - ConcatGenerateRequest
    - `action` 'concat', required — Upload custom audio and convert it into an operable song.
    - `continue_song_id` string, required — Merge songs and combine multiple continuation segments into a complete song.
  - UploadGenerateRequest
    - `action` 'upload', required — Upload custom audio and convert it into an operable song.
    - `audio_url` string, required — Custom audio upload, capable of identifying the lyric style in the audio and converting it into an operable song.
  - UploadExtendGenerateRequest
    - `action` 'upload_extend', required — Continue writing the uploaded songs and obtain more song segments.
    - `mv` 'v5.0' | 'v4.5-plus' | 'v4.5' | 'v4.0' | 'v3.5' | 'v3.0' — v5.0: Generates songs with the most realistic vocals, delivering natural tone and lifelike expression. v4.5-plus: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. v4.5: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. It boasts studio-quality sound, optimal genre fusion, and faster generation speeds. v4.0: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are more vivid and sound better. v3.5: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are smoother and more engaging. v3.0: Generates songs up to 2 minutes long and supports lyrics inputs of up to 1,000 words. The credit deduction rules for song generation with different models are as follows: When using the V3.0/V3.5/V4.0 models, 2 credits will be deducted each time 2 songs are generated; when using the V4.5/V4.5 Plus models, 3 credits will be deducted each time 2 songs are generated.
    - `instrumental` integer, nullable — The instrumental parameter is used to control whether the song is pure music or not. When instrumental is set to 1, the lyrics parameter will not be applied, even if it is included in your request
    - `style` string, nullable — The prompt parameter is used to control the melody, tune, style, and so on of the entire song.
    - `lyrics` string, nullable — The lyrics parameter controls what the song is about, If this field is set to None, then pure music will be generated.
    - `title` string, nullable — Create a title for the song you're writing.
    - `gender` 'male' | 'female' | '', nullable — Voice gender preference, used to control the gender of the singer.
    - `continue_at` union — This field is used in the continuation function and is used to control from which point in the current song the continuation should start.
      - integer
      - number
    - `continue_song_id` string, nullable — This field must be obtained through the upload action, This parameter tells us which song you want to extend, Either the audio_url parameter or the continue_song_id parameter can be used, and the former will be given priority..
    - `audio_url` string, nullable — specifies the upload location for audio files; Ensure uploaded audio does not exceed 8 minutes, Either the audio_url parameter or the continue_song_id parameter can be used, and the former will be given priority.
  - ArtistGenerateRequest
    - `action` 'artist_consistency', required — Generate songs with specific tones based on the singer_id.
    - `mv` 'v5.0' | 'v4.5-plus' | 'v4.5' | 'v4.0' | 'v3.5' | 'v3.0' — v5.0: Generates songs with the most realistic vocals, delivering natural tone and lifelike expression. v4.5-plus: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. v4.5: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. It boasts studio-quality sound, optimal genre fusion, and faster generation speeds. v4.0: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are more vivid and sound better. v3.5: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are smoother and more engaging. v3.0: Generates songs up to 2 minutes long and supports lyrics inputs of up to 1,000 words. The credit deduction rules for song generation with different models are as follows: When using the V3.0/V3.5/V4.0 models, 2 credits will be deducted each time 2 songs are generated; when using the V4.5/V4.5 Plus models, 3 credits will be deducted each time 2 songs are generated.
    - `instrumental` integer, nullable — The instrumental parameter is used to control whether the song is pure music or not. When instrumental is set to 1, the lyrics parameter will not be applied, even if it is included in your request
    - `style` string, nullable — The prompt parameter is used to control the melody, tune, style, and so on of the entire song.
    - `lyrics` string, nullable — The lyrics parameter controls what the song is about, If this field is set to None, then pure music will be generated.
    - `title` string, nullable — Create a title for the song you're writing.
    - `gender` 'male' | 'female' | '', nullable — Voice gender preference, used to control the gender of the singer.
    - `singer_id` string, required — 该字段来源于/v3/music/generate-singer, Used to specify the vocal tone of the singer to generate a song

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/topmediai/apis/topmediai-api-documentation.md) · [All operations](https://skmtc.net/topmediai/apis/topmediai-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/topmediai/topmediai-api-documentation/versions/5d9205965da7/schema)
