Riffusion Audios Generation API Integration Guide

This article will introduce a Riffusion Audios Generation API integration guide, which can generate official Riffusion music by entering custom parameters.

Application Process

To use the Riffusion Audios Generation API, first go to the Ace Data Cloud Console to obtain your API Token and keep it for later use.

If you have not yet logged in or registered, you will be automatically redirected to the login page to register and log in, and you will automatically return to the current page after completion.

One API Token can call all platform services; there is no need to apply separately for each service. Your first application comes with free credits for a free trial; when credits are insufficient, you can recharge your general balance in the console.

📘 Full documentation: Riffusion Audios Generation API →

Basic Usage

For whatever song you want to create, you can enter any text. For example, if I want to generate a song about Christmas, I can enter a song for Christmas, as shown in the image:

You can see that we have set Request Headers here, including:

  • accept: The format of the response result you want to receive. Enter application/json here, which is JSON format.
  • authorization: The key for calling the API. After applying, you can directly select it from the dropdown.

In addition, the parameters in Request Body include:

  • action: The action for this music generation task. To generate a song, use generate.
  • model: The model used to create the song. Currently, the main options are: FUZZ-1.0, FUZZ-1.1, FUZZ-1.0 Pro, FUZZ-1.1 Pro.
  • lyric: The lyric content of the song.
  • custom: Whether to use the custom method to generate the song.
  • prompt: The prompt in inspiration mode.
  • style: Song style parameters.
  • title: Song title information.
  • audio_id: Reference song ID, used for operations such as continuation/remake.
  • continue_at: Continue the song from the specified number of seconds.
  • replace_section_start/replace_section_end: The start and end times of the replacement section, in seconds.
  • vocal_variation: The degree of vocal variation. The larger the value, the greater the difference from the original vocals.
  • callback_url: The URL where the result callback is needed.
  • async: Optional. When set to true, the API immediately returns a task_id; there is no need to provide a callback_url, and the result can then be obtained by polling through the corresponding task query API.
  • instrumental: Whether it is in lyric-free mode.

The mapping relationship between the above parameters and the official custom generation is as follows:

  • model: Corresponds to the model selection on the Riffusion account settings page, as shown below
  • lyric: Corresponds to the “Lyrics” section on the Rifussion custom generation page, as shown below
  • style: Corresponds to the “Sound” section on the Rifussion custom generation page. It is actually used to specify certain styles, as shown below
  • title: Corresponds to the “Details” section on the Rifussion custom generation page, used to specify the song title, as shown below
  • instrumental: Corresponds to the “Instrumental” switch on the Rifussion custom generation page, used to set lyric-free mode, as shown below

After making the selection, you can find that the corresponding code is also generated on the right side, as shown in the image:

Click the “Try” button to test it. As shown above, we obtain the following result here:

{
  "success": true,
  "task_id": "f45388a9-4169-41d4-aec8-fb8259c48d36",
  "trace_id": "1df9f664-fd74-476b-8038-b0b5f62ddf87",
  "data": [
    {
      "id": "02702b40-272d-4838-8644-675105930658",
      "title": "Vibe",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
      "lyric": "[Intro]\nYeah, yeah\nKeep talking, keep talking\nI love the way you sound\n[Verse 1]\nYour voice is like a drug I can't put down\nEvery word you say just pulls me in\nI'm addicted to the way you laugh out loud\nAnd how you whisper when the room goes dim\nTell me 'bout your day, tell me 'bout your fears\nI could listen to you talk for years\n[Pre-Chorus]\nDon't stop now, don't you dare\nI need your voice filling up the air\n[Chorus]\nKeep talking, keep talking to me\nYour words are all I fucking need\nKeep talking, keep talking, I'm high\nOff every sound you make tonight\nKeep talking\n[Verse 2]\nYou could read the phone book, I don't care\nJust the rhythm of your breathing's enough\nWhen you say my name, it's like a prayer\nAnd your silence hits me twice as rough\nEvery conversation feels like home\nNever want to hear this dial tone\n[Pre-Chorus]\nDon't stop now, don't you dare\nI need your voice filling up the air\n[Chorus]\nKeep talking, keep talking to me\nYour words are all I fucking need\nKeep talking, keep talking, I'm high\nOff every sound you make tonight\nKeep talking\n[Bridge]\nWhen the world gets loud and crazy\nYour voice cuts through the noise\nYou're my favorite conversation\nYou're my drug of choice\nKeep talking, keep talking\nKeep talking, keep talking\nKeep talking, keep talking\nKeep talking, keep talking\n[Chorus]\nKeep talking, keep talking to me\nYour words are all I fucking need\nKeep talking, keep talking, I'm high\nOff every sound you make tonight\nKeep talking\n[Outro]\nYeah, yeah\nKeep talking, keep talking\nNever stop that sound",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": null,
      "created_at": "2025-06-18T15:47:54.705246Z",
      "model": "FUZZ-1.0",
      "lyrics_timestamped": {
        "words": [
          {
            "text": "[Intro]",
            "start": 0.64,
            "end": 0.64,
            "line_index": 0,
            "index_range": null,
            "wav2vec2_format": null
          },
          ...
          {
            "text": "sound",
            "start": 179.84,
            "end": 180.48,
            "line_index": 63,
            "index_range": null,
            "wav2vec2_format": null
          }
        ]
      },
      "state": "succeeded",
      "style": "Pop, upbeat tempo, modern production",
      "duration": 181.12
    },
    {
      "id": "be3fe757-621e-4017-9056-20aa7f01919e",
      "title": "Revive",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
      "lyric": "[Verse 1]\nI'm walking through the motions, moving day by day\nColors seem a little faded, nothing much to say\nFriends keep calling, asking if I'm doing fine\nBut I just smile and tell them everything's divine\n[Pre-Chorus]\nSomething's missing, can't quite name it\nFeels like I'm just going through the stages\n[Chorus]\nI'm barely breathing, barely feeling\nLike I'm floating through a life that isn't mine\nBarely breathing, barely healing\nSearching for a reason, searching for a sign\nTo feel alive again\nTo feel alive again\n[Verse 2]\nMorning coffee tastes like water, sunrise looks like rain\nEveryone around me laughs but I can't feel the same\nUsed to dance in silly moments, used to sing out loud\nNow I'm standing in the silence of a faceless crowd\n[Pre-Chorus]\nSomething's shifting, can't ignore it\nMaybe it's time to break these patterns\n[Chorus]\nI'm barely breathing, barely feeling\nLike I'm floating through a life that isn't mine\nBarely breathing, barely healing\nSearching for a reason, searching for a sign\nTo feel alive again\nTo feel alive again\n[Bridge]\nBut there's a beating in my chest\nA whisper saying \"don't give up yet\"\nMaybe tomorrow I'll remember\nHow to laugh and how to let\nMy heart wake up from this long sleep\nFind the fire I used to keep\n[Chorus]\nI'm barely breathing, barely feeling\nLike I'm floating through a life that isn't mine\nBarely breathing, barely healing\nSearching for a reason, searching for a sign\nTo feel alive again\nTo feel alive again\n[Outro]\nI'm gonna feel alive again\nI'm gonna feel alive again",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": null,
      "created_at": "2025-06-18T15:48:01.139081Z",
      "model": "FUZZ-1.0",
      "lyrics_timestamped": {
        "words": [
          {
            "text": "[Verse",
            "start": 0.64,
            "end": 0.64,
            "line_index": 0,
            "index_range": null,
            "wav2vec2_format": null
          },
          ...
          {
            "text": "again",
            "start": 202.88,
            "end": 211.84,
            "line_index": 54,
            "index_range": null,
            "wav2vec2_format": null
          }
        ]
      },
      "state": "succeeded",
      "style": "Pop, upbeat tempo, clean production, emotional vocals",
      "duration": 211.84
    }
  ]
}

The returned result contains multiple fields, described as follows:

  • success, the status of the music generation task at this time.
    • data, the result of this music task - id, the ID of the music generation task at this time.
      • prompt, the prompt for the music generation task at this time.
      • audio_url, the audio link for the music generation task at this time.
      • image_url, the cover link for the music generation task at this time.
      • state, the status of the music generation task at this time.
      • duration, the duration information of the music at this time.
      • style, the style information of the music at this time.
      • model, the model information used by the music generation task at this time.
      • lyric, the lyrics information of the music generation task at this time.

As you can see, we have obtained the music information we wanted to generate. We only need to obtain the generated Riffusion music based on the music link address in data from the result.

Additionally, if you want to generate the corresponding integration code, you can copy and generate it directly. For example, the CURL code is as follows:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "model": "FUZZ-1.0",
  "action": "generate",
  "prompt": "A song for Christmas"
}'

Custom Generation

If you want to generate custom lyrics, you can enter the lyrics:

At this point, the lyric field can be passed content similar to the following:

[Verse]Woke up with the sun in my eyesNo clouds above just blue in the skiesShoes on my feet I’m ready to runEvery step feels like a loaded gun[Chorus]Happy days are rolling inLet the joy beneath my skinNo more shadows no more liesJust the truth that lifts me high[Verse 2]Dancing through the city streetsA rhythm pounding in my heartbeatStrangers smile it’s catching onThis world’s a stage we’re all a song[Chorus]Happy days are rolling inLet the joy beneath my skinNo more shadows no more liesJust the truth that lifts me high[Bridge]Throw your worries out the doorLet them sink to the ocean floorWe’re alive and it’s enoughLife is messy but it’s love[Chorus]Happy days are rolling inLet the joy beneath my skinNo more shadows no more liesJust the truth that lifts me high

Next, we need to generate a song based on the lyrics, title, and style. You can specify the following content:

  • lyric: The lyrics text
  • custom: Set to true, indicating custom generation. This parameter defaults to false, indicating generation using prompt.
  • title: The title of the song.
  • style: The style of the song, optional.

An example is as follows:

After filling it out, the code is automatically generated as follows:

The corresponding code:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "model": "FUZZ-1.0",
  "action": "generate",
  "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
  "custom": true
}'

The test is allowed, and the generated result is similar.

{
    "success": true,
    "task_id": "978c2912-6a90-4048-b4c1-43f9cf18c28d",
    "trace_id": "08dfbb99-43ce-4f65-8fd1-74b98f2b121a",
    "data": [
        {
            "id": "eac9ab69-e210-490b-9f8d-095a6f074f40",
            "title": "VibeRise",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T01:57:33.438644Z",
            "model": "FUZZ-1.0",
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 0,
                        "start": 0.64,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 1,
                        "start": 0.64,
                        "text": "Woke",
                        "wav2vec2_format": null
                    },
                    ...
                ]
            },
            "state": "succeeded",
            "style": "funk vibes, raspy, raw vocal texture",
            "duration": 158.08
        },
        {
            "id": "64fffe1f-b1aa-46dc-8012-b80ba319cf35",
            "title": "Pure Dawn",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T01:57:33.963497Z",
            "model": "FUZZ-1.0",
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 0,
                        "start": 0.64,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 1,
                        "start": 0.64,
                        "text": "Woke",
                        "wav2vec2_format": null
                    },
                    ...
                ]
            },
            "state": "succeeded",
            "style": "contemporary country",
            "duration": 175.36
        }
    ]
}

Cover Songs

If you want to create a cover version of an already generated song, you can enter the song generated above to create a cover version. Next, we need to generate a song based on the lyrics, title, and style. If you want to continue creating a cover of a song you uploaded yourself, you can set the action parameter to upload_cover, and enter the ID of the custom uploaded song that needs to continue being covered. The song ID can be obtained using the Riffusion Upload API, as shown below:

You can then specify the following content:

  • action: The behavior of this song task. Currently supported: generate, cover, extend, upload_cover, upload_extend, replace_section, upload_replace_section, swap_vocals, upload_swap_vocals, swap_sound, upload_swap_sound. This cover uses the cover parameter.
  • lyric: Lyrics text
  • title: The title of the song.
  • audio_id: The song ID of the song to be covered.
  • style: The style of the song, optional.

An example of filling it out is as follows:

After filling it out, the code is automatically generated as follows:

The corresponding code:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "action": "cover",
  "model": "FUZZ-1.0 Pro",
  "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
  "audio_id": "b7376272-3902-49b4-a83b-62f7e6ab505c"
}'

Testing is allowed, and the generated result is similar.

{
    "success": true,
    "task_id": "fe02997d-f58e-4886-9aa3-4074c9a430eb",
    "trace_id": "997bde4c-6063-4fc2-9b03-d837f1efc72d",
    "data": [
        {
            "id": "be254182-d4b7-42b3-9ee2-b86db086cff1",
            "title": "Sunny Rise",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T01:59:17.666629Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 0,
                        "start": 0.64,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 237.44,
                        "index_range": null,
                        "line_index": 29,
                        "start": 236.8,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 239.46235827664398
        },
        {
            "id": "9b9d2810-eb2b-44d3-85c0-cb259afa13c3",
            "title": "Uplift",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T01:59:23.065712Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 0,
                        "start": 0.64,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    },
                    {
                        "end": 236.16,
                        "index_range": null,
                        "line_index": 29,
                        "start": 225.28,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 239.5299546485261
        }
    ]
}

Continue a Song

If you want to continue a song, we need to pass the action parameter with the value: extend. Next, we need to customize the generation of the song based on the lyrics, title, and style.

If you want to continue a song you uploaded yourself, you can set the action parameter to upload_extend, and enter the ID of the custom uploaded song that needs to continue being extended. The song ID can be obtained using the Riffusion Upload API, as shown below:

You can then specify the following content:

  • action: The action for this song task. Currently supported: generate, cover, extend, upload_cover, upload_extend, replace_section, upload_replace_section, swap_vocals, upload_swap_vocals, swap_sound, upload_swap_sound. This continuation uses the extend parameter.
  • lyric: Lyrics text
  • title: The title of the song.
  • audio_id: The ID of the song.
  • style: The style of the song, optional.

An example is as follows:

After filling it in, the code is automatically generated as follows:

The corresponding code:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "action": "extend",
  "model": "FUZZ-1.0 Pro",
  "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
  "audio_id": "b7376272-3902-49b4-a83b-62f7e6ab505c",
  "continue_at": 5
}'

Testing is allowed, and the generated result is similar.

{
    "success": true,
    "task_id": "6388a0aa-b5ab-4485-baad-f0e0b7a7848c",
    "trace_id": "da143dbe-8263-45ac-b05a-1ed57dd4aa79",
    "data": [
        {
            "id": "209e27e0-500c-44f3-9134-280690014920",
            "title": "City Rhythm",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T02:00:53.473604Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 4.48,
                        "index_range": null,
                        "line_index": 0,
                        "start": 4.48,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 179.2,
                        "index_range": null,
                        "line_index": 29,
                        "start": 178.56,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 197.00850340136054
        },
        {
            "id": "ff50012e-ad1b-4b71-8d0e-6a633428a54f",
            "title": "Bright",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T02:00:52.795796Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 0,
                        "start": 0.64,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 186.88,
                        "index_range": null,
                        "line_index": 29,
                        "start": 186.24,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 213.85757369614512
        }
    ]
}

Replace Section

If you want to replace a section of a song, we need to pass the action parameter with the value: replace_section. Next, we need to customize the song generation based on the lyrics, title, and style.

If you want to continue replacing a section of a song you uploaded yourself, you can set the action parameter to upload_replace_section, and enter the ID of the custom uploaded song for which you need to continue replacing a section. The song ID is obtained using the Riffusion Upload API, as shown below:

You can then specify the following content:

  • action: The action for this song task. Currently supported: generate, cover, extend, upload_cover, upload_extend, replace_section, upload_replace_section, swap_vocals, upload_swap_vocals, swap_sound, upload_swap_sound. This continuation uses the extend parameter.
  • lyric: The lyrics text after replacement.
  • title: The title of the song.
  • audio_id: The ID of the song.
  • style: The style of the song, optional.

The filling example is as follows:

After filling it out, the code is automatically generated as follows:

The corresponding code:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "action": "replace_section",
  "model": "FUZZ-1.0 Pro",
  "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
  "audio_id": "b7376272-3902-49b4-a83b-62f7e6ab505c",
  "replace_section_start": 3,
  "replace_section_end": 70
}'

Testing is allowed, and the generated result is similar.

{
  "success": true,
  "task_id": "73defcbf-f876-4dd6-b60e-4c1c5ecd4565",
  "trace_id": "9f639389-7218-4cdb-ade9-b34228bb0f21",
  "data": [
    {
      "id": "037f5e9d-9da4-4d79-b58f-1f433b40d54d",
      "title": "Sunrise Joy",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
      "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": null,
      "created_at": "2025-06-23T02:18:43.031184Z",
      "model": null,
      "lyrics_timestamped": {
        "words": [
          {
            "end": 3.84,
            "index_range": null,
            "line_index": 0,
            "start": 3.84,
            "text": "[Verse]",
            "wav2vec2_format": null
          },
          ...
          {
            "end": 159.36,
            "index_range": null,
            "line_index": 29,
            "start": 159.36,
            "text": "high",
            "wav2vec2_format": null
          }
        ]
      },
      "state": "succeeded",
      "style": "",
      "duration": 199.2201133786848
    },
    {
      "id": "97638295-068f-4cbc-b076-66f522449bd5",
      "title": "Sunrise",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
      "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": null,
      "created_at": "2025-06-23T02:18:56.267775Z",
      "model": null,
      "lyrics_timestamped": {
        "words": [
          {
            "end": 3.84,
            "index_range": null,
            "line_index": 0,
            "start": 3.84,
            "text": "[Verse]",
            "wav2vec2_format": null
          },
          ...
          {
            "end": 159.36,
            "index_range": null,
            "line_index": 29,
            "start": 159.36,
            "text": "high",
            "wav2vec2_format": null
          }
        ]
      },
      "state": "succeeded",
      "style": "",
      "duration": 199.2201133786848
    }
  ]
}

SwapSound Generation

If you want to use the official SwapSound operation, you can set the action parameter value to: swap_sound. Next, we will custom-generate a song based on the lyrics, title, and style.

If you want to continue performing the SwapSound operation on a song you uploaded yourself, you can set the action parameter to upload_swap_sound, and enter the ID of the custom-uploaded song that needs to continue the SwapSound operation. The song ID is obtained using the Riffusion Upload API, as shown below:

You can then specify the following content:

Next, we will custom-generate a song based on the lyrics, title, and style, and can specify the following content:

  • action: The action for this song task. Currently supported: generate, cover, extend, upload_cover, upload_extend, replace_section, upload_replace_section, swap_vocals, upload_swap_vocals, swap_sound, upload_swap_sound.
  • lyric: Lyrics text
  • title: The title of the song.
  • audio_id: The ID of the song.
  • style: The style of the song, optional.

The filling example is as follows:

After filling it out, the code is automatically generated as follows:

The corresponding code:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "action": "swap_sound",
  "model": "FUZZ-1.0 Pro",
  "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
  "audio_id": "b7376272-3902-49b4-a83b-62f7e6ab505c"
}'

Testing is allowed, and the generated result is similar.

{
    "success": true,
    "task_id": "93279260-5ca1-42d8-bde1-1fa62e0f5027",
    "trace_id": "bc4e28db-4897-4ffc-9e03-45f43da7a21c",
    "data": [
        {
            "id": "242035c0-8ac2-4f0b-a19c-ac2fa49d4df3",
            "title": "Brightside",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T02:02:32.799561Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 1.28,
                        "index_range": null,
                        "line_index": 0,
                        "start": 1.28,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 195.84,
                        "index_range": null,
                        "line_index": 29,
                        "start": 195.84,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 197.2696371882086
        },
        {
            "id": "594fe702-6c71-4b0c-abb6-21b58efc74a6",
            "title": "Sunrise",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T02:02:30.523279Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 0.64,
                        "index_range": null,
                        "line_index": 0,
                        "start": 0.64,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 192.64,
                        "index_range": null,
                        "line_index": 29,
                        "start": 192.64,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 196.7198866213152
        }
    ]
}

SwapVocals Generation

If you want to use the official SwapVocals operation, you can set the action parameter value to: swap_vocals. Next, we will generate a custom song based on the lyrics, title, and style.

If you want to continue performing the SwapVocals operation on your own uploaded song, you can set the action parameter to upload_swap_vocals, and enter the ID of the custom uploaded song that needs to continue the SwapVocals operation. The song ID can be obtained using the Riffusion Upload API, as shown in the following image:

Then you can specify the following content:

  • action: The action for this song task. Currently supported: generate, cover, extend, upload_cover, upload_extend, replace_section, upload_replace_section, swap_vocals, upload_swap_vocals, swap_sound, upload_swap_sound.
  • lyric: Lyrics text
  • title: The title of the song.
  • audio_id: The ID of the song.
  • style: The style of the song, optional.

The filling example is as follows:

After filling it out, the following code is automatically generated:

The corresponding code:

curl -X POST 'https://api.acedata.cloud/riffusion/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
  "action": "swap_vocals",
  "model": "FUZZ-1.0 Pro",
  "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
  "audio_id": "b7376272-3902-49b4-a83b-62f7e6ab505c"
}'

The test is allowed, and the generated result is similar.

{
    "success": true,
    "task_id": "a6e0d456-189b-4c78-9232-2fe72166ab39",
    "trace_id": "ee5769d4-ae94-4e5a-a85f-b3c0ddc2e48e",
    "data": [
        {
            "id": "b8b1ed14-f43c-4738-a697-60ba24b6049d",
            "title": "Uplift",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T02:04:18.477032Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 2.56,
                        "index_range": null,
                        "line_index": 0,
                        "start": 2.56,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 186.88,
                        "index_range": null,
                        "line_index": 29,
                        "start": 171.52,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 195.55968253968254
        },
        {
            "id": "dfd6eb9c-a1f3-4e1f-bbf9-e0b9625e459f",
            "title": "Vivid Rise",
            "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
            "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
            "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
            "video_url": null,
            "created_at": "2025-06-23T02:04:27.140387Z",
            "model": null,
            "lyrics_timestamped": {
                "words": [
                    {
                        "end": 1.28,
                        "index_range": null,
                        "line_index": 0,
                        "start": 1.28,
                        "text": "[Verse]",
                        "wav2vec2_format": null
                    },
                    ...
                    {
                        "end": 188.8,
                        "index_range": null,
                        "line_index": 29,
                        "start": 188.16,
                        "text": "high",
                        "wav2vec2_format": null
                    }
                ]
            },
            "state": "succeeded",
            "style": "",
            "duration": 196.07185941043085
        }
    ]
}

Asynchronous Callback

Since the generation time of the Riffusion Audios Generation API can sometimes be relatively long, if the API does not respond for a long time, the HTTP request will remain connected continuously, resulting in additional system resource consumption. Therefore, this API also provides support for asynchronous callbacks.

The overall process is: when the client initiates a request, it additionally specifies a callback_url field. After the client initiates the API request, the API will immediately return a result containing a task_id field, representing the current task ID. When the task is completed, the result of the generation task will be sent in POST JSON format to the callback_url specified by the client, which also includes the task_id field, so that the task result can be associated through the ID.

Below, we will use an example to understand how to operate it specifically.

First, a Webhook callback is a service that can receive HTTP requests. Developers should replace it with the URL of their own deployed HTTP server. For convenient demonstration here, a public Webhook example website https://webhook.site/ is used. Opening this website will provide a Webhook URL, as shown in the image:

Copy this URL, and it can be used as a Webhook. The example here is https://webhook.site/68368fc6-7f0a-425e-b63a-cc48631615fe. Next, we can set the callback_url field to the Webhook URL above and fill in the corresponding parameters. The specific content is shown in the image below:

Click Run, and you can see that a result is returned immediately, as follows:

{
  "task_id": "9939767a-7f9c-4f43-aabf-ca68fe385f3c"
}

After waiting for a moment, we can observe the result of the generation task at https://webhook.site/68368fc6-7f0a-425e-b63a-cc48631615fe, as shown in the image below:

The content is as follows:

{
  "success": true,
  "task_id": "9939767a-7f9c-4f43-aabf-ca68fe385f3c",
  "trace_id": "13a86870-e705-45d0-8447-82a08701c0fa",
  "data": [
    {
      "id": "72e6c476-0116-4da9-ae34-f78190020b35",
      "title": "Rise",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
      "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": null,
      "created_at": "2025-06-15T15:43:22.432605Z",
      "model": "FUZZ-1.0",
      "state": "succeeded",
      "style": "acoustic folk, finger picking",
      "duration": 184.96
    },
    {
      "id": "7f4f5c20-4395-4583-9dbb-735b9bb86957",
      "title": "Luminance",
      "image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
      "lyric": "[Verse]\nWoke up with the sun in my eyes\nNo clouds above just blue in the skies\nShoes on my feet I’m ready to run\nEvery step feels like a loaded gun\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Verse 2]\nDancing through the city streets\nA rhythm pounding in my heartbeat\nStrangers smile it’s catching on\nThis world’s a stage we’re all a song\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high\n[Bridge]\nThrow your worries out the door\nLet them sink to the ocean floor\nWe’re alive and it’s enough\nLife is messy but it’s love\n[Chorus]\nHappy days are rolling in\nLet the joy beneath my skin\nNo more shadows no more lies\nJust the truth that lifts me high",
      "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
      "video_url": null,
      "created_at": "2025-06-15T15:43:21.574561Z",
      "model": "FUZZ-1.0",
      "state": "succeeded",
      "style": "deep bass, ethereal electronic",
      "duration": 165.12
    }
  ]
}

As you can see, there is a task_id field in the result. The other fields are similar to those above, and this field can be used to associate the task.

Error Handling

When calling the API, if an error occurs, the API returns the corresponding error code and message. For example:

  • 400 token_mismatched: Bad request, possibly due to missing or invalid parameters.
  • 400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.
  • 401 invalid_token: Unauthorized, invalid or missing authorization token.
  • 429 too_many_requests: Too many requests, you have exceeded the rate limit.
  • 500 api_error: Internal server error, something went wrong on the server.

Error Response Example

{
  "success": false,
  "error": {
    "code": "api_error",
    "message": "fetch failed"
  },
  "trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}

Conclusion

Through this document, you have learned how to use the Riffusion Audios Generation API to generate music by entering prompts. We hope this document can help you better integrate with and use this API. If you have any questions, please feel free to contact our technical support team.