Replace a section of a track with AI-generated content
Endpoint
POST /api/v1/music/infill
Asynchronous. Returns a task_id. Poll Get Task for results.Replaces a specified time range within an existing clip with new AI-generated content while keeping the rest of the track intact. Useful for fixing or improving a specific section.
Request body
Field
Type
Required
Description
clip_id
string
Yes
Clip ID of the source track.
infill_start_s
float
Yes
Start time (seconds) of the section to replace.
infill_end_s
float
Yes
End time (seconds) of the section to replace.
prompt
string
No
Description or lyrics for the replacement section. Supports Chinese and English.
tags
string
No
Style tags (e.g. "摇滚 吉他" or "rock guitar").
mv
string
No
Model version override.
callback_url
string
No
Webhook URL for completion notification. See Webhooks.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MusicMint - AI Music API","colors":{"primary":"#16A34A","light":"#4ADE80","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/zlch/f6feGuaFmX6fjNh7/logo/light.svg?fit=max\u0026auto=format\u0026n=f6feGuaFmX6fjNh7\u0026q=85\u0026s=e19ca3874c6820076279a42016f8b9ee","dark":"https://mintcdn.com/zlch/f6feGuaFmX6fjNh7/logo/dark.svg?fit=max\u0026auto=format\u0026n=f6feGuaFmX6fjNh7\u0026q=85\u0026s=29bef869505bfd28367d8ec56f271e2d"},"favicon":"/favicon.ico","navbar":{"links":[{"href":"mailto:support@example.com","label":"Support"}]},"footer":{"socials":{}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"API Reference","icon":"code","href":"/api-reference/introduction"}]},"languages":[{"language":"en","href":""},{"language":"zh","href":"zh"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zlch","hasAudioNarration":false,"actualSubdomain":"zlch","customDomains":["docs.musicmint.ai"],"gitSource":{"type":"github","owner":"zlch-oceanai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae94a3d3da74a958a8fc58c:success","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"en","tag":"Music Generation","count":10},{"language":"zh","tag":"音乐生成","count":10},{"language":"en","tag":"Audio Processing","count":5},{"language":"zh","tag":"音频处理","count":5},{"language":"en","tag":"Overview","count":3},{"language":"en","tag":"Tasks \u0026 Results","count":3},{"language":"zh","tag":"概述","count":3},{"language":"zh","tag":"任务与结果","count":3},{"language":"en","tag":"Getting Started","count":2},{"language":"zh","tag":"快速上手","count":2},{"language":"en","tag":"Lyrics","count":1},{"language":"en","tag":"AI Singer (Persona)","count":1},{"language":"zh","tag":"歌词","count":1},{"language":"zh","tag":"AI 歌手(Persona)","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/music/infill","slug":"/api-reference/music/infill","pageMetadata":{"title":"Infill (Replace Section)","description":"Replace a section of a track with AI-generated content","href":"/api-reference/music/infill","hidden":false},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Replace a section of a track with AI-generated content\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`endpoint`,children:`Endpoint`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/music/infill`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Asynchronous.`}),` Returns a `,_jsx(_components.code,{children:`task_id`}),`. Poll `,_jsx(_components.a,{href:`/api-reference/tasks/get`,children:`Get Task`}),` for results.`]}),`\n`,_jsx(_components.p,{children:`Replaces a specified time range within an existing clip with new AI-generated content while keeping the rest of the track intact. Useful for fixing or improving a specific section.`}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`clip_id`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Yes`})}),_jsx(_components.td,{children:`Clip ID of the source track.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`infill_start_s`})}),_jsx(_components.td,{children:`float`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Yes`})}),_jsx(_components.td,{children:`Start time (seconds) of the section to replace.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`infill_end_s`})}),_jsx(_components.td,{children:`float`}),_jsx(_components.td,{children:_jsx(_components.strong,{children:`Yes`})}),_jsx(_components.td,{children:`End time (seconds) of the section to replace.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Description or lyrics for the replacement section. Supports Chinese and English.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tags`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Style tags (e.g. `,_jsx(_components.code,{children:`\"摇滚 吉他\"`}),` or `,_jsx(_components.code,{children:`\"rock guitar\"`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mv`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Model version override.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`callback_url`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Webhook URL for completion notification. See `,_jsx(_components.a,{href:`/api-reference/webhooks`,children:`Webhooks`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`retention_days`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Days to retain audio files. Default `,_jsx(_components.code,{children:`7`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-1710000000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"64f3a1b2c8d9e0f1a2b3c4d5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queuing\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.example.com/api/v1/music/infill`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sk-mm-your-key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"clip_id\": \"abc123def456\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"infill_start_s\": 45.0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"infill_end_s\": 60.0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"[桥段]\\\\n电吉他独奏,充满力量\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tags\": \"摇滚 吉他独奏\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Infill (Replace Section)","description":"Replace a section of a track with AI-generated content","href":"/api-reference/music/infill","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Endpoint","slug":"endpoint","depth":2,"children":[]},{"title":"Request body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"zlch","siteName":"MusicMint - AI Music API","title":"Infill (Replace Section) - MusicMint - AI Music API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/music/infill","matchLevel":0},"zh":{"href":"/zh/api-reference/music/infill","matchLevel":1}}},"lastModified":"2026-03-17T08:38:50.917Z","originalFileLocation":"api-reference/music/infill.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Replace a section of a track with AI-generated content\">\u003cmeta data-mint-head name=\"application-name\" content=\"MusicMint - AI Music API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Infill (Replace Section) - MusicMint - AI Music API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replace a section of a track with AI-generated content\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MusicMint - AI Music API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.musicmint.ai/api-reference/music/infill\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zlch.mintlify.site/_mintlify/api/og/v2?division=Music+Generation\u0026amp;title=Infill+%28Replace+Section%29\u0026amp;description=Replace+a+section+of+a+track+with+AI-generated+content\u0026amp;theme=2490766786df30fa53f34c48\u0026amp;signature=1c56c466c7e2217abec5450022c411a73956bbdec5f4969af87d5bd37342190c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Infill (Replace Section) - MusicMint - AI Music API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replace a section of a track with AI-generated content\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zlch.mintlify.site/_mintlify/api/og/v2?division=Music+Generation\u0026amp;title=Infill+%28Replace+Section%29\u0026amp;description=Replace+a+section+of+a+track+with+AI-generated+content\u0026amp;theme=2490766786df30fa53f34c48\u0026amp;signature=1c56c466c7e2217abec5450022c411a73956bbdec5f4969af87d5bd37342190c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zlch/hy4hiyJRP-lsZkYo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MusicMint - AI Music API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.musicmint.ai/api-reference/music/infill\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/music/infill.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.musicmint.ai/api-reference/music/infill\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.musicmint.ai/zh/api-reference/music/infill\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.musicmint.ai/api-reference/music/infill\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.musicmint.ai/#organization\",\"name\":\"MusicMint - AI Music API\",\"url\":\"https://docs.musicmint.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zlch/f6feGuaFmX6fjNh7/logo/light.svg?fit=max\u0026auto=format\u0026n=f6feGuaFmX6fjNh7\u0026q=85\u0026s=e19ca3874c6820076279a42016f8b9ee\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.musicmint.ai#website\",\"name\":\"MusicMint - AI Music API\",\"url\":\"https://docs.musicmint.ai\",\"publisher\":{\"@id\":\"https://docs.musicmint.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.musicmint.ai/api-reference/music/infill#webpage\",\"url\":\"https://docs.musicmint.ai/api-reference/music/infill\",\"name\":\"Infill (Replace Section)\",\"description\":\"Replace a section of a track with AI-generated content\",\"dateModified\":\"2026-03-17T08:38:50.917Z\",\"isPartOf\":{\"@id\":\"https://docs.musicmint.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.musicmint.ai/api-reference/music/infill#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.musicmint.ai/api-reference/music/infill#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Music Generation\",\"item\":\"https://docs.musicmint.ai/api-reference/music/generate\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Infill (Replace Section)\",\"item\":\"https://docs.musicmint.ai/api-reference/music/infill\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.musicmint.ai/api-reference/music/infill#article\",\"headline\":\"Infill (Replace Section)\",\"name\":\"Infill (Replace Section)\",\"description\":\"Replace a section of a track with AI-generated content\",\"url\":\"https://docs.musicmint.ai/api-reference/music/infill\",\"mainEntityOfPage\":{\"@id\":\"https://docs.musicmint.ai/api-reference/music/infill#webpage\"},\"dateModified\":\"2026-03-17T08:38:50.917Z\",\"publisher\":{\"@id\":\"https://docs.musicmint.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.musicmint.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MusicMint - AI Music API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"MusicMint - AI Music API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/music/infill.md","siteName":"MusicMint - AI Music API","nav":{"global":{"anchors":[{"anchor":"API Reference","icon":"code","href":"/api-reference/introduction"}]},"languages":[{"language":"en","groups":[{"group":"Getting Started","pages":[{"title":"MusicMint - AI Music API","href":""},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Overview","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Webhooks","href":"/api-reference/webhooks"},{"title":"AppKey Management","href":"/api-reference/appkey"}]},{"group":"Music Generation","pages":[{"title":"Generate Music","href":"/api-reference/music/generate"},{"title":"Cover / Remix","href":"/api-reference/music/cover"},{"title":"Remaster","href":"/api-reference/music/remaster"},{"title":"Sound Effects","href":"/api-reference/music/soundfx"},{"title":"Add Vocals (Overpainting)","description":"Add or replace vocals in an existing instrumental or music clip","href":"/api-reference/music/add-vocals"},{"title":"Infill (Replace Section)","href":"/api-reference/music/infill"},{"title":"Upload Audio","description":"Upload an audio file by URL and get a clip ID for use in downstream operations","href":"/api-reference/music/upload"},{"title":"Concat","href":"/api-reference/music/concat"},{"title":"Add Instrumental","href":"/api-reference/music/add-instrumental"},{"title":"Sample / Humming","href":"/api-reference/music/sample"}]},{"group":"Lyrics","pages":[{"title":"Generate Lyrics","href":"/api-reference/lyrics/generate"}]},{"group":"Audio Processing","pages":[{"title":"Stem Separation","href":"/api-reference/audio/stem"},{"title":"MIDI Export","href":"/api-reference/audio/midi"},{"title":"Lyrics Timeline","href":"/api-reference/audio/timeline"},{"title":"Waveform Data","href":"/api-reference/audio/waveform"},{"title":"WAV Download","href":"/api-reference/audio/wav"}]},{"group":"AI Singer (Persona)","pages":[{"title":"Create AI Singer (Persona)","href":"/api-reference/persona/create"}]},{"group":"Tasks \u0026 Results","pages":[{"title":"Get Task","href":"/api-reference/tasks/get"},{"title":"List Tasks","href":"/api-reference/tasks/list"},{"title":"Get Music","href":"/api-reference/music/get"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/music/infill"}]}]},"basePath":"","title":"Infill (Replace Section) - MusicMint - AI Music API","deploymentId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","buildId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","dynamics":[],"chunks":[]}