Generate audio from a text prompt with any audio generation model from GET /v3/audio/models: music (type=music) or sound effects and ambience (type=sound). By default runs synchronously and returns it inline as base64 (200). Set async: true to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. model is required, and prompt too unless sections are sent; duration_seconds, instrumental, format (omit it for the model’s native format) and seed are normalized, and a value a model cannot honor answers 400 naming the limit. sections (a timed plan: each section’s duration_ms, prompt and styles) needs a model with the audio_sections capability, and loop one with audio_loop; a model without the capability answers 400 rather than ignoring the field. Everything in parameters is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set store: true to also save the output to /v3/files and get a reusable file_id; nothing is stored otherwise.
Music, songs, sound effects and ambience. See the Audio guide for runnable examples, timed sections, loops and song editing.
Authorizations
Authorization
string
header
required
API key authentication. Pass your API key as a Bearer token.
Body
application/json
model
string
required
Audio generation model id. List them with GET /v3/audio/models: ?type=music for songs and scores, ?type=sound for sound effects and ambience, ?capability=audio_sections or ?capability=audio_loop for models that take those fields. For example elevenlabs/music_v2_5 (music) or elevenlabs/eleven_text_to_sound_v2 (sound effects).
async
boolean
Run generation on the background worker and return a job to poll (202) instead of waiting inline (200). Use for full-length tracks and slow models.
duration_seconds
number
Requested length in seconds (up to 600). Omit it to let the model choose. Limits differ by model, and some models have no length setting; a value a model cannot honor answers 400 naming its limit.
format
string
Output audio format: mp3, wav, opus or pcm. Omit it to get the model's native format. A format the model cannot produce answers 400 naming the ones it can.
instrumental
boolean
Music only: generate without vocals.
loop
boolean
Generate audio that repeats seamlessly, for ambience and hums. Needs a model with the audio_loop capability (GET /v3/audio/models?capability=audio_loop); other models answer 400.
max_retries
integer
default:2
Retries on the same endpoint when the provider rejects the call before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.
Required range: 0 <= x <= 3
parameters
object
Provider-specific fields forwarded verbatim, except fields owned by normalized inputs and shared-account song selectors. Use scoped sections for song references; the provider validates other settings.
prompt
string
What to generate. For music: genre, mood, instruments, lyrics. For a sound effect: the sound itself, for example "a single hammer strike on an iron anvil". Required unless sections are set.
sections
object[]
A timed plan for music that must fit a picture: each section's duration_ms plus its own prompt and styles, in order. The sections set the total length, so duration_seconds is not sent with them. Needs a model with the audio_sections capability (GET /v3/audio/models?capability=audio_sections); other models answer 400.
Show child attributes
seed
integer
Seed for more repeatable output. Models without seed support answer 400.
store
boolean
Persist the generated audio to /v3/files and return a reusable file_id. Defaults to false; set true to store.
store_song
boolean
Store a reusable song for inpainting, separately from store (which saves a file). Requires audio_song_storage and nonzero project retention.
Response
Successful response
audio
object
required
Show child attributes
created
integer
required
id
string
required
model
string
required
usage
object
required
Show child attributes
lyrics
string
plan
object
song
object
Show child attributes
store_song_skipped
string
words_timestamps
object[]
Show child attributes
Last modified on November 16, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Opper","description":"The European AI gateway for agents: 700+ models from 60+ providers through one EU-hosted API, drop-in for the OpenAI, Anthropic and Gemini SDKs.","colors":{"primary":"#14cdcd","light":"#24cdcd","dark":"#2d9393"},"logo":{"light":"https://mintcdn.com/opper/EXrQN6z6604ZsBuP/logo/light.svg?fit=max\u0026auto=format\u0026n=EXrQN6z6604ZsBuP\u0026q=85\u0026s=fd4170c482c6cebc3c20d8f7f7e033f8","dark":"https://mintcdn.com/opper/EXrQN6z6604ZsBuP/logo/dark.svg?fit=max\u0026auto=format\u0026n=EXrQN6z6604ZsBuP\u0026q=85\u0026s=328888ac1f44b63c468d022fda86421d"},"favicon":"https://mintcdn.com/opper/EXrQN6z6604ZsBuP/favicon.png?fit=max\u0026auto=format\u0026n=EXrQN6z6604ZsBuP\u0026q=85\u0026s=f1229b80ac7eee56ba2c14789e5fe22e","api":{"examples":{"defaults":"required","languages":["Shell","python","typescript"]}},"appearance":{"default":"system"},"navbar":{"links":[{"href":"mailto:support@opper.ai","label":"Support"},{"href":"https://discord.gg/wcT3bc7Y4Y","label":"Discord"}],"primary":{"type":"button","label":"Login","href":"https://platform.opper.ai/auth/signin"}},"footer":{"socials":{"x":"https://x.com/opperai","github":"https://github.com/opper-ai","linkedin":"https://linkedin.com/company/opper-ai"}},"integrations":{"plausible":{"domain":"docs.opper.ai"}},"contextual":{"options":["copy","view"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"opper","hasAudioNarration":false,"actualSubdomain":"opper","customDomains":["docs.opper.ai"],"gitSource":{"type":"github","owner":"opper-ai","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b1062e844011f3d6e1d6b81","clientVersion":"0.0.4416","searchFilterCounts":[{"language":"default","tag":"Documentation","count":93},{"language":"default","tag":"API Reference","count":92},{"language":"default","tag":"Platform APIs","count":46},{"language":"default","tag":"Management","count":35},{"language":"default","tag":"Multimodality","count":32},{"language":"default","tag":"Apps","count":29},{"language":"default","tag":"Build","count":27},{"language":"default","tag":"Observe \u0026 Control","count":18},{"language":"default","tag":"Gateway","count":14},{"language":"default","tag":"Compatibility","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@keyframes oppFade{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}@keyframes oppBlink{0%,49%{opacity:1}50%,100%{opacity:0}}@keyframes oppDot{0%,80%,100%{opacity:0.25}40%{opacity:1}}.opp-term .opp-line{opacity:0;animation:oppFade 0.4s ease forwards}.opp-term a{color:inherit;text-decoration:none;cursor:default}.opp-cursor{display:inline-block;width:7px;height:1em;margin-left:5px;vertical-align:text-bottom;border-radius:1px;background:#14cdcd;animation:oppBlink 1.1s step-end infinite}.opp-dots span{display:inline-block;width:5px;height:5px;margin-right:3px;border-radius:50%;background:#6e7681;animation:oppDot 1.2s infinite}.opp-dots span:nth-child(2){animation-delay:0.2s}.opp-dots span:nth-child(3){animation-delay:0.4s}.opp-replay{margin-left:auto;background:transparent;border:1px solid #2b3440;color:#8b949e;font:inherit;font-size:11px;padding:2px 9px;border-radius:6px;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.3s, color 0.2s, border-color 0.2s}.opp-replay.show{opacity:1;pointer-events:auto}.opp-replay:hover{color:#14cdcd;border-color:#14cdcd}"}]}
{"page":{"pagePath":"v3-api-reference/audio/create-audio-generation","slug":"/v3-api-reference/audio/create-audio-generation","pageMetadata":{"title":"Generate audio","openapi":"post /v3/audio/generations","description":"Generate audio from a text prompt with any audio generation model from `GET /v3/audio/models`: music (`type=music`) or sound effects and ambience (`type=sound`). By default runs synchronously and returns it inline as base64 (200). Set `async: true` to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. `model` is required, and `prompt` too unless `sections` are sent; `duration_seconds`, `instrumental`, `format` (omit it for the model's native format) and `seed` are normalized, and a value a model cannot honor answers 400 naming the limit. `sections` (a timed plan: each section's `duration_ms`, `prompt` and `styles`) needs a model with the `audio_sections` capability, and `loop` one with `audio_loop`; a model without the capability answers 400 rather than ignoring the field. Everything in `parameters` is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set `store: true` to also save the output to /v3/files and get a reusable `file_id`; nothing is stored otherwise.","href":"/v3-api-reference/audio/create-audio-generation"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Generate audio from a text prompt with any audio generation model from \", _jsx(_components.code, {\n children: \"GET /v3/audio/models\"\n }), \": music (\", _jsx(_components.code, {\n children: \"type=music\"\n }), \") or sound effects and ambience (\", _jsx(_components.code, {\n children: \"type=sound\"\n }), \"). By default runs synchronously and returns it inline as base64 (200). Set \", _jsx(_components.code, {\n children: \"async: true\"\n }), \" to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. \", _jsx(_components.code, {\n children: \"model\"\n }), \" is required, and \", _jsx(_components.code, {\n children: \"prompt\"\n }), \" too unless \", _jsx(_components.code, {\n children: \"sections\"\n }), \" are sent; \", _jsx(_components.code, {\n children: \"duration_seconds\"\n }), \", \", _jsx(_components.code, {\n children: \"instrumental\"\n }), \", \", _jsx(_components.code, {\n children: \"format\"\n }), \" (omit it for the model’s native format) and \", _jsx(_components.code, {\n children: \"seed\"\n }), \" are normalized, and a value a model cannot honor answers 400 naming the limit. \", _jsx(_components.code, {\n children: \"sections\"\n }), \" (a timed plan: each section’s \", _jsx(_components.code, {\n children: \"duration_ms\"\n }), \", \", _jsx(_components.code, {\n children: \"prompt\"\n }), \" and \", _jsx(_components.code, {\n children: \"styles\"\n }), \") needs a model with the \", _jsx(_components.code, {\n children: \"audio_sections\"\n }), \" capability, and \", _jsx(_components.code, {\n children: \"loop\"\n }), \" one with \", _jsx(_components.code, {\n children: \"audio_loop\"\n }), \"; a model without the capability answers 400 rather than ignoring the field. Everything in \", _jsx(_components.code, {\n children: \"parameters\"\n }), \" is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set \", _jsx(_components.code, {\n children: \"store: true\"\n }), \" to also save the output to /v3/files and get a reusable \", _jsx(_components.code, {\n children: \"file_id\"\n }), \"; nothing is stored otherwise.\"]\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,p:`p`,..._provideComponents(),...props.components};return _jsxs(_components.p,{children:[`Music, songs, sound effects and ambience. See the `,_jsx(_components.a,{href:`/build/multimodal/audio#music-and-sound-effects`,children:`Audio guide`}),` for runnable examples, timed sections, loops and `,_jsx(_components.a,{href:`/build/multimodal/audio#reuse-and-edit-a-song`,children:`song editing`}),`.`]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate audio","openapi":"post /v3/audio/generations","description":"Generate audio from a text prompt with any audio generation model from `GET /v3/audio/models`: music (`type=music`) or sound effects and ambience (`type=sound`). By default runs synchronously and returns it inline as base64 (200). Set `async: true` to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. `model` is required, and `prompt` too unless `sections` are sent; `duration_seconds`, `instrumental`, `format` (omit it for the model's native format) and `seed` are normalized, and a value a model cannot honor answers 400 naming the limit. `sections` (a timed plan: each section's `duration_ms`, `prompt` and `styles`) needs a model with the `audio_sections` capability, and `loop` one with `audio_loop`; a model without the capability answers 400 rather than ignoring the field. Everything in `parameters` is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set `store: true` to also save the output to /v3/files and get a reusable `file_id`; nothing is stored otherwise.","href":"/v3-api-reference/audio/create-audio-generation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/opper/40a2b9bd0ec03258/script.js"],"openApiReferenceData":{"operation":{"description":"Generate audio from a text prompt with any audio generation model from `GET /v3/audio/models`: music (`type=music`) or sound effects and ambience (`type=sound`). By default runs synchronously and returns it inline as base64 (200). Set `async: true` to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. `model` is required, and `prompt` too unless `sections` are sent; `duration_seconds`, `instrumental`, `format` (omit it for the model's native format) and `seed` are normalized, and a value a model cannot honor answers 400 naming the limit. `sections` (a timed plan: each section's `duration_ms`, `prompt` and `styles`) needs a model with the `audio_sections` capability, and `loop` one with `audio_loop`; a model without the capability answers 400 rather than ignoring the field. Everything in `parameters` is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set `store: true` to also save the output to /v3/files and get a reusable `file_id`; nothing is stored otherwise.","operationId":"createAudioGeneration","requestBody":"cfc58380-e4fb-4fea-9e8e-22a8f4eddd4b","responses":{"200":"99b8bb2f-65f3-46b5-924a-b122df82bf93","202":"70b59f24-1ad7-445a-8da3-9e08ab8b5566","400":"7bb68b10-ff32-4c20-9b54-fb854b35cf96","401":"82c56297-870d-44a9-8837-f291fe5be4b6","500":"e4719076-2650-4f76-a778-254084b23a39"},"summary":"Generate audio","tags":["Audio"],"method":"post","type":"path","servers":["8d55ef99-30cf-4d60-a28b-b595bc35cb08","11698005-7175-47f7-85a5-27b39ab821ef"],"security":["4d3016dd-e396-41bf-a41c-60e5c5c7c091"],"path":"/v3/audio/generations","baseUrlOptions":["https://api.opper.ai","http://localhost:8080"],"title":"Generate audio","codeSamples":[],"requestExampleLanguages":["bash","python","typescript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"model":{"description":"Audio generation model id. List them with GET /v3/audio/models: ?type=music for songs and scores, ?type=sound for sound effects and ambience, ?capability=audio_sections or ?capability=audio_loop for models that take those fields. For example elevenlabs/music_v2_5 (music) or elevenlabs/eleven_text_to_sound_v2 (sound effects).","type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"async":{"description":"Run generation on the background worker and return a job to poll (202) instead of waiting inline (200). Use for full-length tracks and slow models.","type":"boolean","uniqueKey":"async","typeLabel":"boolean"},"duration_seconds":{"description":"Requested length in seconds (up to 600). Omit it to let the model choose. Limits differ by model, and some models have no length setting; a value a model cannot honor answers 400 naming its limit.","type":"number","uniqueKey":"duration_seconds","typeLabel":"number"},"format":{"description":"Output audio format: mp3, wav, opus or pcm. Omit it to get the model's native format. A format the model cannot produce answers 400 naming the ones it can.","type":"string","uniqueKey":"format","typeLabel":"string"},"instrumental":{"description":"Music only: generate without vocals.","type":"boolean","uniqueKey":"instrumental","typeLabel":"boolean"},"loop":{"description":"Generate audio that repeats seamlessly, for ambience and hums. Needs a model with the audio_loop capability (GET /v3/audio/models?capability=audio_loop); other models answer 400.","type":"boolean","uniqueKey":"loop","typeLabel":"boolean"},"max_retries":{"default":2,"description":"Retries on the same endpoint when the provider rejects the call before doing any work (HTTP 429 or a gateway 502/503/504 with no result, or a connection that never reached it). Only the successful attempt is billed. Default 2 / max 3; 0 turns retries off.","maximum":3,"minimum":0,"type":"integer","uniqueKey":"max_retries","typeLabel":"integer"},"parameters":{"description":"Provider-specific fields forwarded verbatim, except fields owned by normalized inputs and shared-account song selectors. Use scoped sections for song references; the provider validates other settings.","type":"object","uniqueKey":"parameters","typeLabel":"object"},"prompt":{"description":"What to generate. For music: genre, mood, instruments, lyrics. For a sound effect: the sound itself, for example \"a single hammer strike on an iron anvil\". Required unless sections are set.","type":"string","uniqueKey":"prompt","typeLabel":"string"},"sections":{"description":"A timed plan for music that must fit a picture: each section's duration_ms plus its own prompt and styles, in order. The sections set the total length, so duration_seconds is not sent with them. Needs a model with the audio_sections capability (GET /v3/audio/models?capability=audio_sections); other models answer 400.","items":{"properties":{"condition_on":{"properties":{"end_ms":{"type":"integer","isRequired":true,"uniqueKey":"sections.items.[INDEX].condition_on.end_ms","typeLabel":"integer"},"song":{"type":"string","isRequired":true,"uniqueKey":"sections.items.[INDEX].condition_on.song","typeLabel":"string"},"start_ms":{"type":"integer","isRequired":true,"uniqueKey":"sections.items.[INDEX].condition_on.start_ms","typeLabel":"integer"},"strength":{"type":"string","uniqueKey":"sections.items.[INDEX].condition_on.strength","typeLabel":"string"}},"required":["song","start_ms","end_ms"],"type":"object","uniqueKey":"sections.items.[INDEX].condition_on","typeLabel":"object"},"context_adherence":{"type":"string","uniqueKey":"sections.items.[INDEX].context_adherence","typeLabel":"string"},"duration_ms":{"description":"Length of this section in milliseconds. Models set their own per-section limits and answer 400 outside them.","type":"integer","uniqueKey":"sections.items.[INDEX].duration_ms","typeLabel":"integer"},"end_ms":{"type":"integer","uniqueKey":"sections.items.[INDEX].end_ms","typeLabel":"integer"},"lyrics":{"description":"Words to be sung in this section. Leave it empty for an instrumental section.","type":"string","uniqueKey":"sections.items.[INDEX].lyrics","typeLabel":"string"},"negative_styles":{"description":"Styles this section should avoid, for example [\"vocals\"].","items":{"type":"string","uniqueKey":"sections.items.[INDEX].negative_styles.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"sections.items.[INDEX].negative_styles","typeLabel":"string[]"},"prompt":{"description":"What this section should sound like, in words, for example \"a quiet piano intro\" or \"strings build to a swell\". It describes the music and is never sung; put sung words in lyrics.","type":"string","uniqueKey":"sections.items.[INDEX].prompt","typeLabel":"string"},"song":{"type":"string","uniqueKey":"sections.items.[INDEX].song","typeLabel":"string"},"start_ms":{"type":"integer","uniqueKey":"sections.items.[INDEX].start_ms","typeLabel":"integer"},"styles":{"description":"Styles this section should have, for example [\"sparse piano\", \"instrumental\"].","items":{"type":"string","uniqueKey":"sections.items.[INDEX].styles.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"sections.items.[INDEX].styles","typeLabel":"string[]"}},"type":"object","uniqueKey":"sections.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"sections","typeLabel":"object[]"},"seed":{"description":"Seed for more repeatable output. Models without seed support answer 400.","type":"integer","uniqueKey":"seed","typeLabel":"integer"},"store":{"description":"Persist the generated audio to /v3/files and return a reusable file_id. Defaults to false; set true to store.","type":"boolean","uniqueKey":"store","typeLabel":"boolean"},"store_song":{"description":"Store a reusable song for inpainting, separately from store (which saves a file). Requires audio_song_storage and nonzero project retention.","type":"boolean","uniqueKey":"store_song","typeLabel":"boolean"}},"required":["model"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","async":true,"duration_seconds":123,"format":"\u003cstring>","instrumental":true,"loop":true,"max_retries":2,"parameters":{},"prompt":"\u003cstring>","sections":[{"context_adherence":"\u003cstring>","duration_ms":123,"end_ms":123,"lyrics":"\u003cstring>","negative_styles":["\u003cstring>"],"prompt":"\u003cstring>","song":"\u003cstring>","start_ms":123,"styles":["\u003cstring>"]}],"seed":123,"store":true,"store_song":true}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"99b8bb2f-65f3-46b5-924a-b122df82bf93":{"content":{"application/json":{"schema":{"properties":{"audio":{"properties":{"b64_json":{"type":"string","uniqueKey":"audio.b64_json","typeLabel":"string"},"file_id":{"type":"string","uniqueKey":"audio.file_id","typeLabel":"string"},"mime_type":{"type":"string","uniqueKey":"audio.mime_type","typeLabel":"string"},"url":{"type":"string","uniqueKey":"audio.url","typeLabel":"string"}},"type":"object","isRequired":true,"uniqueKey":"audio","typeLabel":"object"},"created":{"type":"integer","isRequired":true,"uniqueKey":"created","typeLabel":"integer"},"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"model":{"type":"string","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"usage":{"properties":{"cost":{"type":"number","isRequired":true,"uniqueKey":"usage.cost","typeLabel":"number"},"attempts":{"description":"Provider calls the generation took when a rejection was retried (present only when more than 1). Only the successful one is billed.","type":"integer","uniqueKey":"usage.attempts","typeLabel":"integer"},"duration_seconds":{"type":"number","uniqueKey":"usage.duration_seconds","typeLabel":"number"}},"required":["cost"],"type":"object","isRequired":true,"uniqueKey":"usage","typeLabel":"object"},"lyrics":{"type":"string","uniqueKey":"lyrics","typeLabel":"string"},"plan":{"type":"object","uniqueKey":"plan","typeLabel":"object"},"song":{"properties":{"expires_at":{"format":"date-time","type":"string","isRequired":true,"uniqueKey":"song.expires_at","typeLabel":"string\u003cdate-time>"},"id":{"type":"string","isRequired":true,"uniqueKey":"song.id","typeLabel":"string"}},"required":["id","expires_at"],"type":"object","uniqueKey":"song","typeLabel":"object"},"store_song_skipped":{"type":"string","uniqueKey":"store_song_skipped","typeLabel":"string"},"words_timestamps":{"items":{"properties":{"end_ms":{"type":"integer","isRequired":true,"uniqueKey":"words_timestamps.items.[INDEX].end_ms","typeLabel":"integer"},"start_ms":{"type":"integer","isRequired":true,"uniqueKey":"words_timestamps.items.[INDEX].start_ms","typeLabel":"integer"},"word":{"type":"string","isRequired":true,"uniqueKey":"words_timestamps.items.[INDEX].word","typeLabel":"string"}},"required":["word","start_ms","end_ms"],"type":"object","uniqueKey":"words_timestamps.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"words_timestamps","typeLabel":"object[]"}},"required":["id","model","created","audio","usage"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"audio":{"b64_json":"\u003cstring>","file_id":"\u003cstring>","mime_type":"\u003cstring>","url":"\u003cstring>"},"created":123,"id":"\u003cstring>","model":"\u003cstring>","usage":{"cost":123,"attempts":123,"duration_seconds":123},"lyrics":"\u003cstring>","plan":{},"song":{"expires_at":"2023-11-07T05:31:56Z","id":"\u003cstring>"},"store_song_skipped":"\u003cstring>","words_timestamps":[{"end_ms":123,"start_ms":123,"word":"\u003cstring>"}]}}},"exampleType":"generated"}},"description":"Successful response","exampleType":"generated"},"70b59f24-1ad7-445a-8da3-9e08ab8b5566":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"status_url":{"type":"string","isRequired":true,"uniqueKey":"status_url","typeLabel":"string"}},"required":["id","status_url"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","status_url":"\u003cstring>"}}},"exampleType":"generated"}},"description":"Accepted: async generation submitted (async: true). Poll the returned `status_url` (GET /v3/artifacts/{id}/status) for a presigned download URL when complete.","exampleType":"generated"},"7bb68b10-ff32-4c20-9b54-fb854b35cf96":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"description":"Any value","uniqueKey":"error.details","typeLabel":"any"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","uniqueKey":"meta","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":"\u003cunknown>"},"meta":{}}}},"exampleType":"generated"}},"description":"Bad request","exampleType":"generated"},"82c56297-870d-44a9-8837-f291fe5be4b6":{"description":"Unauthorized - missing or invalid API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"e4719076-2650-4f76-a778-254084b23a39":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"description":"Any value","uniqueKey":"error.details","typeLabel":"any"}},"required":["code","message"],"type":"object","isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","uniqueKey":"meta","typeLabel":"object"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","details":"\u003cunknown>"},"meta":{}}}},"exampleType":"generated"}},"description":"Internal server error","exampleType":"generated"}},"security":{"4d3016dd-e396-41bf-a41c-60e5c5c7c091":{"BearerAuth":{"bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token.","scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"8d55ef99-30cf-4d60-a28b-b595bc35cb08":{"description":"Production","url":"https://api.opper.ai"},"11698005-7175-47f7-85a5-27b39ab821ef":{"description":"Local development","url":"http://localhost:8080"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"API Key","description":"API key authentication. Pass your API key as a Bearer token.","scheme":"bearer","type":"http","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key authentication. Pass your API key as a Bearer token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi-v3.json"},"subdomain":"opper","siteName":"Opper","title":"Generate audio - Opper","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T09:31:06.390Z","gitLastModified":"2026-11-16T09:30:55.000Z","originalFileLocation":"v3-api-reference/audio/create-audio-generation.mdx"},"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 audio from a text prompt with any audio generation model from GET /v3/audio/models: music (type=music) or sound effects and ambience (type=sound). By default runs synchronously and returns it inline as base64 (200). Set async: true to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. model is required, and prompt too unless sections are sent; duration_seconds, instrumental, format (omit it for the model\u0026#x27;s native format) and seed are normalized, and a value a model cannot honor answers 400 naming the limit. sections (a timed plan: each section\u0026#x27;s duration_ms, prompt and styles) needs a model with the audio_sections capability, and loop one with audio_loop; a model without the capability answers 400 rather than ignoring the field. Everything in parameters is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set store: true to also save the output to /v3/files and get a reusable file_id; nothing is stored otherwise.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Opper\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_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/opper/QTlMDo19G0sAM5ID/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate audio - Opper\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate audio from a text prompt with any audio generation model from GET /v3/audio/models: music (type=music) or sound effects and ambience (type=sound). By default runs synchronously and returns it inline as base64 (200). Set async: true to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. model is required, and prompt too unless sections are sent; duration_seconds, instrumental, format (omit it for the model\u0026#x27;s native format) and seed are normalized, and a value a model cannot honor answers 400 naming the limit. sections (a timed plan: each section\u0026#x27;s duration_ms, prompt and styles) needs a model with the audio_sections capability, and loop one with audio_loop; a model without the capability answers 400 rather than ignoring the field. Everything in parameters is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set store: true to also save the output to /v3/files and get a reusable file_id; nothing is stored otherwise.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Opper\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://opper.mintlify.site/_mintlify/api/og/v2?division=Audio\u0026amp;title=Generate+audio\u0026amp;description=Generate+audio+from+a+text+prompt+with+any+audio+generation+model+from+%60GET+%2Fv3%2Faudio%2Fmodels%60%3A+music+%28%60type%3Dmusic%60%29+or+sound+effects+and+ambience+%28%60type%3Dsound%60%29\u0026amp;theme=721cfd356f87dd5d4904d74d\u0026amp;signature=cc70de430344f15ac3cc911575384dbb715279bc368b26e0069311675bbb4f04\">\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 audio - Opper\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate audio from a text prompt with any audio generation model from GET /v3/audio/models: music (type=music) or sound effects and ambience (type=sound). By default runs synchronously and returns it inline as base64 (200). Set async: true to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. model is required, and prompt too unless sections are sent; duration_seconds, instrumental, format (omit it for the model\u0026#x27;s native format) and seed are normalized, and a value a model cannot honor answers 400 naming the limit. sections (a timed plan: each section\u0026#x27;s duration_ms, prompt and styles) needs a model with the audio_sections capability, and loop one with audio_loop; a model without the capability answers 400 rather than ignoring the field. Everything in parameters is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set store: true to also save the output to /v3/files and get a reusable file_id; nothing is stored otherwise.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://opper.mintlify.site/_mintlify/api/og/v2?division=Audio\u0026amp;title=Generate+audio\u0026amp;description=Generate+audio+from+a+text+prompt+with+any+audio+generation+model+from+%60GET+%2Fv3%2Faudio%2Fmodels%60%3A+music+%28%60type%3Dmusic%60%29+or+sound+effects+and+ambience+%28%60type%3Dsound%60%29\u0026amp;theme=721cfd356f87dd5d4904d74d\u0026amp;signature=cc70de430344f15ac3cc911575384dbb715279bc368b26e0069311675bbb4f04\">\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/opper/QTlMDo19G0sAM5ID/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Opper\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#14cdcd\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v3-api-reference/audio/create-audio-generation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.opper.ai/#organization\",\"name\":\"Opper\",\"url\":\"https://docs.opper.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/opper/EXrQN6z6604ZsBuP/logo/light.svg?fit=max\u0026auto=format\u0026n=EXrQN6z6604ZsBuP\u0026q=85\u0026s=fd4170c482c6cebc3c20d8f7f7e033f8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.opper.ai#website\",\"name\":\"Opper\",\"url\":\"https://docs.opper.ai\",\"publisher\":{\"@id\":\"https://docs.opper.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation#webpage\",\"url\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation\",\"name\":\"Generate audio\",\"description\":\"Generate audio from a text prompt with any audio generation model from GET /v3/audio/models: music (type=music) or sound effects and ambience (type=sound). By default runs synchronously and returns it inline as base64 (200). Set async: true to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. model is required, and prompt too unless sections are sent; duration_seconds, instrumental, format (omit it for the model's native format) and seed are normalized, and a value a model cannot honor answers 400 naming the limit. sections (a timed plan: each section's duration_ms, prompt and styles) needs a model with the audio_sections capability, and loop one with audio_loop; a model without the capability answers 400 rather than ignoring the field. Everything in parameters is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set store: true to also save the output to /v3/files and get a reusable file_id; nothing is stored otherwise.\",\"dateModified\":\"2026-11-16T09:30:55.000Z\",\"isPartOf\":{\"@id\":\"https://docs.opper.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Multimodality\",\"item\":\"https://docs.opper.ai/v3-api-reference/images/create-image\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Audio\",\"item\":\"https://docs.opper.ai/v3-api-reference/audio/create-speech\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Generate audio\",\"item\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation#apireference\",\"headline\":\"Generate audio\",\"name\":\"Generate audio\",\"description\":\"Generate audio from a text prompt with any audio generation model from GET /v3/audio/models: music (type=music) or sound effects and ambience (type=sound). By default runs synchronously and returns it inline as base64 (200). Set async: true to run it on the background worker and get a 202 with a status URL to poll instead; use it for long tracks, which can take minutes. model is required, and prompt too unless sections are sent; duration_seconds, instrumental, format (omit it for the model's native format) and seed are normalized, and a value a model cannot honor answers 400 naming the limit. sections (a timed plan: each section's duration_ms, prompt and styles) needs a model with the audio_sections capability, and loop one with audio_loop; a model without the capability answers 400 rather than ignoring the field. Everything in parameters is forwarded verbatim to the provider. Lyrics are returned when the provider produces them. Set store: true to also save the output to /v3/files and get a reusable file_id; nothing is stored otherwise.\",\"url\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.opper.ai/v3-api-reference/audio/create-audio-generation#webpage\"},\"dateModified\":\"2026-11-16T09:30:55.000Z\",\"publisher\":{\"@id\":\"https://docs.opper.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.opper.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Opper\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Opper\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v3-api-reference/audio/create-audio-generation.md","siteName":"Opper","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/overview/about"}]},{"tab":"Cookbook","icon":"github","href":"https://github.com/opper-ai/opper-cookbook"},{"tab":"API Reference","icon":"square-terminal","groups":[{"group":"Compatibility","pages":[{"group":"OpenAI","expanded":true,"pages":[{"title":"Chat Completions","openapi":"post /v3/compat/chat/completions","href":"/v3-api-reference/compatibility/chat-completions"},{"title":"Responses","openapi":"post /v3/compat/responses","href":"/v3-api-reference/compatibility/create-response"},{"title":"Embeddings","openapi":"post /v3/compat/embeddings","href":"/v3-api-reference/compatibility/create-embeddings"},{"title":"Decisions","openapi":"post /v3/compat/decisions","href":"/v3-api-reference/compatibility/create-decision"},{"title":"List Models","openapi":"get /v3/compat/models","href":"/v3-api-reference/compatibility/list-models"}]},{"group":"Anthropic","expanded":true,"pages":[{"title":"Messages","openapi":"post /v3/compat/v1/messages","href":"/v3-api-reference/compatibility/create-message"},{"title":"Count Tokens","openapi":"post /v3/compat/v1/messages/count_tokens","href":"/v3-api-reference/compatibility/count-message-tokens"}]},{"group":"Google","expanded":true,"pages":[{"title":"Interactions","openapi":"post /v3/compat/v1beta/interactions","href":"/v3-api-reference/compatibility/create-interaction"},{"title":"Generate Content","openapi":"post /v3/compat/v1beta/models/{model}:generateContent","href":"/v3-api-reference/compatibility/generate-content"},{"title":"Stream Generate Content","openapi":"post /v3/compat/v1beta/models/{model}:streamGenerateContent","href":"/v3-api-reference/compatibility/stream-generate-content"},{"title":"Count Tokens","openapi":"post /v3/compat/v1beta/models/{model}:countTokens","href":"/v3-api-reference/compatibility/count-tokens"}]},{"group":"TypeSafe","expanded":true,"pages":[{"title":"System One evaluation","openapi":"post /v3/compat/v1/systemone","href":"/v3-api-reference/compatibility/systemone"}]},{"group":"Other","expanded":true,"pages":[{"title":"OpenResponses","openapi":"post /v3/compat/openresponses","href":"/v3-api-reference/compatibility/openresponses"}]}]},{"group":"Multimodality","pages":[{"group":"Images","pages":[{"title":"Generate an image","openapi":"post /v3/images","href":"/v3-api-reference/images/create-image"},{"title":"List image models","openapi":"get /v3/images/models","href":"/v3-api-reference/images/list-image-models"}]},{"group":"Audio","pages":[{"title":"Generate speech","openapi":"post /v3/audio/speech","href":"/v3-api-reference/audio/create-speech"},{"title":"Transcribe audio","openapi":"post /v3/audio/transcriptions","description":"Transcribe audio to text. By default runs synchronously and returns the transcript inline (200); `audio` accepts a `file_\u003cid>`, an https URL, or a base64 data-URI (max 25MB decoded). A `file_\u003cid>` or https URL that is an MP4 video may be up to 100MB: past 25MB its audio track alone is sent to the model, copied out without re-encoding, and that track has to fit the 25MB limit (a video with no audio track, or one whose track cannot be read, is a 400 that says so). Billing is by the audio's length either way. Set `stream: true` to receive the transcript live as Server-Sent Events (`transcript.text.delta` chunks then a final `transcript.text.done`, terminated by `data: [DONE]`) — supported on streaming models like `mistral/voxtral-mini-2602`, a 400 otherwise. Set `async: true` to run on the background worker and get a 202 with a status URL to poll instead — use it for long recordings that can exceed the synchronous timeout; it accepts the same `audio` sources (an inline data-URI is staged in Opper's storage in eu-north-1 and deleted when the worker starts the job) and lifts the decoded-audio cap to 100MB. A `file_\u003cid>` or https URL reaches the full 100MB; a data-URI is also bound by the 100 MiB request body limit, which with base64 overhead allows about 75MB of decoded audio. The result is deleted 24 hours after the job finishes, 1 hour on a zero-retention project, or earlier with DELETE /v3/artifacts/{id} (then the status URL answers 404); each status poll returns a fresh download link valid for 1 hour. `stream` and `async` are mutually exclusive. `model` and `audio` are required; `language` and `prompt` are passed through as hints; `diarize` requests speaker labels (400 on models without diarization support); everything in `parameters` is forwarded verbatim to the provider, and the keys each model takes are listed with descriptions under `params.stt.parameters` in GET /v3/models.","href":"/v3-api-reference/audio/create-transcription"},{"title":"Generate audio","openapi":"post /v3/audio/generations","href":"/v3-api-reference/audio/create-audio-generation"},{"title":"Upload a song","openapi":"post /v3/audio/songs","description":"Upload a project-owned file, public HTTPS URL or audio data URI to a model with audio_upload. Returns an opaque song id and optionally a composition plan. Charged by uploaded duration. Requires a nonzero project retention period. ElevenLabs has no public song deletion API; its upstream retention is unspecified.","href":"/v3-api-reference/audio/create-song"},{"title":"List songs","openapi":"get /v3/audio/songs","href":"/v3-api-reference/audio/list-songs"},{"title":"Get a song","openapi":"get /v3/audio/songs/{id}","href":"/v3-api-reference/audio/get-song"},{"title":"Delete a song reference","openapi":"delete /v3/audio/songs/{id}","href":"/v3-api-reference/audio/delete-song"},{"title":"List audio models","openapi":"get /v3/audio/models","href":"/v3-api-reference/audio/list-audio-models"},{"title":"Create Voice","openapi":"post /v3/audio/voices","href":"/v3-api-reference/audio/create-voice"},{"title":"List Voices","openapi":"get /v3/audio/voices","href":"/v3-api-reference/audio/list-voices"},{"title":"Get Voice","openapi":"get /v3/audio/voices/{id}","href":"/v3-api-reference/audio/get-voice"},{"title":"Delete Voice","openapi":"delete /v3/audio/voices/{id}","href":"/v3-api-reference/audio/delete-voice"}]},{"group":"Video","pages":[{"title":"Generate a video","openapi":"post /v3/videos","href":"/v3-api-reference/video/create-video"},{"title":"List video models","openapi":"get /v3/videos/models","href":"/v3-api-reference/video/list-video-models"}]},{"group":"Webhooks","pages":[{"title":"Get the webhook signing secret","openapi":"get /v3/webhooks/secret","href":"/v3-api-reference/webhooks/get-webhook-secret"},{"title":"Rotate the webhook signing secret","openapi":"post /v3/webhooks/secret/rotate","href":"/v3-api-reference/webhooks/rotate-webhook-secret"},{"title":"Get the webhook settings","openapi":"get /v3/webhooks/settings","href":"/v3-api-reference/webhooks/get-webhook-settings"},{"title":"Update the webhook settings","openapi":"patch /v3/webhooks/settings","href":"/v3-api-reference/webhooks/update-webhook-settings"},{"title":"Send a test webhook","openapi":"post /v3/webhooks/test","href":"/v3-api-reference/webhooks/test-webhook"}]},{"group":"Rerank","pages":[{"title":"Rerank documents","openapi":"post /v3/rerank","href":"/v3-api-reference/rerank/rerank-documents"}]},{"group":"OCR","pages":[{"title":"Extract text (OCR)","openapi":"post /v3/ocr","href":"/v3-api-reference/ocr/extract-text"},{"title":"List OCR models","openapi":"get /v3/ocr/models","href":"/v3-api-reference/ocr/list-ocr-models"}]}]},{"group":"Files","pages":[{"title":"Upload a file","openapi":"post /v3/files","href":"/v3-api-reference/files/upload-file"},{"title":"List files","openapi":"get /v3/files","href":"/v3-api-reference/files/list-files"},{"title":"Get file metadata","openapi":"get /v3/files/{id}","href":"/v3-api-reference/files/get-file"},{"title":"Get a file download URL","openapi":"get /v3/files/{id}/content","href":"/v3-api-reference/files/get-file-content"},{"title":"Set or clear a file's expiry","openapi":"patch /v3/files/{id}","href":"/v3-api-reference/files/update-file"},{"title":"Delete a file","openapi":"delete /v3/files/{id}","href":"/v3-api-reference/files/delete-file"}]},{"group":"Realtime","pages":[{"title":"Realtime protocol","href":"/v3-api-reference/realtime/protocol"},{"title":"Mint realtime ticket","href":"/v3-api-reference/realtime/create-realtime-session"}]},{"group":"Roundtable","pages":[{"openapi":"post /v3/roundtable","title":"Roundtable","href":"/v3-api-reference/roundtable/create-roundtable"}]},{"group":"Platform APIs","pages":[{"group":"Generations","pages":[{"openapi":"get /v3/generations","title":"List generations","href":"/v3-api-reference/generations/list-generations"},{"openapi":"get /v3/generations/{id}","title":"Get generation","href":"/v3-api-reference/generations/get-generation"},{"openapi":"delete /v3/generations/{id}","title":"Delete generation","href":"/v3-api-reference/generations/delete-generation"}]},{"group":"Management","pages":[{"openapi":"get /management/v1/projects","title":"List projects","href":"/v3-api-reference/management/list-projects"},{"openapi":"post /management/v1/projects","title":"Create a project","href":"/v3-api-reference/management/create-project"},{"openapi":"get /management/v1/projects/{uuid}","title":"Get a project","href":"/v3-api-reference/management/get-project"},{"openapi":"patch /management/v1/projects/{uuid}","title":"Update a project","href":"/v3-api-reference/management/update-project"},{"openapi":"delete /management/v1/projects/{uuid}","title":"Delete a project","href":"/v3-api-reference/management/delete-project"},{"openapi":"get /management/v1/projects/{uuid}/api-keys","title":"List a project's API keys","href":"/v3-api-reference/management/list-api-keys"},{"openapi":"post /management/v1/projects/{uuid}/api-keys","title":"Mint an API key","href":"/v3-api-reference/management/create-api-key"},{"openapi":"delete /management/v1/projects/{uuid}/api-keys/{id}","title":"Delete an API key","href":"/v3-api-reference/management/delete-api-key"},{"openapi":"get /management/v1/projects/{uuid}/webhook","title":"Get a project's webhook","href":"/v3-api-reference/management/get-project-webhook"},{"openapi":"patch /management/v1/projects/{uuid}/webhook","title":"Set or clear a project's webhook URL","href":"/v3-api-reference/management/update-project-webhook"},{"openapi":"get /management/v1/projects/{uuid}/webhook/secret","title":"Get a project's webhook signing secret","href":"/v3-api-reference/management/get-project-webhook-secret"},{"openapi":"post /management/v1/projects/{uuid}/webhook/secret/rotate","title":"Rotate a project's webhook signing secret","href":"/v3-api-reference/management/rotate-project-webhook-secret"},{"openapi":"post /management/v1/projects/{uuid}/webhook/test","title":"Send a test webhook for a project","href":"/v3-api-reference/management/test-project-webhook"},{"openapi":"get /management/v1/members","title":"List members","href":"/v3-api-reference/management/list-members"},{"openapi":"delete /management/v1/members/{user_uuid}","title":"Remove a member","href":"/v3-api-reference/management/remove-member"},{"openapi":"get /management/v1/invites","title":"List invitations","href":"/v3-api-reference/management/list-invites"},{"openapi":"post /management/v1/invites","title":"Invite a member","href":"/v3-api-reference/management/create-invite"},{"openapi":"delete /management/v1/invites/{id}","title":"Revoke an invitation","href":"/v3-api-reference/management/revoke-invite"},{"openapi":"get /management/v1/dynamic-routes","title":"List dynamic routes","href":"/v3-api-reference/management/list-dynamic-routes"},{"openapi":"post /management/v1/dynamic-routes","title":"Create a dynamic route","href":"/v3-api-reference/management/create-dynamic-route"},{"openapi":"get /management/v1/dynamic-routes/{name}","title":"Get a dynamic route","href":"/v3-api-reference/management/get-dynamic-route"},{"openapi":"put /management/v1/dynamic-routes/{name}/draft","title":"Replace the draft","href":"/v3-api-reference/management/update-dynamic-route-draft"},{"openapi":"post /management/v1/dynamic-routes/{name}/deploy","title":"Deploy the draft","href":"/v3-api-reference/management/deploy-dynamic-route"},{"openapi":"post /management/v1/dynamic-routes/{name}/simulate","title":"Simulate a request through the route","href":"/v3-api-reference/management/simulate-dynamic-route"},{"openapi":"get /management/v1/dynamic-routes/{name}/versions","title":"List a route's versions","href":"/v3-api-reference/management/list-dynamic-route-versions"},{"openapi":"get /management/v1/dynamic-routes/{name}/versions/{version_number}","title":"Get a version","href":"/v3-api-reference/management/get-dynamic-route-version"},{"openapi":"post /management/v1/dynamic-routes/{name}/versions/{version_number}/rollback","title":"Roll back to a version","href":"/v3-api-reference/management/rollback-dynamic-route"},{"openapi":"post /management/v1/dynamic-routes/{name}/versions/{version_number}/restore-to-draft","title":"Copy a version into the draft","href":"/v3-api-reference/management/restore-dynamic-route-version-to-draft"},{"openapi":"delete /management/v1/dynamic-routes/{name}","title":"Delete a dynamic route","href":"/v3-api-reference/management/delete-dynamic-route"},{"openapi":"get /management/v1/controls/rules","title":"List control rules","href":"/v3-api-reference/management/list-control-rules"},{"openapi":"post /management/v1/controls/rules","title":"Create a control rule","href":"/v3-api-reference/management/create-control-rule"},{"openapi":"patch /management/v1/controls/rules/{uuid}","title":"Update a control rule","href":"/v3-api-reference/management/update-control-rule"},{"openapi":"delete /management/v1/controls/rules/{uuid}","title":"Delete a control rule","href":"/v3-api-reference/management/delete-control-rule"},{"openapi":"get /management/v1/usage","title":"Get usage and cost","href":"/v3-api-reference/management/get-usage"},{"openapi":"post /management/v1/management-keys/_self/disable","title":"Disable the calling management key","href":"/v3-api-reference/management/disable-management-key"}]},{"group":"Models","pages":[{"openapi":"get /v3/models","title":"List models","href":"/v3-api-reference/models/list-models"}]},{"group":"Spans","pages":[{"openapi":"post /v3/spans","title":"Create span","href":"/v3-api-reference/spans/create-span"},{"openapi":"patch /v3/spans/{id}","title":"Update span","href":"/v3-api-reference/spans/update-span"}]},{"group":"Tools","pages":[{"openapi":"post /v3/tools/web/fetch","title":"Web fetch","href":"/v3-api-reference/tools/web-fetch"},{"openapi":"post /v3/tools/web/search","title":"Web search","href":"/v3-api-reference/tools/web-search"}]},{"group":"System","pages":[{"openapi":"get /health","title":"Health check","href":"/v3-api-reference/system/health-check"},{"openapi":"get /v3/openapi.json","title":"OpenAPI spec (JSON)","href":"/v3-api-reference/system/openapi-spec-json"},{"openapi":"get /v3/openapi.yaml","title":"OpenAPI spec (YAML)","href":"/v3-api-reference/system/openapi-spec-yaml"}]}]}]}]},"basePath":"","title":"Generate audio - Opper","deploymentId":"dpl_Bzhd2vEuuXmvNaTmqBBYbeBj3epG","buildId":"dpl_Bzhd2vEuuXmvNaTmqBBYbeBj3epG","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BjA2hsCJ.js","snippetPresets-C-jpv5v8.js","utils--9e24gKv.js","style-to-object-BY3JEAdk.js","utils-CL8e03UA.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-O60MhfkU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C2_HxuTC.js","_Uint8Array-CSzKbEgF.js","isObject-FP1Yky1u.js","ApiExamples-DrqwMm0N.js","usePlaygroundInputsStore-HwhVROcI.js","shallow-CE0cbB33.js","isEqual-XgMGHHxA.js","CodeSnippets-DeoWIzOC.js","CodeSnippet-nteBoAUV.js","use-playground-group-access-YOcO7c2y.js","Page-B_BHXdim.js","api-description-markdown-CQA9NkQd.js","DynamicMarkdown-DpB7I7uN.js","SectionHeading-CW6J1gzG.js","MethodPill-CaKMlCid.js","getPastedJson-Dkd8F-mU.js","Check2Icon-DLlJR2en.js","axios-CsQoIw0U.js","Markdown-CaF3VJGb.js","AssistantPageLink-DXtHv8Vo.js","dist-BGepIklc.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}