{"items":[{"type":"link","label":"AI 音乐生成","link":"/zh-cn/reference/ai_music_generator","routeSlug":"/zh-cn/reference/ai_music_generator","content":{"contentType":"overview","meta":{"name":"AI 音乐生成"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"ai_music_generator.json","url":"/_bundle/@l10n/zh-CN/reference/ai_music_generator.json?download"},{"kind":"download","label":"ai_music_generator.yaml","url":"/_bundle/@l10n/zh-CN/reference/ai_music_generator.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"email","title":"E-mail","titleTranslationKey":"info.contact.name","email":"YouCamOnlineEditor_API@perfectcorp.com","label":"YouCamOnlineEditor_API@perfectcorp.com","withCopyButton":true,"copyContent":"YouCamOnlineEditor_API@perfectcorp.com"},{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Privacy policy","url":"https://www.makeupar.com/perfectbeauty/youcam/privacy-policy-api"},{"kind":"externallink","label":"Terms of Service","labelTranslationKey":"info.termsOfService","url":"https://www.makeupar.com/perfectbeauty/youcam/terms-of-service-api"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://yce-api-01.makeupar.com"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"AI 音乐生成","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[]}],"sectionId":"/"}],"sectionId":"/"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":1,"id":"section/(overview)"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"概览 (Overview)"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"主题、歌词和/或音乐风格，任给一样就能完成一首歌。每个 AI 音乐生成任务会作曲一首成品歌曲（mp3），并一并返回封面图、歌名、定稿歌词与歌词同步时间轴。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"有声乐、纯音乐都行：生成带人声的歌曲，或无人声、无歌词的纯音乐（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental: true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"手上有什么就从什么开始：主题（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）、自己的歌词（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"），或两者都给。纯音乐歌曲必须给 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌词语言：直接在 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 文字里提要求（例如 \"with Japanese lyrics\"）。支持的歌词语言：英语、日语、韩语、葡萄牙语、西班牙语、德语、法语、意大利语、繁体中文、简体中文、印地语、土耳其语。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用示例："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://plugins-media.makeupar.com/smb/blog/post/2026-10-15/webp_b29b16b3-6f1f-4f94-b0f3-ef7955d1b3e0.webp"},"children":[],"type":"image"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://plugins-media.makeupar.com/smb/blog/post/2026-09-24/webp_90715cdb-e955-4501-9290-0869981b3f43.webp"},"children":[],"type":"image"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/(overview)"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/(overview)/(integration-guide)"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"接入指南 (Integration Guide)"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 音乐生成使用指南"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"本指南说明如何运行 AI 音乐生成任务并解读结果。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"不需要上传图像或音频，所以用不上 File API：跑任务前没有\"创建新文件\"这一步。输入你的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"，选好 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"music_style"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"，就能做出令人惊艳的歌曲。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"第 1 步：创建任务"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 任务 API"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.0/task/ai-song"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"），传入主题、歌词和/或音乐风格："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --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}'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --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}'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应会返回这个任务的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"task_id\": \"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"task_id\": \"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe\"\n  }\n}\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"第 2 步：轮询任务结果"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"用创建任务响应里的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 查询状态，直到 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_status"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 变成 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --request GET \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song/YOUR_TASK_ID \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --request GET \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song/YOUR_TASK_ID \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"第 3 步：获取结果"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"成功的响应会包含歌曲，以及封面图、标题、定稿歌词与歌词同步时间戳："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"error\": null,\n    \"results\": {\n      \"url\": \"https://example.com/sample-song-url\",\n      \"cover_urls\": [\n        \"https://example.com/sample-cover-url\"\n      ],\n      \"title\": \"Leave the Light On\",\n      \"lyrics\": \"[verse]\\nTwo a.m., the neon hums\\nSteam on the glass, the night still runs\",\n      \"duration\": 154.3,\n      \"timestamps\": \"{\\\"lyrics_lrc_timestamps\\\": \\\"[00:23.98]Two a.m., the neon hums\\\"}\"\n    },\n    \"task_status\": \"success\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"error\": null,\n    \"results\": {\n      \"url\": \"https://example.com/sample-song-url\",\n      \"cover_urls\": [\n        \"https://example.com/sample-cover-url\"\n      ],\n      \"title\": \"Leave the Light On\",\n      \"lyrics\": \"[verse]\\nTwo a.m., the neon hums\\nSteam on the glass, the night still runs\",\n      \"duration\": 154.3,\n      \"timestamps\": \"{\\\"lyrics_lrc_timestamps\\\": \\\"[00:23.98]Two a.m., the neon hums\\\"}\"\n    },\n    \"task_status\": \"success\"\n  }\n}\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/(overview)/(integration-guide)"}],"sectionId":"/section/(overview)/(integration-guide)"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/(overview)/(inputs-and-outputs)"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"输入与输出 (Inputs & Outputs)"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"请求体"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"字段"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"类型"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"说明"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string（最多 500 字符）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲主题。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 为 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 时必填。带人声的歌曲请提供 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或两者。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string（最多 3000 字符）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲歌词。支持 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[intro]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[verse]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[chorus]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[outro]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 等段落标签。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"music_style"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"object"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲音乐风格："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"genre"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（最多 100）、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"mood"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（最多 100）、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"vocal"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"female"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"male"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"，纯音乐时忽略），以及放乐器、节奏等其他细节的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"description"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（最多 300）。所有字段均可选。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"boolean"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 表示生成无人声、无歌词的纯音乐。默认 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"每个请求必须以下面两种方式之一描述歌曲：从主题出发（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 不为空），或从带人声歌曲的歌词出发（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 不为空且 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 不是 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"结果（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"data.results"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"字段"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"类型"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"说明"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"url"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下载生成歌曲（mp3）的 URL。有效期 2 小时"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"cover_urls"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string 数组"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下载封面图（jpg）的 URL。目前为一张。有效期 2 小时"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"title"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"生成出来的歌曲标题"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲定稿歌词。纯音乐时为空"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"duration"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"number"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲时长（秒）"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"timestamps"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"string"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"一个对象 JSON 编码后的字符串，其中 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics_lrc_timestamps"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 字段放 LRC 格式的歌词同步内容，例如 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[00:08.54]Lyrics text"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。纯音乐时 LRC 内容为空"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/(overview)/(inputs-and-outputs)"}],"sectionId":"/section/(overview)/(inputs-and-outputs)"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/(overview)/(file-specs-and-errors)"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"文件规格与错误码 (File Specs & Errors)"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"支持上限"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"类型"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上限"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea（主题）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"最多 500 字符。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 为 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 时必填"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"最多 3000 字符。支持 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[intro]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[verse]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[chorus]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"[outro]"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 等段落标签"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"music_style "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"genre"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" / "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"mood"},"children":[],"type":"code"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"各最多 100 字符"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"music_style "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"description"},"children":[],"type":"code"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"最多 300 字符"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"输入文件"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"无。不需要图像或音频输入，因此不必走 File API 步骤"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"输出"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲：mp3。封面图：jpg。结果 URL 有效期 2 小时"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"错误码"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"错误码"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"说明"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"invalid_parameter"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"参数值无效，例如 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 和 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"lyrics"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 都没给、纯音乐任务少了 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"idea"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、或字段超过长度上限"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任务级的失败会在状态响应中体现："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"data.error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 是错误码，"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"data.error_message"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 是错误的详细说明。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"blockquote"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/(overview)/(file-specs-and-errors)"}],"sectionId":"/section/(overview)/(file-specs-and-errors)"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/(overview)/(unit-consumption)"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"点数消耗 (Unit Consumption)"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"按歌曲类型计价。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲类型"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"消耗点数"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"带人声的歌曲（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental: false"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"每首 10 点"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"纯音乐（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"instrumental: true"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"每首 20 点"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/(overview)/(unit-consumption)"}],"sectionId":"/section/(overview)/(unit-consumption)"}]}]}},{"type":"group","label":"概览 (Overview)","link":"/zh-cn/reference/ai_music_generator/section/(overview)","routeSlug":"/zh-cn/reference/ai_music_generator/section/(overview)","items":[{"type":"link","label":"接入指南 (Integration Guide)","link":"/zh-cn/reference/ai_music_generator/section/(overview)/(integration-guide)","routeSlug":"/zh-cn/reference/ai_music_generator/section/(overview)/(integration-guide)","content":null},{"type":"link","label":"输入与输出 (Inputs & Outputs)","link":"/zh-cn/reference/ai_music_generator/section/(overview)/(inputs-and-outputs)","routeSlug":"/zh-cn/reference/ai_music_generator/section/(overview)/(inputs-and-outputs)","content":null},{"type":"link","label":"文件规格与错误码 (File Specs & Errors)","link":"/zh-cn/reference/ai_music_generator/section/(overview)/(file-specs-and-errors)","routeSlug":"/zh-cn/reference/ai_music_generator/section/(overview)/(file-specs-and-errors)","content":null},{"type":"link","label":"点数消耗 (Unit Consumption)","link":"/zh-cn/reference/ai_music_generator/section/(overview)/(unit-consumption)","routeSlug":"/zh-cn/reference/ai_music_generator/section/(overview)/(unit-consumption)","content":null}],"content":null},{"type":"group","label":"V1.0","link":"/zh-cn/reference/ai_music_generator/v1.0","routeSlug":"/zh-cn/reference/ai_music_generator/v1.0","items":[{"label":"运行 AI 音乐生成任务。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-cn/reference/ai_music_generator/v1.0/paths/~1s2s~1v2.0~1task~1ai-song/post","routeSlug":"/zh-cn/reference/ai_music_generator/v1.0/paths/~1s2s~1v2.0~1task~1ai-song/post","metadata":{"seo":{"title":"运行 AI 音乐生成任务。","description":"AI 任务是异步处理的。功能支持 Webhook 时，优先用 Webhook 来接收完成通知。配置好您的 Webhook 端点、校验 Webhook 签名，收到 success 或 error 通知后，用收到的 task_id 查询任务结果。配置与校验的细节请见 Webhook 接入指南。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"运行 AI 音乐生成任务。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1ai-song/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"运行 AI 音乐生成任务。","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 任务是异步处理的。功能支持 Webhook 时，优先用 Webhook 来接收完成通知。配置好您的 Webhook 端点、校验 Webhook 签名，收到 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 通知后，用收到的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 查询任务结果。配置与校验的细节请见 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"/develop/webhook"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Webhook 接入指南"},"children":[],"type":"text"}],"type":"link"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"若功能不支持 Webhook，或您的接入方式用不了 Webhook，就请实现轮询。提交 AI 任务后，按固定间隔（例如每 10 秒）轮询状态接口，直到任务状态变为 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用标准的 Bearer 鉴权。把您的 API 密钥放进请求头： "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。请注意 'Bearer' 与 'YOUR_API_KEY' 之间有一个空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_0"}},"schemaId":"schema_0","pointer":"/paths/~1s2s~1v2.0~1task~1ai-song/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/task/ai-song","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_0"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.0/task/ai-song","href":"v1.0/paths/~1s2s~1v2.0~1task~1ai-song/post","summary":"运行 AI 音乐生成任务。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"schema_0","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_0"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任务运行成功"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}},"schemaId":"components/schemas/BasicRunTaskResponseV2"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任务运行失败"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 密钥无效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}},"schemaId":"schema_2"},{"code":"429","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"请求过多"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}},"schemaId":"schema_3"}],"pointer":"/paths/~1s2s~1v2.0~1task~1ai-song/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/BasicRunTaskResponseV2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}}},{"code":"400","schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}}},{"code":"401","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"429","schemaId":"schema_3","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1ai-song/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/ai-song"},{"label":"查询 AI 音乐生成任务状态。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-cn/reference/ai_music_generator/v1.0/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get","routeSlug":"/zh-cn/reference/ai_music_generator/v1.0/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get","metadata":{"seo":{"title":"查询 AI 音乐生成任务状态。","description":"查询 AI 音乐生成任务状态。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"查询 AI 音乐生成任务状态。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"查询 AI 音乐生成任务状态。","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用标准的 Bearer 鉴权。把您的 API 密钥放进请求头： "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。请注意 'Bearer' 与 'YOUR_API_KEY' 之间有一个空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"task_id","in":"path","schemaId":"schema_4","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"要查询的任务 ID"},"children":[],"type":"text"}],"type":"paragraph"}],"required":true}],"pointer":"/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/ai-song/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_4"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.0/task/ai-song/{task_id}","href":"v1.0/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get","summary":"查询 AI 音乐生成任务状态。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任务状态查询成功"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}},"schemaId":"schema_5"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任务 ID 无效"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}},"schemaId":"schema_6"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 密钥无效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}},"schemaId":"schema_2"},{"code":"500","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任务执行超时"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}},"schemaId":"schema_7"}],"pointer":"/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_5","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}}},{"code":"400","schemaId":"schema_6","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}}},{"code":"401","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"500","schemaId":"schema_7","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/ai-song/{task_id}"}],"content":{"contentType":"group","meta":{"name":"V1.0"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"V1.0","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 音乐生成 API 把主题、歌词和/或音乐风格变成一首完整的歌。每个任务返回一首成品歌曲（mp3），附封面图、标题、歌词与歌词同步时间戳。"},"children":[],"type":"text"}],"type":"paragraph"}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/s2s/v2.0/task/ai-song","summary":"运行 AI 音乐生成任务。","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1ai-song/post","deprecated":false},{"title":"/s2s/v2.0/task/ai-song/{task_id}","summary":"查询 AI 音乐生成任务状态。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1ai-song~1{task_id}/get","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/BasicRunTaskResponseV2":{"id":"components/schemas/BasicRunTaskResponseV2","kind":"json-schema","title":"BasicRunTaskResponseV2","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应状态"},"children":[],"type":"text"}],"type":"paragraph"}],"example":200},"data":{"type":"object","properties":{"task_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"该任务的 ID。凭这个 ID 可在 30 天内查询任务结果。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"}}}}}},"components/schemas/RunError":{"id":"components/schemas/RunError","kind":"json-schema","title":"RunError","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应状态"},"children":[],"type":"text"}],"type":"paragraph"}],"example":400},"error":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"错误信息"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"The operation could not be completed"},"error_code":{"type":"string","enum":["InvalidParameters","CreditInsufficiency","InvalidStyleGroup","InvalidStyle","BadRequest"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"错误码："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidParameters - 请求参数无效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"CreditInsufficiency - 点数不足，无法运行"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"BadRequest - 请求参数不符合预期"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidStyleGroup - 风格分组 ID 无效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidStyle - 风格 ID 无效"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}}}},"components/schemas/EngineErrorCode":{"id":"components/schemas/EngineErrorCode","kind":"json-schema","title":"EngineErrorCode","data":{"type":"string","nullable":true,"enum":["error_exceed_max_image_size","exceed_max_filesize","invalid_parameter","error_download_image","error_download_mask","error_decode_image","error_decode_mask","error_nsfw_content_detected","error_no_face","error_pose","error_face_parsing","error_inference","exceed_nsfw_retry_limits","error_upload","unknown_internal_error"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"错误码："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_exceed_max_image_size`  - 输入图片尺寸超出上限"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`exceed_max_filesize` - 输入文件大小超出上限"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`invalid_parameter` - 参数取值无效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_download_image` - 下载原图出错"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_download_mask` - 下载蒙版图片出错"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_decode_image` - 解码原图出错"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_decode_mask` - 解码蒙版图片出错"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_nsfw_content_detected` - 在原图中检测到不适宜内容（NSFW）"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_no_face` - 原图中没有检测到人脸"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_pose` - 原图的姿态检测失败"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_face_parsing` - 原图的人脸分割失败"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_inference` - 推理流程中出现错误"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`exceed_nsfw_retry_limits` - 为避免生成不适宜内容， 重试次数已用尽"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_upload` - 上传结果图片出错"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`unknown_internal_error` - 其他错误"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}},"components/schemas/TaskStatusResponseBodySingleUrlResultsV2":{"id":"components/schemas/TaskStatusResponseBodySingleUrlResultsV2","kind":"json-schema","title":"TaskStatusResponseBodySingleUrlResultsV2","data":{"type":"object","properties":{"url":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下载该结果的 URL，有效期 2 小时"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/sample-result-url"}}}},"components/schemas/TaskStatusResponseV2":{"id":"components/schemas/TaskStatusResponseV2","kind":"json-schema","title":"TaskStatusResponseV2","data":{"type":"object","properties":{"url":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下载该结果的 URL，有效期 2 小时"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/sample-result-url"}}}},"schema_0":{"kind":"json-schema","data":{"type":"object","properties":{"idea":{"type":"string","maxLength":500,"default":"","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲主题。instrumental 为 true 时必填。带人声的歌曲请提供 idea、lyrics 或两者。 想要特定语言的歌词，就在这里提出（例如 \"with Japanese lyrics\"）。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"A song about a small café that stays open late for people who can't sleep"},"lyrics":{"type":"string","maxLength":3000,"default":"","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲歌词。支持 [intro]、[verse]、[chorus]、[outro] 等段落标签。支持的歌词语言： 英语、日语、韩语、葡萄牙语、西班牙语、德语、法语、意大利语、繁体中文、简体中文、印地语、土耳其语。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"[verse]\nTwo a.m., the neon hums\nSteam on the glass, the night still runs\n\n[chorus]\nLeave the light on, leave the light on\nFor the ones who don't go home"},"music_style":{"type":"object","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲的音乐风格。所有字段均可选。"},"children":[],"type":"text"}],"type":"paragraph"}],"properties":{"genre":{"type":"string","maxLength":100,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲曲风，例如 Pop、Lo-fi Hip Hop"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Acoustic Pop"},"mood":{"type":"string","maxLength":100,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲情绪，例如 Calm、Uplifting"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Calm, hopeful"},"vocal":{"type":"string","enum":["female","male"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"人声类型。instrumental 为 true 时忽略。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"female"},"description":{"type":"string","maxLength":300,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"其他细节，例如乐器或节奏。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"soft piano, brushed drums"}}},"instrumental":{"type":"boolean","default":false,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"设为 true 生成无人声、无歌词的纯音乐。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":false}},"anyOf":[{"title":"从主题生成歌曲","required":["idea"],"properties":{"idea":{"minLength":1}}},{"title":"从歌词生成带人声歌曲","required":["lyrics"],"properties":{"lyrics":{"minLength":1},"instrumental":{"enum":[false]}}}]},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/RunError"}]},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":401,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应状态"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Invalid API key"}}},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":429,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应状态"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Too many requests"}}},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"string","example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/TaskStatusResponseV2"},{"type":"object","properties":{"data":{"type":"object","properties":{"results":{"type":"object","properties":{"cover_urls":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下载封面图（jpg）的 URL。目前为一张。有效期 2 小时"},"children":[],"type":"text"}],"type":"paragraph"}],"items":{"type":"string","example":"https://example.com/sample-cover-url"}},"title":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"生成出来的歌曲标题"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"Leave the Light On"},"lyrics":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲定稿歌词。纯音乐时为空"},"children":[],"type":"text"}],"type":"paragraph"}]},"duration":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"歌曲时长（秒）"},"children":[],"type":"text"}],"type":"paragraph"}],"example":154.3},"timestamps":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"一个对象 JSON 编码后的字符串，其中 lyrics_lrc_timestamps 字段放 LRC 格式的同步歌词，例如 [00:08.54]Lyrics text。纯音乐时 LRC 内容为空"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"{\"lyrics_lrc_timestamps\": \"[00:23.98]Two a.m., the neon hums\\n[00:28.26]Steam on the glass, the night still runs\"}"}}}}}}}]},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":400,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应状态"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Invalid task ID"}}},"id":"schema_6"},"schema_7":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":500,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"响应状态"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Task execution timed out"}}},"id":"schema_7"}},"exampleStore":{},"securitySchemeStore":{"BearerAuthenticationV2":{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用标准的 Bearer 鉴权。把您的 API 密钥放进请求头： "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。请注意 'Bearer' 与 'YOUR_API_KEY' 之间有一个空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}},"specVersion":"3.0.0","servers":[{"url":"https://yce-api-01.makeupar.com"}],"specType":"openapi"},"options":{"layout":"stacked","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/@l10n/zh-CN/reference/ai_music_generator.json?download"},{"url":"/_bundle/@l10n/zh-CN/reference/ai_music_generator.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"AI 音乐生成","description":"# 概览 (Overview)\n主题、歌词和/或音乐风格，任给一样就能完成一首歌。每个 AI 音乐生成任务会作曲一首成品歌曲（mp3），并一并返回封面图、歌名、定稿歌词与歌词同步时间轴。\n\n* 有声乐、纯音乐都行：生成带人声的歌曲，或无人声、无歌词的纯音乐（`instrumental: true`）。\n* 手上有什么就从什么开始：主题（`idea`）、自己的歌词（`lyrics`），或两者都给。纯音乐歌曲必须给 `idea`。\n* 歌词语言：直接在 `idea` 文字里提要求（例如 \"with Japanese lyrics\"）。支持的歌词语言：英语、日语、韩语、葡萄牙语、西班牙语、德语、法语、意大利语、繁体中文、简体中文、印地语、土耳其语。\n\n使用示例：\n\n![](https://plugins-media.makeupar.com/smb/blog/post/2026-10-15/webp_b29b16b3-6f1f-4f94-b0f3-ef7955d1b3e0.webp)\n\n![](https://plugins-media.makeupar.com/smb/blog/post/2026-09-24/webp_90715cdb-e955-4501-9290-0869981b3f43.webp)\n\n---\n\n## 接入指南 (Integration Guide)\n\n* AI 音乐生成使用指南\n\n本指南说明如何运行 AI 音乐生成任务并解读结果。\n\n不需要上传图像或音频，所以用不上 File API：跑任务前没有\"创建新文件\"这一步。输入你的 `idea` 或 `lyrics`，选好 `music_style`，就能做出令人惊艳的歌曲。\n\n***\n\n   * 第 1 步：创建任务\n\n用 **AI 任务 API**（`/s2s/v2.0/task/ai-song`），传入主题、歌词和/或音乐风格：\n\n```bash\ncurl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --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}'\n```\n\n响应会返回这个任务的 `task_id`：\n\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"task_id\": \"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe\"\n  }\n}\n```\n\n***\n\n   * 第 2 步：轮询任务结果\n\n用创建任务响应里的 `task_id` 查询状态，直到 `task_status` 变成 `success` 或 `error`：\n\n```bash\ncurl --request GET \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song/YOUR_TASK_ID \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json'\n```\n\n***\n\n   * 第 3 步：获取结果\n\n成功的响应会包含歌曲，以及封面图、标题、定稿歌词与歌词同步时间戳：\n\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"error\": null,\n    \"results\": {\n      \"url\": \"https://example.com/sample-song-url\",\n      \"cover_urls\": [\n        \"https://example.com/sample-cover-url\"\n      ],\n      \"title\": \"Leave the Light On\",\n      \"lyrics\": \"[verse]\\nTwo a.m., the neon hums\\nSteam on the glass, the night still runs\",\n      \"duration\": 154.3,\n      \"timestamps\": \"{\\\"lyrics_lrc_timestamps\\\": \\\"[00:23.98]Two a.m., the neon hums\\\"}\"\n    },\n    \"task_status\": \"success\"\n  }\n}\n```\n\n---\n\n## 输入与输出 (Inputs & Outputs)\n\n* 请求体\n\n| 字段 | 类型 | 说明 |\n|---|---|---|\n| idea | string（最多 500 字符） | 歌曲主题。`instrumental` 为 `true` 时必填。带人声的歌曲请提供 `idea`、`lyrics` 或两者。 |\n| lyrics | string（最多 3000 字符） | 歌曲歌词。支持 `[intro]`、`[verse]`、`[chorus]`、`[outro]` 等段落标签。 |\n| music_style | object | 歌曲音乐风格：`genre`（最多 100）、`mood`（最多 100）、`vocal`（`female` 或 `male`，纯音乐时忽略），以及放乐器、节奏等其他细节的 `description`（最多 300）。所有字段均可选。 |\n| instrumental | boolean | `true` 表示生成无人声、无歌词的纯音乐。默认 `false`。 |\n\n每个请求必须以下面两种方式之一描述歌曲：从主题出发（`idea` 不为空），或从带人声歌曲的歌词出发（`lyrics` 不为空且 `instrumental` 不是 `true`）。\n\n* 结果（`data.results`）\n\n| 字段 | 类型 | 说明 |\n|---|---|---|\n| url | string | 下载生成歌曲（mp3）的 URL。有效期 2 小时 |\n| cover_urls | string 数组 | 下载封面图（jpg）的 URL。目前为一张。有效期 2 小时 |\n| title | string | 生成出来的歌曲标题 |\n| lyrics | string | 歌曲定稿歌词。纯音乐时为空 |\n| duration | number | 歌曲时长（秒） |\n| timestamps | string | 一个对象 JSON 编码后的字符串，其中 `lyrics_lrc_timestamps` 字段放 LRC 格式的歌词同步内容，例如 `[00:08.54]Lyrics text`。纯音乐时 LRC 内容为空 |\n\n---\n\n## 文件规格与错误码 (File Specs & Errors)\n\n* 支持上限\n\n| 类型 | 上限 |\n|---|---|\n| idea（主题） | 最多 500 字符。`instrumental` 为 `true` 时必填 |\n| lyrics | 最多 3000 字符。支持 `[intro]`、`[verse]`、`[chorus]`、`[outro]` 等段落标签 |\n| music_style `genre` / `mood` | 各最多 100 字符 |\n| music_style `description` | 最多 300 字符 |\n| 输入文件 | 无。不需要图像或音频输入，因此不必走 File API 步骤 |\n| 输出 | 歌曲：mp3。封面图：jpg。结果 URL 有效期 2 小时 |\n\n* 错误码\n\n| 错误码 | 说明 |\n|---|---|\n| invalid_parameter | 参数值无效，例如 `idea` 和 `lyrics` 都没给、纯音乐任务少了 `idea`、或字段超过长度上限 |\n\n    > 任务级的失败会在状态响应中体现：`data.error` 是错误码，`data.error_message` 是错误的详细说明。\n\n---\n\n## 点数消耗 (Unit Consumption)\n\n按歌曲类型计价。\n\n| 歌曲类型 | 消耗点数 |\n|---|---|\n| 带人声的歌曲（`instrumental: false`） | 每首 10 点 |\n| 纯音乐（`instrumental: true`） | 每首 20 点 |\n\n---\n"}},"baseSlug":"/zh-cn/reference/ai_music_generator","routesMapping":{}}