Руководство по интеграции с Producer Audios Generation API
В этой статье представлено руководство по интеграции с Producer Audios Generation API, которое позволяет генерировать музыку с помощью официального сервиса Producer, вводя пользовательские параметры.
¶ Порядок получения доступа
Чтобы использовать Producer Audios Generation API, сначала получите свой API Token в консоли AI 聚合 и сохраните его для дальнейшего использования.

Если вы ещё не вошли в систему или не зарегистрировались, вы автоматически перейдёте на страницу входа, где вам будет предложено зарегистрироваться и войти в систему. После этого вы автоматически вернётесь на текущую страницу.
API Key универсального приложения можно использовать для сервисов, доступных аккаунту; ключ специализированного приложения используется в пределах сервисов этого приложения. Проверьте разрешения, срок действия и лимиты ключа, а также убедитесь, что баланса приложения достаточно для оплаты этого запроса. Доступный пробный лимит определяется данными в аккаунте; если баланса недостаточно, нажмите кнопку «Пополнить».
📘 Полная документация: Producer Audios Generation API →
¶ Выбор обязательных параметров в зависимости от операции
При action=generate и custom=false (по умолчанию) укажите prompt; при custom=true
и instrumental=false укажите lyric. Для пользовательской инструментальной музыки можно установить
custom=true, instrumental=true без необходимости придумывать текст песни или дополнительные подсказки.
Для action=extend требуются audio_id и continue_at больше 0, а в режиме с вокалом также требуется
lyric. Для каверов, вариаций, замены фрагмента, обмена партиями и разделения дорожек требуется исходный audio_id;
текст песни и подсказка не должны быть безусловно обязательными для всех операций.
В MCP при указании lyric в producer_extend_music и producer_replace_section
выбирается режим пользовательского текста песни; для продолжения инструментальной музыки можно передать instrumental=true и опустить текст песни.
¶ Основное использование
Можно ввести любой текст о том, какую песню вы хотите получить. Например, если я хочу сгенерировать песню о Рождестве, я могу ввести a song for Christmas, как показано на рисунке:

Здесь можно увидеть, что мы задали Request Headers, включая:
accept: формат результата ответа, который вы хотите получить; здесь указаноapplication/json, то есть формат JSON.authorization: ключ для вызова API, который после получения можно выбрать из выпадающего списка.
Кроме того, параметры Request Body включают:
action: действие для текущей задачи генерации музыки; для генерации песни используетсяgenerate.model: модель, используемая для создания песни; в настоящее время основные модели: FUZZ-2.0 Pro、FUZZ-2.0、FUZZ-2.0 Raw,FUZZ-1.1 Pro、FUZZ-1.0 Pro、FUZZ-1.0、FUZZ-1.1、FUZZ-0.8。lyric: текст песни.custom: использовать ли пользовательский способ генерации песни.prompt: подсказка в режиме вдохновения.title: название песни.audio_id: ID исходной песни, используемый для продолжения, создания кавера и других операций.continue_at: продолжить песню с указанной секунды.replace_section_start/replace_section_end: время начала и окончания заменяемого фрагмента в секундах.lyrics_strength: сила текста песни, обозначающая степень влияния текста на генерацию аудио; допустимые значения — от 0 до 1, по умолчанию 0.5.sound_strength: сила аудиоподсказки; допустимые значения — от 0.2 до 1, по умолчанию 0.5.cover_strength: сила кавера; от 0.2 до 1, по умолчанию 1.weirdness: необычность стиля; допустимые значения — от 0 до 1, по умолчанию 0.5callback_url: URL для обратного вызова с результатом.async: необязательный параметр; при значенииtrueинтерфейс сразу возвращаетtask_id, указыватьcallback_urlне требуется, после чего результат можно получить с помощью периодических запросов к соответствующему интерфейсу проверки задачи.instrumental: использовать ли режим без текста песни.
После выбора можно заметить, что справа также был сгенерирован соответствующий код, как показано на рисунке:

Нажмите кнопку «Try», чтобы выполнить тестирование. Как показано на рисунке выше, здесь мы получили следующий результат:
{
"success": true,
"task_id": "82fd443a-903a-4f18-8028-12d2f8a0a4be",
"trace_id": "d85839fa-0bb1-42da-a9fc-cd582c29027d",
"data": [
{
"id": "6c947f13-a3c5-4b9c-8609-5639c37cdc2d",
"title": "Untitled",
"image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
"lyric": "[Instrumental]",
"audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3",
"video_url": null,
"image_id": "6c947f13-a3c5-4b9c-8609-5639c37cdc2d",
"topic": null,
"seed": "2450882164",
"sound": "A song for Christmas",
"created_at": "2025-12-30T17:18:23.232911Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "181.3014058956916"
}
]
}
Возвращённый результат содержит несколько полей, описанных ниже:
success— статус текущей задачи генерации музыки.data— результат текущей музыкальной задачиid— ID текущей задачи генерации музыки.sound— подсказка текущей задачи генерации музыки.seed— начальное значение текущей задачи генерации музыки.audio_url— ссылка на аудио текущей задачи генерации музыки.image_url— ссылка на обложку текущей задачи генерации музыки.image_id— ID обложки текущей задачи генерации музыки.state— состояние текущей задачи генерации музыки.duration— информация о продолжительности текущего музыкального произведения.progress— значение прогресса текущей музыкальной задачи.model— информация о модели, используемой в текущей задаче генерации музыки.lyric— информация о тексте песни текущей задачи генерации музыки.
Как видно, мы получили информацию о музыке, которую хотели сгенерировать; чтобы получить сгенерированную музыку Producer, нам достаточно воспользоваться адресом ссылки на музыку в data результата.
Кроме того, если вы хотите сгенерировать соответствующий код интеграции, его можно сразу скопировать; например, код CURL выглядит следующим образом:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "generate",
"model": "FUZZ-2.0 Pro",
"prompt": "A song for Christmas"
}'
¶ Пользовательская генерация
Если вы хотите сгенерировать песню с собственным текстом, вы можете ввести текст:
В этом случае в поле lyric можно передать содержимое, подобное следующему:
[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
Далее мы создадим песню в пользовательском режиме на основе текста, названия и стиля, для чего можно указать следующее:
- lyric:текст песни
- custom:укажите
true, что означает генерацию в пользовательском режиме; по умолчанию этот параметр равен false, что означает генерацию с использованиемprompt. - title:название песни.
Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "generate",
"model": "FUZZ-2.0 Pro",
"instrumental": false,
"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
}'
Тестирование разрешено, результат генерации аналогичен.
{
"success": true,
"task_id": "9f58bbd4-855a-4233-ac45-b63bf9168e02",
"trace_id": "145ad117-6ce7-42dd-af12-70751c5284fc",
"data": [
{
"id": "38d3b9e2-0dfb-4338-b2a7-15e45656ed32",
"title": "Woke up with the sun in my eyes",
"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,
"image_id": "38d3b9e2-0dfb-4338-b2a7-15e45656ed32",
"topic": null,
"seed": "3789209121",
"sound": "",
"created_at": "2025-12-30T17:26:46.357055Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "153.80897959183673"
}
]
}
¶ Создание кавер-версии песни
Если вы хотите создать кавер-версию уже сгенерированной песни, можно использовать для этого песню, сгенерированную выше. Далее мы создадим песню в пользовательском режиме на основе текста и названия.
Если вы хотите создать кавер-версию самостоятельно загруженной песни, можно установить для параметра action значение upload_cover и ввести ID загруженной песни, для которой требуется создать кавер-версию. ID песни можно получить с помощью Producer Upload API, как показано на изображении ниже:

Можно указать следующее:
- action:действие для текущей задачи создания песни; в настоящее время поддерживаются: generate, cover, extend, upload_cover, upload_extend, replace_section, swap_vocals, swap_instrumentals, variation; для создания этой кавер-версии используется параметр
cover. - lyric:текст песни
- title:название песни.
- custom:использовать ли для генерации пользовательский режим; по умолчанию установлено значение false.
- audio_id:ID песни, для которой требуется создать кавер-версию.
Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "cover",
"model": "FUZZ-2.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": "38d3b9e2-0dfb-4338-b2a7-15e45656ed32",
"instrumental": false,
"custom": true,
"title": "Cover"
}'
Тестирование разрешено, результат генерации аналогичен.
{
"success": true,
"task_id": "dbca350e-6fb9-46ca-9c7e-4c1a9080806f",
"trace_id": "a39e0fff-ced8-4b31-ae23-aef3badd90fa",
"data": [
{
"id": "e52dd729-38b4-4c2f-9031-59eb7953c593",
"title": "Cover",
"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,
"image_id": "e52dd729-38b4-4c2f-9031-59eb7953c593",
"topic": null,
"seed": "358803418",
"sound": "",
"created_at": "2025-12-30T17:32:32.951948Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "153.0659410430839"
}
]
}
¶ Продолжение песни
Если вы хотите продолжить песню, необходимо передать параметр action со значением extend, после чего мы сможем настроить генерацию песни на основе текста, названия и стиля.
Если вы хотите продолжить собственную загруженную песню, можно установить для параметра action значение upload_extend и ввести ID загруженной песни, которую нужно продолжить. ID песни можно получить с помощью Producer Upload API, как показано на изображении ниже:

Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "extend",
"model": "FUZZ-2.0 Pro",
"instrumental": false,
"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",
"continue_at": 3,
"audio_id": "38d3b9e2-0dfb-4338-b2a7-15e45656ed32",
"custom": true,
"title": "Extend",
"weirdness": 0.3,
"sound_strength": 0.3,
"lyrics_strength": 0.6
}'
Тестирование разрешено, результат генерации аналогичен.
{
"success": true,
"task_id": "834983cb-d62d-4750-b1aa-461da137e51f",
"trace_id": "6923eee2-7403-432c-8bd1-e471086385b0",
"data": [
{
"id": "d9ebc609-fb65-4a23-b914-c074747af6a4",
"title": "Extend",
"image_url": "https://cdn.acedata.cloud/e724d7f13d.png",
"lyric": "[Verse]\n[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,
"image_id": "d9ebc609-fb65-4a23-b914-c074747af6a4",
"topic": null,
"seed": "4294469624",
"sound": "",
"created_at": "2025-12-30T17:36:14.520928Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "173.87102040816328"
}
]
}
¶ Вариация музыки
Если вы хотите создать новую композицию с аналогичным звучанием на основе значения seed предыдущей композиции, необходимо передать параметр action со значением variation, после чего можно настроить генерацию новой композиции с аналогичным звучанием.
Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "variation",
"audio_id": "d9ebc609-fb65-4a23-b914-c074747af6a4",
"model": "FUZZ-2.0 Pro",
"instrumental": false,
"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
}'
Тестирование разрешено, результат генерации аналогичен.
{
"success": true,
"task_id": "3a74da6d-a37d-4b5d-b116-821f455bce39",
"trace_id": "8e28cce0-0400-4bfd-83db-6d27f97422c7",
"data": [
{
"id": "c14ca458-cd5a-4700-83d4-5249e15f2707",
"title": "Woke up with the sun in my eyes",
"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,
"image_id": "c14ca458-cd5a-4700-83d4-5249e15f2707",
"topic": null,
"seed": "2082104582",
"sound": "",
"created_at": "2025-12-30T17:48:40.135187Z",
"model": "FUZZ-2.0",
"progress": "100%",
"state": "succeeded",
"duration": "173.12798185941043"
}
]
}
¶ Замена фрагмента
Если мы хотим заменить фрагмент песни, нам нужно передать параметр action со значением replace_section, после чего мы можем создать песню на основе заданных текста и названия.
Если вы хотите продолжить замену фрагментов в загруженной вами песне, можно установить для параметра action значение upload_replace_section и ввести ID загруженной песни, которую нужно продолжить. ID песни можно получить с помощью Producer Upload API, как показано на изображении ниже:

Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "replace_section",
"model": "FUZZ-2.0 Pro",
"instrumental": false,
"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": "d9ebc609-fb65-4a23-b914-c074747af6a4",
"replace_section_start": 3,
"replace_section_end": 70,
"custom": true
}'
Тестирование разрешено, результат генерации аналогичен.
{
"success": true,
"task_id": "3cb5ae96-01b0-4a37-afb0-e582608af56f",
"trace_id": "3ebc6f63-5093-4499-bf9b-95c239e0da4f",
"data": [
{
"id": "a54609c6-13e2-4176-be0f-4d7eebc68e1f",
"title": "Woke up with the sun in my eyes",
"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,
"image_id": "a54609c6-13e2-4176-be0f-4d7eebc68e1f",
"topic": null,
"seed": "14887454",
"sound": "",
"created_at": "2025-12-30T18:01:19.907443Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "174.6140589569161"
}
]
}
¶ Замена инструментального сопровождения
Если вы хотите использовать официальную операцию замены инструментального сопровождения, можно задать параметру action значение swap_instrumentals. Далее мы создадим песню по заданным тексту и названию.
Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "swap_instrumentals",
"model": "FUZZ-2.0 Pro",
"weirdness": 0.6,
"prompt": "Happy",
"audio_id": "d9ebc609-fb65-4a23-b914-c074747af6a4"
}'
Тест прошёл успешно, полученный результат похож на исходный.
{
"success": true,
"task_id": "d17d8376-3a58-451d-a976-404719bac11d",
"trace_id": "ab596807-910a-4e30-bae2-4647895f7d0b",
"data": [
{
"id": "22d7d75c-9e0a-47a8-b22b-eea55eaa0c4b",
"title": "Extend (Sound swap)",
"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,
"image_id": "22d7d75c-9e0a-47a8-b22b-eea55eaa0c4b",
"topic": null,
"seed": "2157878068",
"sound": "Happy",
"created_at": "2025-12-30T18:09:49.594800Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "172.3849433106576"
}
]
}
¶ Замена вокала
Если вы хотите использовать официальную операцию замены вокала, можно задать параметру action значение swap_vocals. Далее мы создадим песню по заданным тексту, названию и стилю.
Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "swap_vocals",
"model": "FUZZ-2.0 Pro",
"instrumental": false,
"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",
"weirdness": 0.6,
"lyrics_strength": 0.8,
"audio_id": "d9ebc609-fb65-4a23-b914-c074747af6a4",
"custom": true
}'
Тест прошёл успешно, полученный результат похож на исходный.
{
"success": true,
"task_id": "a903ac38-f129-4f85-9181-b1dc5579bd32",
"trace_id": "9953af52-45e0-4808-bf13-88f0b21262c1",
"data": [
{
"id": "7b2d653b-aaaa-41b0-b737-aee4c4c5693b",
"title": "Woke up with the sun in my eyes",
"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,
"image_id": "7b2d653b-aaaa-41b0-b737-aee4c4c5693b",
"topic": null,
"seed": "2484735707",
"sound": "",
"created_at": "2025-12-30T18:13:01.349875Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "173.12798185941043"
}
]
}
¶ Разделение вокала и музыки
Если вы хотите использовать официальную операцию разделения вокала и музыки, можно установить значение параметра action равным stems. Далее мы выполним разделение вокала и музыки по ID песни.
Пример заполнения:

После заполнения автоматически генерируется следующий код:

Соответствующий код:
curl -X POST 'https://api.yxai-tech.top/producer/audios' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "stems",
"audio_id": "a54609c6-13e2-4176-be0f-4d7eebc68e1f"
}'
После тестового запуска результат будет аналогичным.
{
"success": true,
"task_id": "561ac695-b4aa-47cf-978d-fb7be2b9ebfc",
"trace_id": "66d0d397-2987-4bde-84fb-a60d0023b217",
"data": [
{
"title": "Woke up with the sun in my eyes",
"lyric": "",
"stems_url": "https://platform.cdn.acedata.cloud/producer/561ac695-b4aa-47cf-978d-fb7be2b9ebfc.zip",
"model": "",
"progress": "100%",
"state": "succeeded"
}
]
}
¶ Асинхронный обратный вызов
Поскольку генерация с помощью Producer Audios Generation API иногда занимает сравнительно много времени, при длительном отсутствии ответа от API HTTP-соединение остаётся открытым, что приводит к дополнительному расходу системных ресурсов. Поэтому этот API также поддерживает асинхронные обратные вызовы.
Общий процесс таков: при отправке запроса клиент дополнительно указывает поле callback_url. После отправки клиентом запроса к API тот немедленно возвращает результат, содержащий поле task_id, которое представляет ID текущей задачи. После завершения задачи результат генерации отправляется в формате POST JSON на указанный клиентом callback_url. Он также содержит поле task_id, благодаря чему результат задачи можно сопоставить с ней по ID.
Далее рассмотрим на примере, как именно это работает.
Прежде всего, обратный вызов Webhook — это служба, способная принимать HTTP-запросы; разработчику следует заменить её URL на URL собственного HTTP-сервера. Для удобства демонстрации здесь используется общедоступный сайт для тестирования Webhook https://webhook.site/. Открыв этот сайт, можно получить URL Webhook, как показано на рисунке:

Скопировав этот URL, его можно использовать в качестве Webhook. В данном примере используется https://webhook.site/#!/view/0d73431d-f833-4be4-9276-b6e1690d55c1.
Далее можно установить значение поля callback_url равным указанному выше URL Webhook и одновременно заполнить соответствующие параметры, как показано на рисунке:

Нажав кнопку запуска, можно увидеть, что результат возвращается немедленно:
{
"task_id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad"
}
Немного подождав, можно увидеть результат задачи генерации на странице https://webhook.site/#!/view/0d73431d-f833-4be4-9276-b6e1690d55c1, как показано на рисунке:

Содержимое:
{
"success": true,
"task_id": "1a6ac2ad-10f2-4e2b-b500-66ec27fe82ad",
"trace_id": "1da03537-4eb8-410d-b849-43f03085a3bb",
"data": [
{
"id": "1dd08826-478e-43a6-868f-aff5ababac2c",
"title": "Woke up with the sun in my eyes",
"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,
"image_id": "1dd08826-478e-43a6-868f-aff5ababac2c",
"topic": null,
"seed": "1490770667",
"sound": "",
"created_at": "2025-12-30T18:36:00.994141Z",
"model": "FUZZ-2.0 Pro",
"progress": "100%",
"state": "succeeded",
"duration": "135.2330158730159"
}
]
}
Как видно, в результате есть поле task_id, остальные поля аналогичны описанным выше, а с помощью этого поля можно связать задачи.
¶ Обработка ошибок
Если при вызове API возникает ошибка, API возвращает соответствующий код ошибки и сообщение. Например:
400 token_mismatched:Неверный запрос, возможно, из-за отсутствующих или недопустимых параметров.400 api_not_implemented:Неверный запрос, возможно, из-за отсутствующих или недопустимых параметров.401 invalid_token:Не авторизовано: недействительный или отсутствующий токен авторизации.429 too_many_requests:Слишком много запросов, вы превысили ограничение частоты запросов.500 api_error:Внутренняя ошибка сервера, на сервере что-то пошло не так.
¶ Пример ответа с ошибкой
{
"success": false,
"error": {
"code": "api_error",
"message": "fetch failed"
},
"trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}
¶ Заключение
Из этой документации вы узнали, как использовать Producer Audios Generation API для создания музыки с помощью текстовых запросов. Надеемся, что эта документация поможет вам эффективнее интегрировать и использовать этот API. Если у вас возникнут вопросы, обращайтесь в нашу службу технической поддержки.

