Skip to content

AI Music Generator

Overview

Turn a theme, lyrics, and/or a music style into a complete song. Each AI Music Generator task composes one finished song (mp3) and returns it together with a cover image, the song title, the final lyrics, and a synchronized lyrics timeline.

  • Vocal songs and instrumentals: generate a song with vocals, or instrumental music with no vocals and no lyrics (instrumental: true).
  • Start from what you have: a theme (idea), your own lyrics (lyrics), or both. An instrumental song requires an idea.
  • Lyrics language: ask for it in the idea text (e.g. "with Japanese lyrics"). Supported lyrics languages are English, Japanese, Korean, Portuguese, Spanish, German, French, Italian, Traditional Chinese, Simplified Chinese, Hindi, and Turkish.

Sample usage:


Integration Guide

  • AI Music Generator Usage Guide

This guide explains how to run an AI Music Generator task and read its result.

There is no image or audio input, so you don't need the File API: there is no "Create a new file" step before running a task. Just input your idea or lyrics, choose music_style, and create incredible songs.


  • Step 1. Create a Task

Use the AI Task API (/s2s/v2.0/task/ai-song) with a theme, lyrics, and/or a music style:

curl --request POST \
  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --data '{"idea":"A song about a small cafe that stays open late for people who cannot sleep","music_style":{"genre":"Acoustic Pop","mood":"Calm, hopeful","vocal":"female","description":"soft piano, brushed drums"},"instrumental":false}'

The response returns the task_id of this task:

{
  "status": 200,
  "data": {
    "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
  }
}

  • Step 2. Poll for Task Result

Use the task_id from the run response to check the status until task_status is success or error:

curl --request GET \
  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song/YOUR_TASK_ID \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json'

  • Step 3. Retrieve Result

A successful response includes the song, its cover image, title, final lyrics, and synchronized lyrics timestamps:

{
  "status": 200,
  "data": {
    "error": null,
    "results": {
      "url": "https://example.com/sample-song-url",
      "cover_urls": [
        "https://example.com/sample-cover-url"
      ],
      "title": "Leave the Light On",
      "lyrics": "[verse]\nTwo a.m., the neon hums\nSteam on the glass, the night still runs",
      "duration": 154.3,
      "timestamps": "{\"lyrics_lrc_timestamps\": \"[00:23.98]Two a.m., the neon hums\"}"
    },
    "task_status": "success"
  }
}

Inputs & Outputs

  • Request Body
FieldTypeDescription
ideastring (max 500 characters)Theme of the song. Required when instrumental is true. For a song with vocals, provide idea, lyrics, or both.
lyricsstring (max 3000 characters)Lyrics of the song. Section tags such as [intro], [verse], [chorus], and [outro] are supported.
music_styleobjectMusic style of the song: genre (max 100), mood (max 100), vocal (female or male, ignored for instrumentals), and description (max 300) for other details such as instruments or rhythm. All fields are optional.
instrumentalbooleantrue to generate instrumental music with no vocals and no lyrics. Default false.

A request must describe a song one of these ways: from an idea (idea is not empty), or from lyrics for a song with vocals (lyrics is not empty and instrumental is not true).

  • Results (data.results)
FieldTypeDescription
urlstringURL to download the generated song (mp3). Valid for 2 hours
cover_urlsarray of stringURLs to download the cover images (jpg). Currently one image. Valid for 2 hours
titlestringGenerated title of the song
lyricsstringFinal lyrics of the song. Empty for instrumental music
durationnumberLength of the song in seconds
timestampsstringJSON-encoded string of an object whose lyrics_lrc_timestamps field holds the synchronized lyrics in LRC format, e.g. [00:08.54]Lyrics text. The LRC text is empty for instrumental music

File Specs & Errors

  • Supported Limits
TypeLimit
idea (theme)Max 500 characters. Required when instrumental is true
lyricsMax 3000 characters. Section tags such as [intro], [verse], [chorus], and [outro] are supported
music_style genre / moodMax 100 characters each
music_style descriptionMax 300 characters
Input fileNone. There is no image or audio input, so no File API step is needed
OutputSong: mp3. Cover image: jpg. Result URLs are valid for 2 hours
  • Error Codes
Error CodeDescription
invalid_parameterInvalid parameter value, e.g. neither idea nor lyrics is provided, idea is missing for an instrumental task, or a field exceeds its maximum length

Task-level failures are reported in the status response: data.error is the error code and data.error_message is a detailed description of the error.


Unit Consumption

Priced by song type.

Song TypeUnit Consumed
Song with vocals (instrumental: false)10 units per song
Instrumental music (instrumental: true)20 units per song

Languages
Servers
https://yce-api-01.makeupar.com