prompt is optional; it serves as the core idea, and lyrics are generated automatically (not a strict match), maximum 3000 characters
lyrics can be used as a lyrics attachment together with prompt
At least one of imageUrls, videoUrls, audioUrls, style, or lyrics must be provided; generation is rejected if all are empty
imageUrls, videoUrls, and audioUrls are only valid in this mode
Do not pass parameters that are only available in custom mode: title, negativeTags, duration, vocalGender, styleWeight, weirdnessConstraint, audioWeight, variety
Total attachments must not exceed 10: style + lyrics + imageUrls + videoUrls + audioUrls
The following fields are optional controls available for this endpoint:
prompt (string): Description of the desired audio content. Optional. Used as lyrics in custom mode; used as the core idea in non-custom mode (maximum 3000 characters).
lyrics (string): Lyrics content. Optional. V6 series maximum 5000 characters. In custom mode, takes priority over prompt as lyrics; in non-custom mode, can be used as a lyrics attachment together with prompt.
imageUrls (array): Image references. Only effective when customMode is false. Up to 5 images, each no more than 10 MB. Supported formats: jpeg, png, webp, bmp.
videoUrls (array): Video references. Only effective when customMode is false. Up to 1 file, each no more than 100 MB, duration no more than 241 seconds. Supported formats: mp4, mov, webm.
audioUrls (array): Audio references. Only effective when customMode is false. Duration must be between 6 seconds and 30 minutes; each file no more than 500 MB.
style (string): Music style specification. See character limits in Parameter Details above.
title (string): Track title. Optional. Only available when customMode is true. Maximum 80 characters. Displayed in player interfaces and filenames.
negativeTags (string): Music styles or traits to exclude from the generated audio. Only available when customMode is true. For V6, V6_MINI, and V6_WILD: maximum 1000 characters.
vocalGender (string): Vocal gender preference. m for male, f for female. Only available when customMode is true. In practice, this only increases probability and cannot guarantee the instruction is followed.
styleWeight (number): Strength of adherence to the specified style. Range 0–1, up to 2 decimal places. Only effective when customMode is true.
weirdnessConstraint (number): Creative/experimental deviation. Range 0–1, up to 2 decimal places. Only effective when customMode is true.
audioWeight (number): Relative weight of audio features. Range 0–1, up to 2 decimal places. Only effective when customMode is true. Not supported when there are no vocals.
variety (number): Diversity of generated results. Integer from 0–4, default 1. Only effective when customMode is true. 0 off (exact style), 1 normal (default, balanced), 2 high (distinct styles), 3 extra (bold exploration), 4 max (maximum variation).
personaId (string): Persona ID or Voice ID. Optional. To generate a Persona ID, see Generate Persona.
personaModel (string): Persona model, style_persona or voice_persona. Only available for V5 (Discontinued), V5_5 (Discontinued), V6, V6_MINI, and V6_WILD.
duration (number): Audio duration in seconds. Range 10–360, default 20. Only available when customMode is true, and only valid when the model is V5_5, V6, V6_MINI, or V6_WILD.
{ "customMode": false, "instrumental": false, "prompt": "A chill lo-fi beat with soft vocals", "lyrics": "[Verse] Night city lights shining bright", "style": "lo-fi, chill", "imageUrls": [ "https://example.com/reference-image.png" ], "videoUrls": [ "https://example.com/reference-video.mp4" ], "audioUrls": [ "https://example.com/reference-audio.mp3" ], "model": "V6", "callBackUrl": "https://example.com/callback"}
{ "customMode": true, "instrumental": false, "title": "Peaceful Piano Meditation", "style": "Classical", "lyrics": "[Verse] Night city lights shining bright", "prompt": "A calm and relaxing piano track with soft melodies", "negativeTags": "Heavy Metal, Upbeat Drums", "vocalGender": "m", "styleWeight": 0.65, "weirdnessConstraint": 0.65, "audioWeight": 0.65, "variety": 1, "duration": 20, "model": "V6", "callBackUrl": "https://example.com/callback"}
The AI model version to use for generation. Required for all requests. Default: V6. Available options:
V6_WILD: Pushes creative boundaries for bolder, more distinctive musical expression.
V6_MINI: Lightweight and fast, balancing quality and speed for effortless creation.
V6: Greater musical expression with more natural vocals and richer details. Recommended default.
V5_5 (Discontinued): Custom models tailored to your unique taste.
V5 (Discontinued): Superior musical expression, faster generation.
V4_5PLUS (Discontinued): V4.5+ delivers richer sound, new ways to create, max 8 min.
V4_5 (Discontinued): V4.5 enables smarter prompts, faster generations, max 8 min.
V4_5ALL (Discontinued): V4.5ALL enables smarter prompts, faster generations, max 8 min.
V4 (Discontinued): V4 improves vocal quality, max 4 min.
Discontinued values remain listed only for backward compatibility; use a V6-series model for new integrations.
The URL to receive task completion notifications when music generation is complete. The callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete). Note: In some cases, text and first stages may be skipped, directly returning complete.
A description of the desired audio content. Optional.
Custom mode (customMode=true): When provided, the prompt is used strictly as lyrics and sung in the generated track. If lyrics is also provided, lyrics takes priority. Character limits by model:
V4 (Discontinued): Maximum 3000 characters
V4_5, V4_5PLUS, V4_5ALL, V5_5, V5 (Discontinued): Maximum 5000 characters
Non-custom mode (customMode=false): When provided, the prompt serves as the core idea. Lyrics are generated automatically based on it and do not strictly match the input. Maximum 3000 characters.
prompt is not required. In non-custom mode, provide at least one of imageUrls, videoUrls, audioUrls, style, or lyrics. In custom mode, provide at least one of style, lyrics, or negativeTags. Generation is rejected if all related inputs are empty.
Example:
"A calm and relaxing piano track with soft melodies"
Music style specification for the generated audio.
Character limits by model:
V4 (Discontinued): Maximum 200 characters
V4_5 and V4_5PLUS (Discontinued): Maximum 1000 characters
V4_5ALL (Discontinued): Maximum 1000 characters
V5_5 and V5 (Discontinued): Maximum 1000 characters
V6, V6_MINI, and V6_WILD: Maximum 1000 characters
Common examples: Jazz, Classical, Electronic, Pop, Rock, Hip-hop, etc.
In custom mode, provide at least one of style, lyrics, or negativeTags. In non-custom mode, provide at least one of imageUrls, videoUrls, audioUrls, style, or lyrics.
Only available when Custom Mode (customMode: true) is enabled. Strength of adherence to the specified style. Optional. Range 0–1, up to 2 decimal places.
Required range: 0 <= x <= 1Must be a multiple of 0.01
Only available when Custom Mode (customMode: true) is enabled. Controls the diversity and stylistic variation of generated results. Optional. Range 0–4, integer, default 1.
0: off (exact style) — fully off, strictly the same style
1: normal (balanced variety) — default, balances stability and diversity
2: high (distinct styles) — produces results with clearly different styles
3: extra (bold exploration) — higher variation, encourages bold exploration of different styles
4: max (unreasonably varied) — maximum diversity; results may differ in style very significantly
Required range: 0 <= x <= 4Must be a multiple of 1
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Suno API","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://sunoapi.org/logo.png","dark":"https://sunoapi.org/logo.png"},"favicon":"https://mintcdn.com/sunoapiorg/efdUzIovugj6NDSU/favicon.ico?fit=max\u0026auto=format\u0026n=efdUzIovugj6NDSU\u0026q=85\u0026s=9c808a02b0c40b03132ce976e03ddcef","navbar":{"links":[{"href":"mailto:support@sunoapi.org","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://sunoapi.org/dashboard"}},"footer":{},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"house","href":"https://sunoapi.org/"},{"anchor":"Old Docs","icon":"book-open-cover","href":"https://old-docs.sunoapi.org/"}]},"languages":[{"language":"en","href":""},{"language":"cn","href":"cn"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sunoapiorg","hasAudioNarration":false,"actualSubdomain":"sunoapiorg","customDomains":["docs.sunoapi.org"],"gitSource":{"type":"gitlab","owner":"development","repo":"docs.sunoapi.org","deployBranch":"main","contentDirectory":"","isPrivate":true,"projectId":311,"hostUrl":"https://gitlab.tattooidea.ai","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad43b561fc77c75a5a1cb55","collectionId":"1e85f3fd-a550-4c99-a520-9a5befb93f83","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad43b561fc77c75a5a1cb55"},"entitlements":{},"buildId":"6ad43b561fc77c75a5a1cb55","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"cn","tag":"Generate Music","count":24},{"language":"en","tag":"Generate Music","count":24},{"language":"cn","tag":"Suno Voice","count":9},{"language":"en","tag":"Suno Voice","count":9},{"language":"cn","tag":"Vocal Removal","count":6},{"language":"en","tag":"Vocal Removal","count":6},{"language":"cn","tag":"文件上传API","count":4},{"language":"en","tag":"File Upload API","count":4},{"language":"cn","tag":"WAV Conversion","count":3},{"language":"cn","tag":"Music Video Generation","count":3},{"language":"cn","tag":"Generate Lyrics","count":3},{"language":"en","tag":"WAV Conversion","count":3},{"language":"en","tag":"Music Video Generation","count":3},{"language":"en","tag":"Generate Lyrics","count":3},{"language":"cn","tag":"Generate Sounds","count":1},{"language":"cn","tag":"Account Management","count":1},{"language":"en","tag":"Generate Sounds","count":1},{"language":"en","tag":"Account Management","count":1}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"suno-api/generate-music","slug":"/suno-api/generate-music","pageMetadata":{"title":"Generate Music","description":"Generate music with or without lyrics using AI models.","openapi":"suno-api/suno-api.json POST /api/v1/generate","href":"/suno-api/generate-music"},"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: \"Generate music with or without lyrics using AI models.\"\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`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Note}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`model-versions`,children:`Model Versions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Current models`}),`: `,_jsx(_components.code,{children:`V6`}),` (default), `,_jsx(_components.code,{children:`V6_WILD`}),`, `,_jsx(_components.code,{children:`V6_MINI`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Deprecated models`}),`: `,_jsx(_components.code,{children:`V5_5`}),`, `,_jsx(_components.code,{children:`V5`}),`, `,_jsx(_components.code,{children:`V4_5PLUS`}),`, `,_jsx(_components.code,{children:`V4_5ALL`}),`, `,_jsx(_components.code,{children:`V4_5`}),`, `,_jsx(_components.code,{children:`V4`})]}),`\n`,_jsx(_components.li,{children:`Deprecated values remain available only for backward compatibility. New integrations should use a V6-series model.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`usage-guide`,children:`Usage Guide`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`This endpoint creates music based on your text prompt`}),`\n`,_jsx(_components.li,{children:`Multiple variations will be generated for each request`}),`\n`,_jsx(_components.li,{children:`You can control detail level with custom mode and instrumental settings`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`parameter-details`,children:`Parameter Details`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Always required: `,_jsx(_components.code,{children:`customMode`}),`, `,_jsx(_components.code,{children:`instrumental`}),`, `,_jsx(_components.code,{children:`model`})]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In Custom Mode (`,_jsx(_components.code,{children:`customMode: true`}),`):`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`title`}),` is optional, maximum 80 characters. Only available in this mode; not supported when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`prompt`}),` is optional; when provided, it is used strictly as lyrics and sung in the generated track. If `,_jsx(_components.code,{children:`lyrics`}),` is also provided, `,_jsx(_components.code,{children:`lyrics`}),` takes priority`]}),`\n`,_jsxs(_components.li,{children:[`At least one of `,_jsx(_components.code,{children:`style`}),`, `,_jsx(_components.code,{children:`lyrics`}),`, or `,_jsx(_components.code,{children:`negativeTags`}),` must be provided; generation is rejected if all are empty`]}),`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.code,{children:`instrumental: true`}),`: generate instrumental music (no vocals)`]}),`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.code,{children:`instrumental: false`}),`: use `,_jsx(_components.code,{children:`lyrics`}),` as lyrics (fall back to `,_jsx(_components.code,{children:`prompt`}),` if `,_jsx(_components.code,{children:`lyrics`}),` is not provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`negativeTags`}),`, `,_jsx(_components.code,{children:`vocalGender`}),`, and `,_jsx(_components.code,{children:`duration`}),` are available only in this mode. Do not pass them when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`})]}),`\n`,_jsxs(_components.li,{children:[`Optional: `,_jsx(_components.code,{children:`duration`}),` (10–360 seconds), `,_jsx(_components.code,{children:`negativeTags`}),` (V6 max 1000 characters), `,_jsx(_components.code,{children:`vocalGender`}),` (`,_jsx(_components.code,{children:`m`}),` / `,_jsx(_components.code,{children:`f`}),`), `,_jsx(_components.code,{children:`styleWeight`}),`, `,_jsx(_components.code,{children:`weirdnessConstraint`}),`, `,_jsx(_components.code,{children:`audioWeight`}),`, `,_jsx(_components.code,{children:`variety`}),`, `,_jsx(_components.code,{children:`personaId`}),`, `,_jsx(_components.code,{children:`personaModel`})]}),`\n`,_jsxs(_components.li,{children:[`Character limits by model:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V4 (Deprecated)`}),`: `,_jsx(_components.code,{children:`prompt`}),` 3000 characters, `,_jsx(_components.code,{children:`style`}),` 200 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V4_5, V4_5PLUS, V4_5ALL, V5, V5_5 (Deprecated)`}),`: `,_jsx(_components.code,{children:`prompt`}),` 5000 characters, `,_jsx(_components.code,{children:`style`}),` 1000 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V6, V6_MINI, V6_WILD`}),`: `,_jsx(_components.code,{children:`style`}),` 1000 characters; `,_jsx(_components.code,{children:`lyrics`}),` 5000 characters; `,_jsx(_components.code,{children:`negativeTags`}),` 1000 characters`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`title`}),` length limit: 80 characters (all models)`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In Non-custom Mode (`,_jsx(_components.code,{children:`customMode: false`}),`):`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`prompt`}),` is optional; it serves as the core idea, and lyrics are generated automatically (not a strict match), maximum 3000 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`lyrics`}),` can be used as a lyrics attachment together with `,_jsx(_components.code,{children:`prompt`})]}),`\n`,_jsxs(_components.li,{children:[`At least one of `,_jsx(_components.code,{children:`imageUrls`}),`, `,_jsx(_components.code,{children:`videoUrls`}),`, `,_jsx(_components.code,{children:`audioUrls`}),`, `,_jsx(_components.code,{children:`style`}),`, or `,_jsx(_components.code,{children:`lyrics`}),` must be provided; generation is rejected if all are empty`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`imageUrls`}),`, `,_jsx(_components.code,{children:`videoUrls`}),`, and `,_jsx(_components.code,{children:`audioUrls`}),` are only valid in this mode`]}),`\n`,_jsxs(_components.li,{children:[`Do not pass parameters that are only available in custom mode: `,_jsx(_components.code,{children:`title`}),`, `,_jsx(_components.code,{children:`negativeTags`}),`, `,_jsx(_components.code,{children:`duration`}),`, `,_jsx(_components.code,{children:`vocalGender`}),`, `,_jsx(_components.code,{children:`styleWeight`}),`, `,_jsx(_components.code,{children:`weirdnessConstraint`}),`, `,_jsx(_components.code,{children:`audioWeight`}),`, `,_jsx(_components.code,{children:`variety`})]}),`\n`,_jsxs(_components.li,{children:[`Total attachments must not exceed 10: `,_jsx(_components.code,{children:`style`}),` + `,_jsx(_components.code,{children:`lyrics`}),` + `,_jsx(_components.code,{children:`imageUrls`}),` + `,_jsx(_components.code,{children:`videoUrls`}),` + `,_jsx(_components.code,{children:`audioUrls`})]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`optional-parameters`,children:`Optional Parameters`}),`\n`,_jsxs(Note,{children:[_jsx(_components.p,{children:`The following fields are optional controls available for this endpoint:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`prompt`}),` (string): Description of the desired audio content. Optional. Used as lyrics in custom mode; used as the core idea in non-custom mode (maximum 3000 characters).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`lyrics`}),` (string): Lyrics content. Optional. V6 series maximum 5000 characters. In custom mode, takes priority over `,_jsx(_components.code,{children:`prompt`}),` as lyrics; in non-custom mode, can be used as a lyrics attachment together with `,_jsx(_components.code,{children:`prompt`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`imageUrls`}),` (array): Image references. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`}),`. Up to 5 images, each no more than 10 MB. Supported formats: jpeg, png, webp, bmp.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`videoUrls`}),` (array): Video references. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`}),`. Up to 1 file, each no more than 100 MB, duration no more than 241 seconds. Supported formats: mp4, mov, webm.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`audioUrls`}),` (array): Audio references. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`}),`. Duration must be between 6 seconds and 30 minutes; each file no more than 500 MB.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`style`}),` (string): Music style specification. See character limits in Parameter Details above.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`title`}),` (string): Track title. Optional. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. Maximum 80 characters. Displayed in player interfaces and filenames.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`negativeTags`}),` (string): Music styles or traits to exclude from the generated audio. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. For V6, V6_MINI, and V6_WILD: maximum 1000 characters.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`vocalGender`}),` (string): Vocal gender preference. `,_jsx(_components.code,{children:`m`}),` for male, `,_jsx(_components.code,{children:`f`}),` for female. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. In practice, this only increases probability and cannot guarantee the instruction is followed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`styleWeight`}),` (number): Strength of adherence to the specified style. Range 0–1, up to 2 decimal places. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`weirdnessConstraint`}),` (number): Creative/experimental deviation. Range 0–1, up to 2 decimal places. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`audioWeight`}),` (number): Relative weight of audio features. Range 0–1, up to 2 decimal places. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. Not supported when there are no vocals.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`variety`}),` (number): Diversity of generated results. Integer from 0–4, default 1. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. `,_jsx(_components.code,{children:`0`}),` off (exact style), `,_jsx(_components.code,{children:`1`}),` normal (default, balanced), `,_jsx(_components.code,{children:`2`}),` high (distinct styles), `,_jsx(_components.code,{children:`3`}),` extra (bold exploration), `,_jsx(_components.code,{children:`4`}),` max (maximum variation).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`personaId`}),` (string): Persona ID or Voice ID. Optional. To generate a Persona ID, see `,_jsx(_components.a,{href:`/suno-api/generate-persona`,children:`Generate Persona`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`personaModel`}),` (string): Persona model, `,_jsx(_components.code,{children:`style_persona`}),` or `,_jsx(_components.code,{children:`voice_persona`}),`. Only available for `,_jsx(_components.code,{children:`V5`}),` (Discontinued), `,_jsx(_components.code,{children:`V5_5`}),` (Discontinued), `,_jsx(_components.code,{children:`V6`}),`, `,_jsx(_components.code,{children:`V6_MINI`}),`, and `,_jsx(_components.code,{children:`V6_WILD`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`duration`}),` (number): Audio duration in seconds. Range 10–360, default 20. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`, and only valid when the model is `,_jsx(_components.code,{children:`V5_5`}),`, `,_jsx(_components.code,{children:`V6`}),`, `,_jsx(_components.code,{children:`V6_MINI`}),`, or `,_jsx(_components.code,{children:`V6_WILD`}),`.`]}),`\n`]})]}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`developer-notes`,children:`Developer Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Recommendation for new users: Start with `,_jsx(_components.code,{children:`customMode: false`}),` for simpler usage`]}),`\n`,_jsx(_components.li,{children:`Generated files are retained for 14 days`}),`\n`,_jsxs(_components.li,{children:[`Callback process has three stages: `,_jsx(_components.code,{children:`text`}),` (text generation), `,_jsx(_components.code,{children:`first`}),` (first track complete), `,_jsx(_components.code,{children:`complete`}),` (all tracks complete)`]}),`\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":"Generate Music","description":"Generate music with or without lyrics using AI models.","openapi":"suno-api/suno-api.json POST /api/v1/generate","href":"/suno-api/generate-music"}}},"mdxSourceWithNoJs":{"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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,RequestExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`model-versions`,children:`Model Versions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Current models`}),`: `,_jsx(_components.code,{children:`V6`}),` (default), `,_jsx(_components.code,{children:`V6_WILD`}),`, `,_jsx(_components.code,{children:`V6_MINI`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Deprecated models`}),`: `,_jsx(_components.code,{children:`V5_5`}),`, `,_jsx(_components.code,{children:`V5`}),`, `,_jsx(_components.code,{children:`V4_5PLUS`}),`, `,_jsx(_components.code,{children:`V4_5ALL`}),`, `,_jsx(_components.code,{children:`V4_5`}),`, `,_jsx(_components.code,{children:`V4`})]}),`\n`,_jsx(_components.li,{children:`Deprecated values remain available only for backward compatibility. New integrations should use a V6-series model.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`usage-guide`,children:`Usage Guide`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`This endpoint creates music based on your text prompt`}),`\n`,_jsx(_components.li,{children:`Multiple variations will be generated for each request`}),`\n`,_jsx(_components.li,{children:`You can control detail level with custom mode and instrumental settings`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`parameter-details`,children:`Parameter Details`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Always required: `,_jsx(_components.code,{children:`customMode`}),`, `,_jsx(_components.code,{children:`instrumental`}),`, `,_jsx(_components.code,{children:`model`})]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In Custom Mode (`,_jsx(_components.code,{children:`customMode: true`}),`):`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`title`}),` is optional, maximum 80 characters. Only available in this mode; not supported when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`prompt`}),` is optional; when provided, it is used strictly as lyrics and sung in the generated track. If `,_jsx(_components.code,{children:`lyrics`}),` is also provided, `,_jsx(_components.code,{children:`lyrics`}),` takes priority`]}),`\n`,_jsxs(_components.li,{children:[`At least one of `,_jsx(_components.code,{children:`style`}),`, `,_jsx(_components.code,{children:`lyrics`}),`, or `,_jsx(_components.code,{children:`negativeTags`}),` must be provided; generation is rejected if all are empty`]}),`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.code,{children:`instrumental: true`}),`: generate instrumental music (no vocals)`]}),`\n`,_jsxs(_components.li,{children:[`If `,_jsx(_components.code,{children:`instrumental: false`}),`: use `,_jsx(_components.code,{children:`lyrics`}),` as lyrics (fall back to `,_jsx(_components.code,{children:`prompt`}),` if `,_jsx(_components.code,{children:`lyrics`}),` is not provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`negativeTags`}),`, `,_jsx(_components.code,{children:`vocalGender`}),`, and `,_jsx(_components.code,{children:`duration`}),` are available only in this mode. Do not pass them when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`})]}),`\n`,_jsxs(_components.li,{children:[`Optional: `,_jsx(_components.code,{children:`duration`}),` (10–360 seconds), `,_jsx(_components.code,{children:`negativeTags`}),` (V6 max 1000 characters), `,_jsx(_components.code,{children:`vocalGender`}),` (`,_jsx(_components.code,{children:`m`}),` / `,_jsx(_components.code,{children:`f`}),`), `,_jsx(_components.code,{children:`styleWeight`}),`, `,_jsx(_components.code,{children:`weirdnessConstraint`}),`, `,_jsx(_components.code,{children:`audioWeight`}),`, `,_jsx(_components.code,{children:`variety`}),`, `,_jsx(_components.code,{children:`personaId`}),`, `,_jsx(_components.code,{children:`personaModel`})]}),`\n`,_jsxs(_components.li,{children:[`Character limits by model:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V4 (Deprecated)`}),`: `,_jsx(_components.code,{children:`prompt`}),` 3000 characters, `,_jsx(_components.code,{children:`style`}),` 200 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V4_5, V4_5PLUS, V4_5ALL, V5, V5_5 (Deprecated)`}),`: `,_jsx(_components.code,{children:`prompt`}),` 5000 characters, `,_jsx(_components.code,{children:`style`}),` 1000 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V6, V6_MINI, V6_WILD`}),`: `,_jsx(_components.code,{children:`style`}),` 1000 characters; `,_jsx(_components.code,{children:`lyrics`}),` 5000 characters; `,_jsx(_components.code,{children:`negativeTags`}),` 1000 characters`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`title`}),` length limit: 80 characters (all models)`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In Non-custom Mode (`,_jsx(_components.code,{children:`customMode: false`}),`):`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`prompt`}),` is optional; it serves as the core idea, and lyrics are generated automatically (not a strict match), maximum 3000 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`lyrics`}),` can be used as a lyrics attachment together with `,_jsx(_components.code,{children:`prompt`})]}),`\n`,_jsxs(_components.li,{children:[`At least one of `,_jsx(_components.code,{children:`imageUrls`}),`, `,_jsx(_components.code,{children:`videoUrls`}),`, `,_jsx(_components.code,{children:`audioUrls`}),`, `,_jsx(_components.code,{children:`style`}),`, or `,_jsx(_components.code,{children:`lyrics`}),` must be provided; generation is rejected if all are empty`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`imageUrls`}),`, `,_jsx(_components.code,{children:`videoUrls`}),`, and `,_jsx(_components.code,{children:`audioUrls`}),` are only valid in this mode`]}),`\n`,_jsxs(_components.li,{children:[`Do not pass parameters that are only available in custom mode: `,_jsx(_components.code,{children:`title`}),`, `,_jsx(_components.code,{children:`negativeTags`}),`, `,_jsx(_components.code,{children:`duration`}),`, `,_jsx(_components.code,{children:`vocalGender`}),`, `,_jsx(_components.code,{children:`styleWeight`}),`, `,_jsx(_components.code,{children:`weirdnessConstraint`}),`, `,_jsx(_components.code,{children:`audioWeight`}),`, `,_jsx(_components.code,{children:`variety`})]}),`\n`,_jsxs(_components.li,{children:[`Total attachments must not exceed 10: `,_jsx(_components.code,{children:`style`}),` + `,_jsx(_components.code,{children:`lyrics`}),` + `,_jsx(_components.code,{children:`imageUrls`}),` + `,_jsx(_components.code,{children:`videoUrls`}),` + `,_jsx(_components.code,{children:`audioUrls`})]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`optional-parameters`,children:`Optional Parameters`}),`\n`,_jsxs(Note,{children:[_jsx(_components.p,{children:`The following fields are optional controls available for this endpoint:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`prompt`}),` (string): Description of the desired audio content. Optional. Used as lyrics in custom mode; used as the core idea in non-custom mode (maximum 3000 characters).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`lyrics`}),` (string): Lyrics content. Optional. V6 series maximum 5000 characters. In custom mode, takes priority over `,_jsx(_components.code,{children:`prompt`}),` as lyrics; in non-custom mode, can be used as a lyrics attachment together with `,_jsx(_components.code,{children:`prompt`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`imageUrls`}),` (array): Image references. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`}),`. Up to 5 images, each no more than 10 MB. Supported formats: jpeg, png, webp, bmp.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`videoUrls`}),` (array): Video references. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`}),`. Up to 1 file, each no more than 100 MB, duration no more than 241 seconds. Supported formats: mp4, mov, webm.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`audioUrls`}),` (array): Audio references. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`false`}),`. Duration must be between 6 seconds and 30 minutes; each file no more than 500 MB.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`style`}),` (string): Music style specification. See character limits in Parameter Details above.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`title`}),` (string): Track title. Optional. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. Maximum 80 characters. Displayed in player interfaces and filenames.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`negativeTags`}),` (string): Music styles or traits to exclude from the generated audio. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. For V6, V6_MINI, and V6_WILD: maximum 1000 characters.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`vocalGender`}),` (string): Vocal gender preference. `,_jsx(_components.code,{children:`m`}),` for male, `,_jsx(_components.code,{children:`f`}),` for female. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. In practice, this only increases probability and cannot guarantee the instruction is followed.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`styleWeight`}),` (number): Strength of adherence to the specified style. Range 0–1, up to 2 decimal places. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`weirdnessConstraint`}),` (number): Creative/experimental deviation. Range 0–1, up to 2 decimal places. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`audioWeight`}),` (number): Relative weight of audio features. Range 0–1, up to 2 decimal places. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. Not supported when there are no vocals.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`variety`}),` (number): Diversity of generated results. Integer from 0–4, default 1. Only effective when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`. `,_jsx(_components.code,{children:`0`}),` off (exact style), `,_jsx(_components.code,{children:`1`}),` normal (default, balanced), `,_jsx(_components.code,{children:`2`}),` high (distinct styles), `,_jsx(_components.code,{children:`3`}),` extra (bold exploration), `,_jsx(_components.code,{children:`4`}),` max (maximum variation).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`personaId`}),` (string): Persona ID or Voice ID. Optional. To generate a Persona ID, see `,_jsx(_components.a,{href:`/suno-api/generate-persona`,children:`Generate Persona`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`personaModel`}),` (string): Persona model, `,_jsx(_components.code,{children:`style_persona`}),` or `,_jsx(_components.code,{children:`voice_persona`}),`. Only available for `,_jsx(_components.code,{children:`V5`}),` (Discontinued), `,_jsx(_components.code,{children:`V5_5`}),` (Discontinued), `,_jsx(_components.code,{children:`V6`}),`, `,_jsx(_components.code,{children:`V6_MINI`}),`, and `,_jsx(_components.code,{children:`V6_WILD`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(`b`,{children:`duration`}),` (number): Audio duration in seconds. Range 10–360, default 20. Only available when `,_jsx(_components.code,{children:`customMode`}),` is `,_jsx(_components.code,{children:`true`}),`, and only valid when the model is `,_jsx(_components.code,{children:`V5_5`}),`, `,_jsx(_components.code,{children:`V6`}),`, `,_jsx(_components.code,{children:`V6_MINI`}),`, or `,_jsx(_components.code,{children:`V6_WILD`}),`.`]}),`\n`]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Non-custom mode`,numberOfLines:`18`,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:`18`,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:` \"customMode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"instrumental\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A chill lo-fi beat with soft vocals\"`}),_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:` \"lyrics\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[Verse] Night city lights shining bright\"`}),_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:` \"style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lo-fi, chill\"`}),_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:` \"imageUrls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/reference-image.png\"`})}),`\n`,_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:` \"videoUrls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/reference-video.mp4\"`})}),`\n`,_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:` \"audioUrls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/reference-audio.mp3\"`})}),`\n`,_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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"V6\"`}),_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:` \"callBackUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/callback\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Custom mode`,numberOfLines:`17`,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:`17`,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:` \"customMode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_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:` \"instrumental\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Peaceful Piano Meditation\"`}),_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:` \"style\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Classical\"`}),_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:` \"lyrics\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[Verse] Night city lights shining bright\"`}),_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:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A calm and relaxing piano track with soft melodies\"`}),_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:` \"negativeTags\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Heavy Metal, Upbeat Drums\"`}),_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:` \"vocalGender\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"m\"`}),_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:` \"styleWeight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.65`}),_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:` \"weirdnessConstraint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.65`}),_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:` \"audioWeight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.65`}),_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:` \"variety\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"V6\"`}),_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:` \"callBackUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/callback\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`developer-notes`,children:`Developer Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Recommendation for new users: Start with `,_jsx(_components.code,{children:`customMode: false`}),` for simpler usage`]}),`\n`,_jsx(_components.li,{children:`Generated files are retained for 14 days`}),`\n`,_jsxs(_components.li,{children:[`Callback process has three stages: `,_jsx(_components.code,{children:`text`}),` (text generation), `,_jsx(_components.code,{children:`first`}),` (first track complete), `,_jsx(_components.code,{children:`complete`}),` (all tracks complete)`]}),`\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":"Generate Music","description":"Generate music with or without lyrics using AI models.","openapi":"suno-api/suno-api.json POST /api/v1/generate","href":"/suno-api/generate-music"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Model Versions","slug":"model-versions","depth":3,"children":[]},{"title":"Usage Guide","slug":"usage-guide","depth":3,"children":[]},{"title":"Parameter Details","slug":"parameter-details","depth":3,"children":[]},{"title":"Optional Parameters","slug":"optional-parameters","depth":3,"children":[]},{"title":"Developer Notes","slug":"developer-notes","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Non-custom mode","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customMode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"instrumental\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"A chill lo-fi beat with soft vocals\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"lyrics\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"[Verse] Night city lights shining bright\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"style\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"lo-fi, chill\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"imageUrls\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://example.com/reference-image.png\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"videoUrls\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://example.com/reference-video.mp4\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"audioUrls\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://example.com/reference-audio.mp3\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"V6\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"callBackUrl\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://example.com/callback\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Custom mode","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customMode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"instrumental\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"title\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Peaceful Piano Meditation\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"style\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Classical\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"lyrics\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"[Verse] Night city lights shining bright\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"A calm and relaxing piano track with soft melodies\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"negativeTags\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Heavy Metal, Upbeat Drums\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"vocalGender\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"m\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"styleWeight\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.65\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"weirdnessConstraint\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.65\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"audioWeight\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.65\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"variety\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"duration\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">20\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"V6\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"callBackUrl\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://example.com/callback\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"generate-music","summary":"Generate Music","description":"Generate music with or without lyrics using AI models.","requestBody":"8df4603f-8a00-441c-a8ab-ee0981b0b8b8","responses":{"200":"a7466a31-3d43-472d-bbc3-e2a6a5585a7b","500":"311b3ceb-5d0e-4d66-abfb-a1e202416346"},"callbacks":{"audioGenerated":"c6dca1fa-570e-49b5-9a28-e17973de24be"},"method":"post","type":"path","servers":["70e1645d-2722-4ecd-9381-477ef0fe62c3"],"security":["6d3fe124-63a0-4ab3-9da2-de439119be05"],"path":"/api/v1/generate","baseUrlOptions":["https://apibox.erweima.ai"],"title":"Generate Music","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"18","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"customMode\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"instrumental\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"prompt\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"A chill lo-fi beat with soft vocals\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"lyrics\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"[Verse] Night city lights shining bright\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"style\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"lo-fi, chill\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"imageUrls\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"https://example.com/reference-image.png\""}}}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ],"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"videoUrls\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"https://example.com/reference-video.mp4\""}}}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ],"}}}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"audioUrls\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"https://example.com/reference-audio.mp3\""}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ],"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"model\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"V6\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"callBackUrl\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"https://example.com/callback\""}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"Non-custom mode"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"17","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"customMode\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"instrumental\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"title\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Peaceful Piano Meditation\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"style\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Classical\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"lyrics\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"[Verse] Night city lights shining bright\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"prompt\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"A calm and relaxing piano track with soft melodies\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"negativeTags\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Heavy Metal, Upbeat Drums\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"vocalGender\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"m\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"styleWeight\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0.65"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"weirdnessConstraint\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0.65"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"audioWeight\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"0.65"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"variety\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"1"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"duration\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"20"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"model\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"V6\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"callBackUrl\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"https://example.com/callback\""}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"Custom mode"}],"requestExampleType":"mdx","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customMode","instrumental","callBackUrl","model"],"properties":{"customMode":{"type":"boolean","description":"Determines whether advanced parameter customization is enabled.\n- If `true`: Allows detailed control\n- If `false`: Simplified mode","example":true,"isRequired":true,"uniqueKey":"customMode","typeLabel":"boolean"},"instrumental":{"type":"boolean","description":"Determines whether the audio should be instrumental (no lyrics).\n- In Custom Mode (`customMode: true`):\n - If `true`: generate instrumental music (no vocals)\n - If `false`: use `lyrics` as lyrics (fall back to `prompt` if `lyrics` is not provided)\n- In Non-custom Mode (`customMode: false`):\n - If `true`: generate instrumental music (no vocals)\n - If `false`: `lyrics` can be used as a lyrics attachment together with the audio description in `prompt`","example":true,"isRequired":true,"uniqueKey":"instrumental","typeLabel":"boolean"},"model":{"type":"string","description":"The AI model version to use for generation. Required for all requests. Default: `V6`. Available options:\n- **`V6_WILD`**: Pushes creative boundaries for bolder, more distinctive musical expression.\n- **`V6_MINI`**: Lightweight and fast, balancing quality and speed for effortless creation.\n- **`V6`**: Greater musical expression with more natural vocals and richer details. Recommended default.\n- **`V5_5` (Discontinued)**: Custom models tailored to your unique taste.\n- **`V5` (Discontinued)**: Superior musical expression, faster generation.\n- **`V4_5PLUS` (Discontinued)**: V4.5+ delivers richer sound, new ways to create, max 8 min.\n- **`V4_5` (Discontinued)**: V4.5 enables smarter prompts, faster generations, max 8 min.\n- **`V4_5ALL` (Discontinued)**: V4.5ALL enables smarter prompts, faster generations, max 8 min.\n- **`V4` (Discontinued)**: V4 improves vocal quality, max 4 min.\nDiscontinued values remain listed only for backward compatibility; use a V6-series model for new integrations.","enum":["V6","V6_WILD","V6_MINI","V5_5","V5","V4_5PLUS","V4_5ALL","V4_5","V4"],"example":"V6","default":"V6","isRequired":true,"uniqueKey":"model","typeLabel":"enum\u003cstring>"},"callBackUrl":{"type":"string","format":"uri","description":"The URL to receive task completion notifications when music generation is complete. The callback process has three stages: `text` (text generation), `first` (first track complete), `complete` (all tracks complete). Note: In some cases, `text` and `first` stages may be skipped, directly returning `complete`.\n- For detailed callback format and implementation guide, see [Music Generation Callbacks](https://docs.sunoapi.org/suno-api/generate-music-callbacks)\n- Alternatively, you can use the Get Music Generation Details interface to poll task status","example":"https://api.example.com/callback","isRequired":true,"uniqueKey":"callBackUrl","typeLabel":"string\u003curi>"},"prompt":{"type":"string","description":"A description of the desired audio content. Optional.\n- Custom mode (`customMode=true`): When provided, the prompt is used strictly as lyrics and sung in the generated track. If `lyrics` is also provided, `lyrics` takes priority. Character limits by model:\n - **V4 (Discontinued)**: Maximum 3000 characters\n - **V4_5, V4_5PLUS, V4_5ALL, V5_5, V5 (Discontinued)**: Maximum 5000 characters\n- Non-custom mode (`customMode=false`): When provided, the prompt serves as the core idea. Lyrics are generated automatically based on it and do not strictly match the input. Maximum 3000 characters.\n`prompt` is not required. In non-custom mode, provide at least one of `imageUrls`, `videoUrls`, `audioUrls`, `style`, or `lyrics`. In custom mode, provide at least one of `style`, `lyrics`, or `negativeTags`. Generation is rejected if all related inputs are empty.","example":"A calm and relaxing piano track with soft melodies","uniqueKey":"prompt","typeLabel":"string"},"lyrics":{"type":"string","description":"Lyrics for the generated audio. Optional.\n- **V6, V6_MINI, V6_WILD**: Maximum 5000 characters.\n- When `customMode=true`, `lyrics` is used as lyrics first; if `lyrics` is not provided, `prompt` is used as lyrics.\n- When `customMode=false`, `lyrics` is used as a lyrics attachment and can be used together with the audio description in `prompt`.","example":"[Verse] Night city lights shining bright","uniqueKey":"lyrics","typeLabel":"string"},"imageUrls":{"type":"array","description":"Image references. Only effective when `customMode=false`.\n- Optional\n- Up to 5 images; each image must not exceed 10 MB\n- Supported formats: `jpeg`, `png`, `webp`, and `bmp`\n- In non-custom mode, total attachments must not exceed 10: `style` + `lyrics` + `imageUrls` + `videoUrls` + `audioUrls`","items":{"type":"string","uniqueKey":"imageUrls.items.[INDEX]","typeLabel":"string"},"maxItems":5,"example":["https://example.com/reference-image.png"],"uniqueKey":"imageUrls","typeLabel":"string[]"},"videoUrls":{"type":"array","description":"Video references. Only effective when `customMode=false`.\n- Optional\n- Up to 1 video file; each file must not exceed 100 MB, duration must not exceed 241 seconds, with no minimum duration\n- Supported formats: mp4, mov, and webm","items":{"type":"string","uniqueKey":"videoUrls.items.[INDEX]","typeLabel":"string"},"maxItems":1,"example":["https://example.com/reference-video.mp4"],"uniqueKey":"videoUrls","typeLabel":"string[]"},"audioUrls":{"type":"array","description":"Audio references. Only effective when `customMode=false`.\n- Optional\n- Audio duration must be between 6 seconds and 30 minutes; each audio file must not exceed 500 MB","items":{"type":"string","uniqueKey":"audioUrls.items.[INDEX]","typeLabel":"string"},"example":["https://example.com/reference-audio.mp3"],"uniqueKey":"audioUrls","typeLabel":"string[]"},"style":{"type":"string","description":"Music style specification for the generated audio.\n- Character limits by model:\n - **V4 (Discontinued)**: Maximum 200 characters\n - **V4_5 and V4_5PLUS (Discontinued)**: Maximum 1000 characters\n - **V4_5ALL (Discontinued)**: Maximum 1000 characters\n - **V5_5 and V5 (Discontinued)**: Maximum 1000 characters\n - **V6, V6_MINI, and V6_WILD**: Maximum 1000 characters\n- Common examples: Jazz, Classical, Electronic, Pop, Rock, Hip-hop, etc.\n- In custom mode, provide at least one of `style`, `lyrics`, or `negativeTags`. In non-custom mode, provide at least one of `imageUrls`, `videoUrls`, `audioUrls`, `style`, or `lyrics`.","example":"Classical","uniqueKey":"style","typeLabel":"string"},"title":{"type":"string","description":"Title for the generated music track. Optional.\n- Only available when `customMode` is `true`. Not supported when `customMode` is `false`.\n- Maximum 80 characters.\n- Displayed in player interfaces and filenames.","maxLength":80,"example":"Peaceful Piano Meditation","uniqueKey":"title","typeLabel":"string"},"negativeTags":{"type":"string","description":"Music styles or traits to exclude from the generated audio. Optional.\n- Only available when `customMode` is `true`. Do not pass this field when `customMode` is `false`.\n- For V6, V6_MINI, and V6_WILD: maximum 1000 characters.\n- In custom mode, provide at least one of `style`, `lyrics`, or `negativeTags`.","maxLength":1000,"example":"Heavy Metal, Upbeat Drums","uniqueKey":"negativeTags","typeLabel":"string"},"vocalGender":{"type":"string","description":"Vocal gender preference. Optional.\n- Only available when `customMode` is `true`. Do not pass this field when `customMode` is `false`.\n- Use `m` for male and `f` for female.\n- In practice, this only increases probability and cannot guarantee male/female voice instructions are followed.","enum":["m","f"],"example":"m","uniqueKey":"vocalGender","typeLabel":"enum\u003cstring>"},"styleWeight":{"type":"number","description":"Only available when Custom Mode (`customMode: true`) is enabled. Strength of adherence to the specified style. Optional. Range 0–1, up to 2 decimal places.","minimum":0,"maximum":1,"multipleOf":0.01,"example":0.65,"uniqueKey":"styleWeight","typeLabel":"number"},"weirdnessConstraint":{"type":"number","description":"Only available when Custom Mode (`customMode: true`) is enabled. Controls experimental/creative deviation. Optional. Range 0–1, up to 2 decimal places.","minimum":0,"maximum":1,"multipleOf":0.01,"example":0.65,"uniqueKey":"weirdnessConstraint","typeLabel":"number"},"audioWeight":{"type":"number","description":"Only available when Custom Mode (`customMode: true`) is enabled. Relative weight of audio features. Optional. Range 0–1, up to 2 decimal places.\n- `audioWeight` is not supported when there are no vocals","minimum":0,"maximum":1,"multipleOf":0.01,"example":0.65,"uniqueKey":"audioWeight","typeLabel":"number"},"variety":{"type":"number","description":"Only available when Custom Mode (`customMode: true`) is enabled. Controls the diversity and stylistic variation of generated results. Optional. Range 0–4, integer, default 1.\n\n- **`0`**: off (exact style) — fully off, strictly the same style\n- **`1`**: normal (balanced variety) — default, balances stability and diversity\n- **`2`**: high (distinct styles) — produces results with clearly different styles\n- **`3`**: extra (bold exploration) — higher variation, encourages bold exploration of different styles\n- **`4`**: max (unreasonably varied) — maximum diversity; results may differ in style very significantly","minimum":0,"maximum":4,"multipleOf":1,"default":1,"example":1,"uniqueKey":"variety","typeLabel":"number"},"personaId":{"type":"string","description":"Persona ID or Voice ID to apply to the generated music. Optional. Use this to apply a specific persona style to your music generation.\n\nTo generate a Persona ID, use the [Generate Persona](https://docs.sunoapi.org/suno-api/generate-persona) endpoint to create a personalized music Persona based on generated music.\n\nTo generate a Voice ID, use the [Generate Voice](https://docs.sunoapi.org/suno-api/suno-voice-generate) endpoint. When using a Voice-generated ID, you must set `personaModel: voice_persona`.","example":"persona_123","uniqueKey":"personaId","typeLabel":"string"},"personaModel":{"type":"string","description":"Persona model. Optional `style_persona` or `voice_persona`. Only available for `V5` (Discontinued), `V5_5` (Discontinued), `V6`, `V6_MINI`, and `V6_WILD`.\n- `style_persona` (default): Use this for Persona IDs generated by the Generate Persona endpoint.\n- `voice_persona`: Required when `personaId` is a `voiceId` generated by Suno Voice.","enum":["style_persona","voice_persona"],"default":"style_persona","example":"style_persona","uniqueKey":"personaModel","typeLabel":"enum\u003cstring>"},"duration":{"type":"number","description":"Audio duration in seconds. Optional.\n- Only available when `customMode` is `true`. Do not pass this field when `customMode` is `false`.\n- Range: 10–360 seconds. Default: 20.\n- Only valid when the model is `V5_5` (Discontinued), `V6`, `V6_MINI`, or `V6_WILD`.","minimum":10,"maximum":360,"default":20,"example":20,"uniqueKey":"duration","typeLabel":"number"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"customMode":true,"instrumental":true,"model":"V6","callBackUrl":"https://api.example.com/callback","prompt":"A calm and relaxing piano track with soft melodies","lyrics":"[Verse] Night city lights shining bright","imageUrls":["https://example.com/reference-image.png"],"videoUrls":["https://example.com/reference-video.mp4"],"audioUrls":["https://example.com/reference-audio.mp3"],"style":"Classical","title":"Peaceful Piano Meditation","negativeTags":"Heavy Metal, Upbeat Drums","vocalGender":"m","styleWeight":0.65,"weirdnessConstraint":0.65,"audioWeight":0.65,"variety":1,"personaId":"persona_123","personaModel":"style_persona","duration":20}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a7466a31-3d43-472d-bbc3-e2a6a5585a7b":{"description":"Request successful","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"# Status Codes\n\n- ✅ 200 - Request successful\n- ⚠️ 400 - Invalid parameters\n- ⚠️ 401 - Unauthorized access\n- ⚠️ 404 - Invalid request method or path\n- ⚠️ 405 - Rate limit exceeded\n- ⚠️ 413 - Theme or prompt too long\n- ⚠️ 429 - Insufficient credits\n- ⚠️ 430 - Your call frequency is too high. Please try again later.\n- ⚠️ 455 - System maintenance\n- ❌ 500 - Server error","example":200,"enum":[200,400,401,404,405,413,429,430,455,500],"uniqueKey":"code","typeLabel":"enum\u003cinteger>"},"msg":{"type":"string","description":"Error message when code != 200","example":"success","uniqueKey":"msg","typeLabel":"string"},"data":{"type":"object","properties":{"taskId":{"type":"string","description":"Task ID for tracking task status","example":"5c79****be8e","uniqueKey":"data.taskId","typeLabel":"string"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":200,"msg":"success","data":{"taskId":"5c79****be8e"}}}},"exampleType":"generated"}},"exampleType":"generated"},"311b3ceb-5d0e-4d66-abfb-a1e202416346":{"description":"Server error","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"callbacks":[{"callbackName":"audioGenerated","expression":"{request.body#/callBackUrl}","method":"post","resolved":{"operation":{"description":"System will call this callback when audio generation is complete.\n\n### Callback Example\n```json\n{\n \"code\": 200,\n \"msg\": \"All generated successfully.\",\n \"data\": {\n \"callbackType\": \"complete\",\n \"task_id\": \"2fac****9f72\",\n \"data\": [\n {\n \"id\": \"8551****662c\",\n \"audio_url\": \"https://example.cn/****.mp3\",\n \"source_audio_url\": \"https://example.cn/****.mp3\",\n \"stream_audio_url\": \"https://example.cn/****\",\n \"source_stream_audio_url\": \"https://example.cn/****\",\n \"image_url\": \"https://example.cn/****.jpeg\",\n \"source_image_url\": \"https://example.cn/****.jpeg\",\n \"prompt\": \"[Verse] Night city lights shining bright\",\n \"model_name\": \"chirp-v3-5\",\n \"title\": \"Iron Man\",\n \"tags\": \"electrifying, rock\",\n \"createTime\": \"2025-01-01 00:00:00\",\n \"duration\": 198.44\n },\n {\n \"id\": \"bd15****1873\",\n \"audio_url\": \"https://example.cn/****.mp3\",\n \"source_audio_url\": \"https://example.cn/****.mp3\",\n \"stream_audio_url\": \"https://example.cn/****\",\n \"source_stream_audio_url\": \"https://example.cn/****\",\n \"image_url\": \"https://example.cn/****.jpeg\",\n \"source_image_url\": \"https://example.cn/****.jpeg\",\n \"prompt\": \"[Verse] Night city lights shining bright\",\n \"model_name\": \"chirp-v3-5\",\n \"title\": \"Iron Man\",\n \"tags\": \"electrifying, rock\",\n \"createTime\": \"2025-01-01 00:00:00\",\n \"duration\": 228.28\n }\n ]\n }\n}\n```","requestBody":"48622610-40d9-4127-b513-39acca2ea7a2","responses":{"200":"5947dd59-02be-450c-92ad-97f1c154a84d"},"method":"post","type":"path"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Status code","example":200,"uniqueKey":"code","typeLabel":"integer"},"msg":{"type":"string","description":"Response message","example":"All generated successfully","uniqueKey":"msg","typeLabel":"string"},"data":{"type":"object","properties":{"callbackType":{"type":"string","description":"Callback type: text (text generation complete), first (first track complete), complete (all tracks complete)","enum":["text","first","complete"],"uniqueKey":"data.callbackType","typeLabel":"enum\u003cstring>"},"task_id":{"type":"string","description":"Task ID","uniqueKey":"data.task_id","typeLabel":"string"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Audio unique identifier (audioId)","uniqueKey":"data.data.items.[INDEX].id","typeLabel":"string"},"audio_url":{"type":"string","description":"Audio file URL","uniqueKey":"data.data.items.[INDEX].audio_url","typeLabel":"string"},"source_audio_url":{"type":"string","description":"(Deprecated) Original audio file URL","deprecated":true,"uniqueKey":"data.data.items.[INDEX].source_audio_url","typeLabel":"string"},"stream_audio_url":{"type":"string","description":"Streaming audio URL","uniqueKey":"data.data.items.[INDEX].stream_audio_url","typeLabel":"string"},"source_stream_audio_url":{"type":"string","description":"Original streaming audio URL","uniqueKey":"data.data.items.[INDEX].source_stream_audio_url","typeLabel":"string"},"image_url":{"type":"string","description":"Cover image URL","uniqueKey":"data.data.items.[INDEX].image_url","typeLabel":"string"},"source_image_url":{"type":"string","description":"Original cover image URL","uniqueKey":"data.data.items.[INDEX].source_image_url","typeLabel":"string"},"prompt":{"type":"string","description":"Generation prompt/lyrics","uniqueKey":"data.data.items.[INDEX].prompt","typeLabel":"string"},"model_name":{"type":"string","description":"Model name used","uniqueKey":"data.data.items.[INDEX].model_name","typeLabel":"string"},"title":{"type":"string","description":"Music title","uniqueKey":"data.data.items.[INDEX].title","typeLabel":"string"},"tags":{"type":"string","description":"Music tags","uniqueKey":"data.data.items.[INDEX].tags","typeLabel":"string"},"createTime":{"type":"string","description":"Creation time","format":"date-time","uniqueKey":"data.data.items.[INDEX].createTime","typeLabel":"string\u003cdate-time>"},"duration":{"type":"number","description":"Audio duration (seconds)","uniqueKey":"data.data.items.[INDEX].duration","typeLabel":"number"}},"uniqueKey":"data.data.items.[INDEX]","typeLabel":"object"},"uniqueKey":"data.data","typeLabel":"object[]"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":200,"msg":"All generated successfully","data":{"task_id":"\u003cstring>","data":[{"id":"\u003cstring>","audio_url":"\u003cstring>","source_audio_url":"\u003cstring>","stream_audio_url":"\u003cstring>","source_stream_audio_url":"\u003cstring>","image_url":"\u003cstring>","source_image_url":"\u003cstring>","prompt":"\u003cstring>","model_name":"\u003cstring>","title":"\u003cstring>","tags":"\u003cstring>","createTime":"2023-11-07T05:31:56Z","duration":123}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5947dd59-02be-450c-92ad-97f1c154a84d":{"description":"Callback received successfully","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{}}}}],"security":{"6d3fe124-63a0-4ab3-9da2-de439119be05":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"# 🔑 API Authentication\n\nAll endpoints require authentication using Bearer Token.\n\n## Get API Key\n\n1. Visit the [API Key Management Page](https://api.box/api-key) to obtain your API Key\n\n## Usage\n\nAdd to request headers:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n> **⚠️ Note:**\n> - Keep your API Key secure and do not share it with others\n> - If you suspect your API Key has been compromised, reset it immediately from the management page","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"70e1645d-2722-4ecd-9381-477ef0fe62c3":{"url":"https://apibox.erweima.ai","description":"API Server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"# 🔑 API Authentication\n\nAll endpoints require authentication using Bearer Token.\n\n## Get API Key\n\n1. Visit the [API Key Management Page](https://api.box/api-key) to obtain your API Key\n\n## Usage\n\nAdd to request headers:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n> **⚠️ Note:**\n> - Keep your API Key secure and do not share it with others\n> - If you suspect your API Key has been compromised, reset it immediately from the management page","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"# 🔑 API Authentication\n\nAll endpoints require authentication using Bearer Token.\n\n## Get API Key\n\n1. Visit the [API Key Management Page](https://api.box/api-key) to obtain your API Key\n\n## Usage\n\nAdd to request headers:\n\n```\nAuthorization: Bearer YOUR_API_KEY\n```\n\n> **⚠️ Note:**\n> - Keep your API Key secure and do not share it with others\n> - If you suspect your API Key has been compromised, reset it immediately from the management page","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"suno-api/suno-api.json"},"subdomain":"sunoapiorg","siteName":"Suno API","title":"Generate Music - Suno API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/suno-api/generate-music","matchLevel":0},"cn":{"href":"/cn/suno-api/generate-music","matchLevel":1}}},"lastModified":"2026-09-22T10:35:25.581Z","originalFileLocation":"suno-api/generate-music.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=\"Generate music with or without lyrics using AI models.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Suno 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/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_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/sunoapiorg/7RhG6CqzEntbwSqF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Music - Suno API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate music with or without lyrics using AI models.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Suno API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.sunoapi.org/suno-api/generate-music\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sunoapiorg.mintlify.app/_mintlify/api/og/v2?division=Generate+Music\u0026amp;title=Generate+Music\u0026amp;description=Generate+music+with+or+without+lyrics+using+AI+models.\u0026amp;theme=7214e24e72b6f445c84b99ff\u0026amp;signature=b508b37de70ca465b411ae5dfa73e0d5838b8c0a38ebb0c525f8cae6c02d82c6\">\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=\"Generate Music - Suno API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate music with or without lyrics using AI models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sunoapiorg.mintlify.app/_mintlify/api/og/v2?division=Generate+Music\u0026amp;title=Generate+Music\u0026amp;description=Generate+music+with+or+without+lyrics+using+AI+models.\u0026amp;theme=7214e24e72b6f445c84b99ff\u0026amp;signature=b508b37de70ca465b411ae5dfa73e0d5838b8c0a38ebb0c525f8cae6c02d82c6\">\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/sunoapiorg/7RhG6CqzEntbwSqF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Suno API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.sunoapi.org/suno-api/generate-music\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/suno-api/generate-music.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.sunoapi.org/suno-api/generate-music\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.sunoapi.org/cn/suno-api/generate-music\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.sunoapi.org/suno-api/generate-music\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.sunoapi.org/#organization\",\"name\":\"Suno API\",\"url\":\"https://docs.sunoapi.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://sunoapi.org/logo.png\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.sunoapi.org#website\",\"name\":\"Suno API\",\"url\":\"https://docs.sunoapi.org\",\"publisher\":{\"@id\":\"https://docs.sunoapi.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.sunoapi.org/suno-api/generate-music#webpage\",\"url\":\"https://docs.sunoapi.org/suno-api/generate-music\",\"name\":\"Generate Music\",\"description\":\"Generate music with or without lyrics using AI models.\",\"dateModified\":\"2026-09-22T10:35:25.581Z\",\"isPartOf\":{\"@id\":\"https://docs.sunoapi.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.sunoapi.org/suno-api/generate-music#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.sunoapi.org/suno-api/generate-music#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Suno API\",\"item\":\"https://docs.sunoapi.org\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Music\",\"item\":\"https://docs.sunoapi.org/suno-api/generate-music\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.sunoapi.org/suno-api/generate-music#apireference\",\"headline\":\"Generate Music\",\"name\":\"Generate Music\",\"description\":\"Generate music with or without lyrics using AI models.\",\"url\":\"https://docs.sunoapi.org/suno-api/generate-music\",\"mainEntityOfPage\":{\"@id\":\"https://docs.sunoapi.org/suno-api/generate-music#webpage\"},\"dateModified\":\"2026-09-22T10:35:25.581Z\",\"publisher\":{\"@id\":\"https://docs.sunoapi.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.sunoapi.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Suno API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Suno API","nav":{"global":{"anchors":[{"anchor":"Home","icon":"house","href":"https://sunoapi.org/"},{"anchor":"Old Docs","icon":"book-open-cover","href":"https://old-docs.sunoapi.org/"}]},"languages":[{"language":"en","pages":[{"title":"Suno API Documentation","icon":"music","href":""},{"title":"Suno API Quick Start","description":"Get started with Suno API in minutes to generate high-quality AI music, lyrics, and audio processing","icon":"rocket","href":"/suno-api/quickstart"},{"group":"Generate Music","pages":[{"title":"Generate Music","openapi":"suno-api/suno-api.json POST /api/v1/generate","href":"/suno-api/generate-music"},{"title":"Music Generation Callbacks","description":"When music generation tasks are completed, the system will send results to your provided callback URL via POST request","href":"/suno-api/generate-music-callbacks"},{"title":"Extend Music","openapi":"suno-api/suno-api.json POST /api/v1/generate/extend","href":"/suno-api/extend-music"},{"title":"Music Extension Callbacks","href":"/suno-api/extend-music-callbacks"},{"title":"Upload And Cover Audio","openapi":"suno-api/suno-api.json POST /api/v1/generate/upload-cover","href":"/suno-api/upload-and-cover-audio"},{"title":"Upload and Cover Audio Callbacks","href":"/suno-api/upload-and-cover-audio-callbacks"},{"title":"Upload And Extend Audio","openapi":"suno-api/suno-api.json POST /api/v1/generate/upload-extend","href":"/suno-api/upload-and-extend-audio"},{"title":"Upload and Extend Audio Callbacks","href":"/suno-api/upload-and-extend-audio-callbacks"},{"title":"Add Instrumental","openapi":"suno-api/suno-api.json POST /api/v1/generate/add-instrumental","href":"/suno-api/add-instrumental"},{"title":"Add Instrumental Callbacks","href":"/suno-api/add-instrumental-callbacks"},{"title":"Add Vocals","openapi":"suno-api/suno-api.json POST /api/v1/generate/add-vocals","href":"/suno-api/add-vocals"},{"title":"Add Vocals Callbacks","href":"/suno-api/add-vocals-callbacks"},{"title":"Get Music Generation Details","openapi":"suno-api/suno-api.json GET /api/v1/generate/record-info","href":"/suno-api/get-music-generation-details"},{"title":"Recovery Audio","openapi":"suno-api/suno-api.json POST /api/v1/suno/recovery","href":"/suno-api/recovery-audio"},{"title":"Get Recovery Audio Details","openapi":"suno-api/suno-api.json GET /api/v1/suno/recovery/record-info","href":"/suno-api/get-recovery-audio-details"},{"title":"Get Timestamped Lyrics","openapi":"suno-api/suno-api.json POST /api/v1/generate/get-timestamped-lyrics","href":"/suno-api/get-timestamped-lyrics"},{"title":"Boost Music Style","openapi":"suno-api/suno-api.json POST /api/v1/style/generate","href":"/suno-api/boost-music-style"},{"title":"Generate Music Cover","openapi":"suno-api/suno-api.json POST /api/v1/suno/cover/generate","href":"/suno-api/cover-suno"},{"title":"Music Cover Generation Callbacks","href":"/suno-api/cover-suno-callbacks"},{"title":"Replace Music Section","openapi":"suno-api/suno-api.json POST /api/v1/generate/replace-section","href":"/suno-api/replace-section"},{"title":"Replace Music Section Callbacks","href":"/suno-api/replace-section-callbacks"},{"title":"Get Music Cover Details","openapi":"suno-api/suno-api.json GET /api/v1/suno/cover/record-info","href":"/suno-api/get-cover-suno-details"},{"title":"Generate Persona","openapi":"suno-api/suno-api.json POST /api/v1/generate/generate-persona","href":"/suno-api/generate-persona"},{"title":"Generate Mashup","openapi":"suno-api/suno-api.json POST /api/v1/generate/mashup","href":"/suno-api/generate-mashup"}]},{"group":"Suno Voice","pages":[{"title":"Suno Voice Generate Verification Phrase","openapi":"suno-api/suno-voice-api.json POST /api/v1/voice/validate","href":"/suno-api/suno-voice-validate"},{"title":"Suno Voice Validation Phrase Callbacks","href":"/suno-api/suno-voice-validate-callbacks"},{"title":"Suno Voice Get Verification Phrase","openapi":"suno-api/suno-voice-api.json GET /api/v1/voice/validate-info","href":"/suno-api/suno-voice-validate-info"},{"title":"Suno Voice Create Custom Voice","openapi":"suno-api/suno-voice-api.json POST /api/v1/voice/generate","href":"/suno-api/suno-voice-generate"},{"title":"Suno Voice Generation Callbacks","href":"/suno-api/suno-voice-generate-callbacks"},{"title":"Suno Voice Get Custom Voice Record","openapi":"suno-api/suno-voice-api.json GET /api/v1/voice/record-info","href":"/suno-api/suno-voice-record-info"},{"title":"Suno Voice Regenerate Verification Phrase","openapi":"suno-api/suno-voice-api.json POST /api/v1/voice/regenerate","href":"/suno-api/suno-voice-regenerate"},{"title":"Suno Voice Regenerate Phrase Callbacks","href":"/suno-api/suno-voice-regenerate-callbacks"},{"title":"Suno Voice Check Availability","openapi":"suno-api/suno-voice-api.json POST /api/v1/voice/check-voice","href":"/suno-api/suno-voice-check-voice"}]},{"group":"Generate Lyrics","pages":[{"title":"Generate Lyrics","openapi":"suno-api/suno-api.json POST /api/v1/lyrics","href":"/suno-api/generate-lyrics"},{"title":"Lyrics Generation Callbacks","href":"/suno-api/generate-lyrics-callbacks"},{"title":"Get Lyrics Generation Details","openapi":"suno-api/suno-api.json GET /api/v1/lyrics/record-info","href":"/suno-api/get-lyrics-generation-details"}]},{"group":"Generate Sounds","pages":[{"title":"Generate Sounds","openapi":"suno-api/suno-api.json POST /api/v1/generate/sounds","href":"/suno-api/generate-sounds"}]},{"group":"WAV Conversion","pages":[{"title":"Convert to WAV Format","openapi":"suno-api/suno-api.json POST /api/v1/wav/generate","href":"/suno-api/convert-to-wav-format"},{"title":"WAV Format Conversion Callbacks","href":"/suno-api/convert-to-wav-format-callbacks"},{"title":"Get WAV Conversion Details","openapi":"suno-api/suno-api.json GET /api/v1/wav/record-info","href":"/suno-api/get-wav-conversion-details"}]},{"group":"Vocal Removal","pages":[{"title":"Vocal \u0026 Instrument Stem Separation","openapi":"suno-api/suno-api.json POST /api/v1/vocal-removal/generate","href":"/suno-api/separate-vocals-from-music"},{"title":"Audio Separation Callbacks","href":"/suno-api/separate-vocals-from-music-callbacks"},{"title":"Get Audio Separation Details","openapi":"suno-api/suno-api.json GET /api/v1/vocal-removal/record-info","href":"/suno-api/get-vocal-separation-details"},{"title":"Generate MIDI from Audio","openapi":"suno-api/suno-api.json POST /api/v1/midi/generate","href":"/suno-api/generate-midi"},{"title":"MIDI Generation Callbacks","href":"/suno-api/generate-midi-callbacks"},{"title":"Get MIDI Generation Details","openapi":"suno-api/suno-api.json GET /api/v1/midi/record-info","href":"/suno-api/get-midi-details"}]},{"group":"Music Video Generation","pages":[{"title":"Create Music Video","openapi":"suno-api/suno-api.json POST /api/v1/mp4/generate","href":"/suno-api/create-music-video"},{"title":"Music Video Generation Callbacks","href":"/suno-api/create-music-video-callbacks"},{"title":"Get Music Video Details","openapi":"suno-api/suno-api.json GET /api/v1/mp4/record-info","href":"/suno-api/get-music-video-details"}]},{"group":"Account Management","pages":[{"title":"Get Remaining Credits","openapi":"suno-api/suno-api.json GET /api/v1/generate/credit","href":"/suno-api/get-remaining-credits"}]},{"group":"File Upload API","pages":[{"title":"File Upload API Quickstart","icon":"rocket","href":"/file-upload-api/quickstart"},{"title":"Base64 File Upload","openapi":"file-upload-api/file-upload-api.json POST /api/file-base64-upload","href":"/file-upload-api/upload-file-base-64"},{"openapi":"file-upload-api/file-upload-api.json POST /api/file-stream-upload","title":"File Stream Upload","href":"/file-upload-api/upload-file-stream"},{"openapi":"file-upload-api/file-upload-api.json POST /api/file-url-upload","title":"URL File Upload","href":"/file-upload-api/upload-file-url"}]}]},{"language":"cn","pages":[{"title":"cn","href":"/cn/suno-api/generate-music"}]}]},"title":"Generate Music - Suno API","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}