[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-elevenlabs-music":3,"mdc-78ieq3-key":39,"related-org-elevenlabs-music":5534,"related-repo-elevenlabs-music":5642},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":34,"sourceUrl":37,"mdContent":38},"music","generate music with ElevenLabs","Generate music using ElevenLabs Music API. Use when creating instrumental tracks, songs with lyrics, background music, jingles, or any AI-generated music composition. Supports prompt-based generation, composition plans for granular control, and detailed output with metadata.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"elevenlabs","ElevenLabs","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Felevenlabs.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Creative","creative","tag",{"name":17,"slug":18,"type":15},"AI Infrastructure","ai-infrastructure",{"name":20,"slug":21,"type":15},"Audio","audio",{"name":9,"slug":8,"type":15},374,"https:\u002F\u002Fgithub.com\u002Felevenlabs\u002Fskills","2026-07-24T05:40:08.812767","MIT",48,[29,8,4,30,31,32,33],"ai-agents","sfx","skills","stt","tts",{"repoUrl":24,"stars":23,"forks":27,"topics":35,"description":36},[29,8,4,30,31,32,33],"Collections of skills for building with ElevenLabs","https:\u002F\u002Fgithub.com\u002Felevenlabs\u002Fskills\u002Ftree\u002FHEAD\u002Fmusic","---\nname: music\ndescription: Generate music using ElevenLabs Music API. Use when creating instrumental tracks, songs with lyrics, background music, jingles, or any AI-generated music composition. Supports prompt-based generation, composition plans for granular control, and detailed output with metadata.\nlicense: MIT\ncompatibility: Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).\nmetadata: {\"openclaw\": {\"requires\": {\"env\": [\"ELEVENLABS_API_KEY\"]}, \"primaryEnv\": \"ELEVENLABS_API_KEY\"}}\n---\n\n# ElevenLabs Music Generation\n\nGenerate music from text prompts - supports instrumental tracks, songs with lyrics, and fine-grained control via composition plans.\n\n> **Setup:** See [Installation Guide](references\u002Finstallation.md). For JavaScript, use `@elevenlabs\u002F*` packages only.\n\nAll examples below default to `music_v2`, the current generation model. Pass `model_id=\"music_v1\"` only when explicitly requested to.\n\n## Quick Start\n\n### Python\n\n```python\nfrom elevenlabs import ElevenLabs\n\nclient = ElevenLabs()\n\naudio = client.music.compose(\n    prompt=\"A chill lo-fi hip hop beat with jazzy piano chords\",\n    music_length_ms=30000,\n    model_id=\"music_v2\",\n)\n\nwith open(\"output.mp3\", \"wb\") as f:\n    for chunk in audio:\n        f.write(chunk)\n```\n\n### TypeScript\n\n```typescript\nimport { ElevenLabsClient } from \"@elevenlabs\u002Felevenlabs-js\";\nimport { createWriteStream } from \"fs\";\n\nconst client = new ElevenLabsClient();\nconst audio = await client.music.compose({\n  prompt: \"A chill lo-fi hip hop beat with jazzy piano chords\",\n  musicLengthMs: 30000,\n  modelId: \"music_v2\",\n});\naudio.pipe(createWriteStream(\"output.mp3\"));\n```\n\n### cURL\n\n```bash\ncurl -X POST \"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\" \\\n  -H \"xi-api-key: $ELEVENLABS_API_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"prompt\": \"A chill lo-fi beat\", \"music_length_ms\": 30000, \"model_id\": \"music_v2\"}' \\\n  --output output.mp3\n```\n\n## Methods\n\n| Method | Description |\n|--------|-------------|\n| `music.compose` | Generate audio from a prompt or composition plan |\n| `music.stream` | Stream audio chunks as they are generated (paid plans) |\n| `music.composition_plan.create` | Generate a structured plan for fine-grained control |\n| `music.compose_detailed` | Generate audio + composition plan + metadata; pass `store_for_inpainting=True` to enable inpainting |\n| `music.compose_detailed_stream` | Stream audio plus composition plan, metadata, and optional word timestamps as Server-Sent Events |\n| `music.video_to_music` | Generate background music from one or more uploaded video files |\n| `music.upload` | Upload an audio file for later inpainting workflows, optionally extracting its composition plan or word-level timestamps |\n| `music.finetunes.list` | List accessible music finetunes |\n| `music.finetunes.create` | Train a music finetune from uploaded audio |\n| `music.finetunes.get` | Retrieve finetune status and metadata |\n| `music.finetunes.update` | Update finetune metadata or visibility |\n| `music.finetunes.delete` | Delete a music finetune |\n\nSee [API Reference](references\u002Fapi_reference.md) for full parameter details.\n\n`music.upload` is available to enterprise clients with access to the inpainting feature.\n\n## Music Finetunes\n\nCreate a finetune from training audio with\n[`POST \u002Fv1\u002Fmusic\u002Ffinetunes`](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fcreate),\nthen poll the [get endpoint](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fget) until\nits status is `completed`. Pass the returned `id` as `finetune_id` when composing music.\n\nUse the [list](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Flist),\n[update](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fupdate), and\n[delete](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fdelete) endpoints to manage\naccessible finetunes.\n\n## Video to Music\n\nGenerate background music from uploaded video clips via\n[`POST \u002Fv1\u002Fmusic\u002Fvideo-to-music`](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Fvideo-to-music)\n(`client.music.video_to_music`). This is separate from prompt-based\n[`music.compose`](https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Fcompose) (`POST \u002Fv1\u002Fmusic`).\n\nThe API combines videos in order, accepts an optional natural-language description, and lets you\nsteer style with up to 10 tags such as `upbeat` or `cinematic`. This endpoint still defaults to\n`music_v1`; pass `model_id=\"music_v2\"` to use the newer model.\n\n### Python\n\n```python\nfrom elevenlabs import ElevenLabs\n\nclient = ElevenLabs()\n\naudio = client.music.video_to_music(\n    videos=[\"trailer.mp4\"],\n    description=\"Build suspense, then resolve with a warm cinematic finish.\",\n    tags=[\"cinematic\", \"suspenseful\", \"uplifting\"],\n    model_id=\"music_v2\",\n)\n\nwith open(\"video-score.mp3\", \"wb\") as f:\n    for chunk in audio:\n        f.write(chunk)\n```\n\n### TypeScript\n\n```typescript\nimport { ElevenLabsClient } from \"@elevenlabs\u002Felevenlabs-js\";\nimport { createReadStream, createWriteStream } from \"fs\";\n\nconst client = new ElevenLabsClient();\n\nconst audio = await client.music.videoToMusic({\n  videos: [createReadStream(\"trailer.mp4\")],\n  description: \"Build suspense, then resolve with a warm cinematic finish.\",\n  tags: [\"cinematic\", \"suspenseful\", \"uplifting\"],\n  modelId: \"music_v2\",\n});\n\naudio.pipe(createWriteStream(\"video-score.mp3\"));\n```\n\n### cURL\n\n```bash\ncurl -X POST \"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\u002Fvideo-to-music\" \\\n  -H \"xi-api-key: $ELEVENLABS_API_KEY\" \\\n  -F \"videos=@trailer.mp4\" \\\n  -F \"description=Build suspense, then resolve with a warm cinematic finish.\" \\\n  -F \"tags=cinematic\" \\\n  -F \"tags=suspenseful\" \\\n  -F \"tags=uplifting\" \\\n  -F \"model_id=music_v2\" \\\n  --output video-score.mp3\n```\n\nConstraints from the current API schema:\n\n- Upload 1-10 video files per request\n- Keep total combined upload size at or below 200 MB\n- Keep total combined video duration at or below 600 seconds\n- Use `description` for high-level musical direction and `tags` for concise style cues\n\n## Composition Plans\n\n`music_v2` composition plans are an ordered list of `chunks`. Each chunk specifies its own\n`text` (section label, lyrics, inline cues), `duration_ms`, `positive_styles`, `negative_styles`,\nand `context_adherence` (`low`, `medium`, or `high`, default `high`). Up to 30 chunks per plan,\neach 3,000–120,000 ms, total length 3 s to 10 minutes.\n\nGenerate a plan first, edit it, then compose:\n\n```python\nplan = client.music.composition_plan.create(\n    prompt=\"An epic orchestral piece building to a climax\",\n    music_length_ms=60000,\n    model_id=\"music_v2\",\n)\n\n# Edit chunks in place\nplan[\"chunks\"][0][\"text\"] = \"[Intro]\\nQuiet strings rising\"\n\naudio = client.music.compose(\n    composition_plan=plan,\n    model_id=\"music_v2\",\n)\n```\n\n```typescript\nconst plan = await client.music.compositionPlan.create({\n  prompt: \"An epic orchestral piece building to a climax\",\n  musicLengthMs: 60000,\n  modelId: \"music_v2\",\n});\n\nplan.chunks[0].text = \"[Intro]\\nQuiet strings rising\";\n\nconst audio = await client.music.compose({\n  compositionPlan: plan,\n  modelId: \"music_v2\",\n});\n```\n\nOr hand-build a plan to control lyrics and style per section:\n\n```python\ncomposition_plan = {\n    \"chunks\": [\n        {\n            \"text\": \"[Verse]\\nWalking down an empty street\",\n            \"duration_ms\": 15000,\n            \"positive_styles\": [\"pop\", \"upbeat\", \"female vocals\", \"acoustic guitar\"],\n            \"negative_styles\": [\"dark\", \"slow\"],\n            \"context_adherence\": \"high\",\n        },\n        {\n            \"text\": \"[Chorus]\\nThis is my moment\",\n            \"duration_ms\": 15000,\n            \"positive_styles\": [\"powerful vocals\", \"full band\"],\n            \"negative_styles\": [],\n            \"context_adherence\": \"high\",\n        },\n    ]\n}\n\naudio = client.music.compose(composition_plan=composition_plan, model_id=\"music_v2\")\n```\n\n```typescript\nconst compositionPlan = {\n  chunks: [\n    {\n      text: \"[Verse]\\nWalking down an empty street\",\n      durationMs: 15000,\n      positiveStyles: [\"pop\", \"upbeat\", \"female vocals\", \"acoustic guitar\"],\n      negativeStyles: [\"dark\", \"slow\"],\n      contextAdherence: \"high\",\n    },\n    {\n      text: \"[Chorus]\\nThis is my moment\",\n      durationMs: 15000,\n      positiveStyles: [\"powerful vocals\", \"full band\"],\n      negativeStyles: [],\n      contextAdherence: \"high\",\n    },\n  ],\n};\n\nconst audio = await client.music.compose({\n  compositionPlan,\n  modelId: \"music_v2\",\n});\n```\n\nPut broader characteristics (genre, instrumentation, vocal style) in `positive_styles`, not in\n`text`. The first chunk's styles set the overall tone — include 6–7 styles there.\n\n## Output Formats\n\nUse the `output_format` query parameter on compose, detailed compose, or stream requests to select\nthe generated audio format. `auto` chooses a model-appropriate MP3 format; for `music_v2`, it\nselects `mp3_48000_192`. Higher-bitrate MP3 options include `mp3_48000_240` and `mp3_48000_320`.\n\n## Streaming\n\nFor paid plans, stream audio chunks as they are generated instead of waiting for the full file:\n\n```python\nfrom io import BytesIO\n\nstream = client.music.stream(\n    prompt=\"A driving synthwave track with arpeggiated leads\",\n    music_length_ms=30000,\n    model_id=\"music_v2\",\n)\n\nbuffer = BytesIO()\nfor chunk in stream:\n    if chunk:\n        buffer.write(chunk)\n```\n\n```typescript\nconst stream = await client.music.stream({\n  prompt: \"A driving synthwave track with arpeggiated leads\",\n  musicLengthMs: 30000,\n  modelId: \"music_v2\",\n});\n\nconst chunks: Buffer[] = [];\nfor await (const chunk of stream) {\n  chunks.push(chunk);\n}\n```\n\n### Detailed streaming\n\nUse detailed streaming when the application needs generated music metadata while audio is still\narriving. `POST \u002Fv1\u002Fmusic\u002Fdetailed\u002Fstream` accepts the same prompt or composition-plan body as\ndetailed compose, streams `text\u002Fevent-stream`, and can include word timestamps with\n`with_timestamps`.\n\n```bash\ncurl -N -X POST \"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\u002Fdetailed\u002Fstream?output_format=auto\" \\\n  -H \"xi-api-key: $ELEVENLABS_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"prompt\": \"A bright indie pop hook with warm guitars\", \"music_length_ms\": 30000, \"model_id\": \"music_v2\", \"with_timestamps\": true}'\n```\n\n## Inpainting\n\nInpainting edits or extends a stored song by mixing **audio reference chunks** (unchanged slices\nof a stored song) with new **generation chunks** in a single composition plan. \n\nStep 1 — get a `song_id`, either by storing a fresh generation or uploading existing audio:\n\n```python\n# Option A: keep a generation for later editing\nresult = client.music.compose_detailed(\n    prompt=\"An upbeat pop song with verse and chorus\",\n    music_length_ms=60000,\n    model_id=\"music_v2\",\n    store_for_inpainting=True,\n)\nsong_id = result.song_id\n\n# Option B: upload an existing track and extract its plan\nuploaded = client.music.upload(\n    file=open(\"my-song.mp3\", \"rb\"),\n    extract_composition_plan=\"music_v2\",\n)\nsong_id = uploaded.song_id\ncomposition_plan = uploaded.composition_plan\n```\n\n```typescript\nimport { createReadStream } from \"fs\";\n\n\u002F\u002F Option A: keep a generation for later editing\nconst result = await client.music.composeDetailed({\n  prompt: \"An upbeat pop song with verse and chorus\",\n  musicLengthMs: 60000,\n  modelId: \"music_v2\",\n  storeForInpainting: true,\n});\nlet songId = result.songId;\n\n\u002F\u002F Option B: upload an existing track and extract its plan\nconst uploaded = await client.music.upload({\n  file: createReadStream(\"my-song.mp3\"),\n  extractCompositionPlan: \"music_v2\",\n});\nsongId = uploaded.songId;\nconst compositionPlan = uploaded.compositionPlan;\n```\n\nStep 2 — compose a plan that references the stored audio and regenerates the part you want to\nchange:\n\n```python\nplan = {\n    \"chunks\": [\n        {\"song_id\": song_id, \"range\": {\"start_ms\": 0, \"end_ms\": 30000}},\n        {\n            \"text\": \"[Chorus]\\nWe're rising up tonight\",\n            \"duration_ms\": 30000,\n            \"positive_styles\": [\"bigger drums\", \"layered vocals\", \"anthemic\"],\n            \"negative_styles\": [\"sparse\"],\n            \"context_adherence\": \"high\",\n        },\n    ]\n}\n\naudio = client.music.compose(composition_plan=plan, model_id=\"music_v2\")\n```\n\n```typescript\nconst plan = {\n  chunks: [\n    { songId, range: { startMs: 0, endMs: 30000 } },\n    {\n      text: \"[Chorus]\\nWe're rising up tonight\",\n      durationMs: 30000,\n      positiveStyles: [\"bigger drums\", \"layered vocals\", \"anthemic\"],\n      negativeStyles: [\"sparse\"],\n      contextAdherence: \"high\",\n    },\n  ],\n};\n\nconst audio = await client.music.compose({\n  compositionPlan: plan,\n  modelId: \"music_v2\",\n});\n```\n\nTo match the feel of a stored slice without copying it, attach a `conditioning_ref` (up to\n30,000 ms) plus a `condition_strength` of `low`, `medium`, `high`, or `xhigh` to a generation\nchunk. Conditioning placed on the first chunk influences every later chunk.\n\nSee [API Reference](references\u002Fapi_reference.md) for the full inpainting parameter list.\n\n## Content Restrictions\n\n- Cannot reference specific artists, bands, or copyrighted lyrics\n- `bad_prompt` errors include a `prompt_suggestion` with alternative phrasing\n- `bad_composition_plan` errors include a `composition_plan_suggestion`\n\n## Error Handling\n\n```python\ntry:\n    audio = client.music.compose(prompt=\"...\", music_length_ms=30000)\nexcept Exception as e:\n    print(f\"API error: {e}\")\n```\n\n```typescript\ntry {\n  const audio = await client.music.compose({\n    prompt: \"...\",\n    musicLengthMs: 30000,\n  });\n} catch (err) {\n  console.error(\"API error:\", err);\n}\n```\n\nCommon errors: 401 (invalid key), 422 (invalid params), 429 (rate limit).\n\n## References\n\n- [Installation Guide](references\u002Finstallation.md)\n- [API Reference](references\u002Fapi_reference.md)\n",{"data":40,"body":47},{"name":4,"description":6,"license":26,"compatibility":41,"metadata":42},"Requires internet access and an ElevenLabs API key (ELEVENLABS_API_KEY).",{"openclaw":43},{"requires":44,"primaryEnv":46},{"env":45},[46],"ELEVENLABS_API_KEY",{"type":48,"children":49},"root",[50,59,65,98,119,126,133,261,267,617,623,756,762,1002,1015,1025,1031,1083,1114,1120,1166,1203,1208,1319,1324,1757,1762,1985,1990,2031,2037,2122,2127,2231,2576,2581,2749,3338,3357,3363,3413,3419,3424,3522,3791,3797,3825,3940,3946,3965,3978,4108,4573,4578,4690,5136,5183,5193,5199,5242,5248,5287,5500,5505,5511,5528],{"type":51,"tag":52,"props":53,"children":55},"element","h1",{"id":54},"elevenlabs-music-generation",[56],{"type":57,"value":58},"text","ElevenLabs Music Generation",{"type":51,"tag":60,"props":61,"children":62},"p",{},[63],{"type":57,"value":64},"Generate music from text prompts - supports instrumental tracks, songs with lyrics, and fine-grained control via composition plans.",{"type":51,"tag":66,"props":67,"children":68},"blockquote",{},[69],{"type":51,"tag":60,"props":70,"children":71},{},[72,78,80,87,89,96],{"type":51,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":57,"value":77},"Setup:",{"type":57,"value":79}," See ",{"type":51,"tag":81,"props":82,"children":84},"a",{"href":83},"references\u002Finstallation.md",[85],{"type":57,"value":86},"Installation Guide",{"type":57,"value":88},". For JavaScript, use ",{"type":51,"tag":90,"props":91,"children":93},"code",{"className":92},[],[94],{"type":57,"value":95},"@elevenlabs\u002F*",{"type":57,"value":97}," packages only.",{"type":51,"tag":60,"props":99,"children":100},{},[101,103,109,111,117],{"type":57,"value":102},"All examples below default to ",{"type":51,"tag":90,"props":104,"children":106},{"className":105},[],[107],{"type":57,"value":108},"music_v2",{"type":57,"value":110},", the current generation model. Pass ",{"type":51,"tag":90,"props":112,"children":114},{"className":113},[],[115],{"type":57,"value":116},"model_id=\"music_v1\"",{"type":57,"value":118}," only when explicitly requested to.",{"type":51,"tag":120,"props":121,"children":123},"h2",{"id":122},"quick-start",[124],{"type":57,"value":125},"Quick Start",{"type":51,"tag":127,"props":128,"children":130},"h3",{"id":129},"python",[131],{"type":57,"value":132},"Python",{"type":51,"tag":134,"props":135,"children":139},"pre",{"className":136,"code":137,"language":129,"meta":138,"style":138},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from elevenlabs import ElevenLabs\n\nclient = ElevenLabs()\n\naudio = client.music.compose(\n    prompt=\"A chill lo-fi hip hop beat with jazzy piano chords\",\n    music_length_ms=30000,\n    model_id=\"music_v2\",\n)\n\nwith open(\"output.mp3\", \"wb\") as f:\n    for chunk in audio:\n        f.write(chunk)\n","",[140],{"type":51,"tag":90,"props":141,"children":142},{"__ignoreMap":138},[143,154,164,173,181,190,199,208,217,226,234,243,252],{"type":51,"tag":144,"props":145,"children":148},"span",{"class":146,"line":147},"line",1,[149],{"type":51,"tag":144,"props":150,"children":151},{},[152],{"type":57,"value":153},"from elevenlabs import ElevenLabs\n",{"type":51,"tag":144,"props":155,"children":157},{"class":146,"line":156},2,[158],{"type":51,"tag":144,"props":159,"children":161},{"emptyLinePlaceholder":160},true,[162],{"type":57,"value":163},"\n",{"type":51,"tag":144,"props":165,"children":167},{"class":146,"line":166},3,[168],{"type":51,"tag":144,"props":169,"children":170},{},[171],{"type":57,"value":172},"client = ElevenLabs()\n",{"type":51,"tag":144,"props":174,"children":176},{"class":146,"line":175},4,[177],{"type":51,"tag":144,"props":178,"children":179},{"emptyLinePlaceholder":160},[180],{"type":57,"value":163},{"type":51,"tag":144,"props":182,"children":184},{"class":146,"line":183},5,[185],{"type":51,"tag":144,"props":186,"children":187},{},[188],{"type":57,"value":189},"audio = client.music.compose(\n",{"type":51,"tag":144,"props":191,"children":193},{"class":146,"line":192},6,[194],{"type":51,"tag":144,"props":195,"children":196},{},[197],{"type":57,"value":198},"    prompt=\"A chill lo-fi hip hop beat with jazzy piano chords\",\n",{"type":51,"tag":144,"props":200,"children":202},{"class":146,"line":201},7,[203],{"type":51,"tag":144,"props":204,"children":205},{},[206],{"type":57,"value":207},"    music_length_ms=30000,\n",{"type":51,"tag":144,"props":209,"children":211},{"class":146,"line":210},8,[212],{"type":51,"tag":144,"props":213,"children":214},{},[215],{"type":57,"value":216},"    model_id=\"music_v2\",\n",{"type":51,"tag":144,"props":218,"children":220},{"class":146,"line":219},9,[221],{"type":51,"tag":144,"props":222,"children":223},{},[224],{"type":57,"value":225},")\n",{"type":51,"tag":144,"props":227,"children":229},{"class":146,"line":228},10,[230],{"type":51,"tag":144,"props":231,"children":232},{"emptyLinePlaceholder":160},[233],{"type":57,"value":163},{"type":51,"tag":144,"props":235,"children":237},{"class":146,"line":236},11,[238],{"type":51,"tag":144,"props":239,"children":240},{},[241],{"type":57,"value":242},"with open(\"output.mp3\", \"wb\") as f:\n",{"type":51,"tag":144,"props":244,"children":246},{"class":146,"line":245},12,[247],{"type":51,"tag":144,"props":248,"children":249},{},[250],{"type":57,"value":251},"    for chunk in audio:\n",{"type":51,"tag":144,"props":253,"children":255},{"class":146,"line":254},13,[256],{"type":51,"tag":144,"props":257,"children":258},{},[259],{"type":57,"value":260},"        f.write(chunk)\n",{"type":51,"tag":127,"props":262,"children":264},{"id":263},"typescript",[265],{"type":57,"value":266},"TypeScript",{"type":51,"tag":134,"props":268,"children":271},{"className":269,"code":270,"language":263,"meta":138,"style":138},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { ElevenLabsClient } from \"@elevenlabs\u002Felevenlabs-js\";\nimport { createWriteStream } from \"fs\";\n\nconst client = new ElevenLabsClient();\nconst audio = await client.music.compose({\n  prompt: \"A chill lo-fi hip hop beat with jazzy piano chords\",\n  musicLengthMs: 30000,\n  modelId: \"music_v2\",\n});\naudio.pipe(createWriteStream(\"output.mp3\"));\n",[272],{"type":51,"tag":90,"props":273,"children":274},{"__ignoreMap":138},[275,327,368,375,413,467,499,521,549,566],{"type":51,"tag":144,"props":276,"children":277},{"class":146,"line":147},[278,284,290,296,301,306,311,317,322],{"type":51,"tag":144,"props":279,"children":281},{"style":280},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[282],{"type":57,"value":283},"import",{"type":51,"tag":144,"props":285,"children":287},{"style":286},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[288],{"type":57,"value":289}," {",{"type":51,"tag":144,"props":291,"children":293},{"style":292},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[294],{"type":57,"value":295}," ElevenLabsClient",{"type":51,"tag":144,"props":297,"children":298},{"style":286},[299],{"type":57,"value":300}," }",{"type":51,"tag":144,"props":302,"children":303},{"style":280},[304],{"type":57,"value":305}," from",{"type":51,"tag":144,"props":307,"children":308},{"style":286},[309],{"type":57,"value":310}," \"",{"type":51,"tag":144,"props":312,"children":314},{"style":313},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[315],{"type":57,"value":316},"@elevenlabs\u002Felevenlabs-js",{"type":51,"tag":144,"props":318,"children":319},{"style":286},[320],{"type":57,"value":321},"\"",{"type":51,"tag":144,"props":323,"children":324},{"style":286},[325],{"type":57,"value":326},";\n",{"type":51,"tag":144,"props":328,"children":329},{"class":146,"line":156},[330,334,338,343,347,351,355,360,364],{"type":51,"tag":144,"props":331,"children":332},{"style":280},[333],{"type":57,"value":283},{"type":51,"tag":144,"props":335,"children":336},{"style":286},[337],{"type":57,"value":289},{"type":51,"tag":144,"props":339,"children":340},{"style":292},[341],{"type":57,"value":342}," createWriteStream",{"type":51,"tag":144,"props":344,"children":345},{"style":286},[346],{"type":57,"value":300},{"type":51,"tag":144,"props":348,"children":349},{"style":280},[350],{"type":57,"value":305},{"type":51,"tag":144,"props":352,"children":353},{"style":286},[354],{"type":57,"value":310},{"type":51,"tag":144,"props":356,"children":357},{"style":313},[358],{"type":57,"value":359},"fs",{"type":51,"tag":144,"props":361,"children":362},{"style":286},[363],{"type":57,"value":321},{"type":51,"tag":144,"props":365,"children":366},{"style":286},[367],{"type":57,"value":326},{"type":51,"tag":144,"props":369,"children":370},{"class":146,"line":166},[371],{"type":51,"tag":144,"props":372,"children":373},{"emptyLinePlaceholder":160},[374],{"type":57,"value":163},{"type":51,"tag":144,"props":376,"children":377},{"class":146,"line":175},[378,384,389,394,399,404,409],{"type":51,"tag":144,"props":379,"children":381},{"style":380},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[382],{"type":57,"value":383},"const",{"type":51,"tag":144,"props":385,"children":386},{"style":292},[387],{"type":57,"value":388}," client ",{"type":51,"tag":144,"props":390,"children":391},{"style":286},[392],{"type":57,"value":393},"=",{"type":51,"tag":144,"props":395,"children":396},{"style":286},[397],{"type":57,"value":398}," new",{"type":51,"tag":144,"props":400,"children":402},{"style":401},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[403],{"type":57,"value":295},{"type":51,"tag":144,"props":405,"children":406},{"style":292},[407],{"type":57,"value":408},"()",{"type":51,"tag":144,"props":410,"children":411},{"style":286},[412],{"type":57,"value":326},{"type":51,"tag":144,"props":414,"children":415},{"class":146,"line":183},[416,420,425,429,434,439,444,448,452,457,462],{"type":51,"tag":144,"props":417,"children":418},{"style":380},[419],{"type":57,"value":383},{"type":51,"tag":144,"props":421,"children":422},{"style":292},[423],{"type":57,"value":424}," audio ",{"type":51,"tag":144,"props":426,"children":427},{"style":286},[428],{"type":57,"value":393},{"type":51,"tag":144,"props":430,"children":431},{"style":280},[432],{"type":57,"value":433}," await",{"type":51,"tag":144,"props":435,"children":436},{"style":292},[437],{"type":57,"value":438}," client",{"type":51,"tag":144,"props":440,"children":441},{"style":286},[442],{"type":57,"value":443},".",{"type":51,"tag":144,"props":445,"children":446},{"style":292},[447],{"type":57,"value":4},{"type":51,"tag":144,"props":449,"children":450},{"style":286},[451],{"type":57,"value":443},{"type":51,"tag":144,"props":453,"children":454},{"style":401},[455],{"type":57,"value":456},"compose",{"type":51,"tag":144,"props":458,"children":459},{"style":292},[460],{"type":57,"value":461},"(",{"type":51,"tag":144,"props":463,"children":464},{"style":286},[465],{"type":57,"value":466},"{\n",{"type":51,"tag":144,"props":468,"children":469},{"class":146,"line":192},[470,476,481,485,490,494],{"type":51,"tag":144,"props":471,"children":473},{"style":472},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[474],{"type":57,"value":475},"  prompt",{"type":51,"tag":144,"props":477,"children":478},{"style":286},[479],{"type":57,"value":480},":",{"type":51,"tag":144,"props":482,"children":483},{"style":286},[484],{"type":57,"value":310},{"type":51,"tag":144,"props":486,"children":487},{"style":313},[488],{"type":57,"value":489},"A chill lo-fi hip hop beat with jazzy piano chords",{"type":51,"tag":144,"props":491,"children":492},{"style":286},[493],{"type":57,"value":321},{"type":51,"tag":144,"props":495,"children":496},{"style":286},[497],{"type":57,"value":498},",\n",{"type":51,"tag":144,"props":500,"children":501},{"class":146,"line":201},[502,507,511,517],{"type":51,"tag":144,"props":503,"children":504},{"style":472},[505],{"type":57,"value":506},"  musicLengthMs",{"type":51,"tag":144,"props":508,"children":509},{"style":286},[510],{"type":57,"value":480},{"type":51,"tag":144,"props":512,"children":514},{"style":513},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[515],{"type":57,"value":516}," 30000",{"type":51,"tag":144,"props":518,"children":519},{"style":286},[520],{"type":57,"value":498},{"type":51,"tag":144,"props":522,"children":523},{"class":146,"line":210},[524,529,533,537,541,545],{"type":51,"tag":144,"props":525,"children":526},{"style":472},[527],{"type":57,"value":528},"  modelId",{"type":51,"tag":144,"props":530,"children":531},{"style":286},[532],{"type":57,"value":480},{"type":51,"tag":144,"props":534,"children":535},{"style":286},[536],{"type":57,"value":310},{"type":51,"tag":144,"props":538,"children":539},{"style":313},[540],{"type":57,"value":108},{"type":51,"tag":144,"props":542,"children":543},{"style":286},[544],{"type":57,"value":321},{"type":51,"tag":144,"props":546,"children":547},{"style":286},[548],{"type":57,"value":498},{"type":51,"tag":144,"props":550,"children":551},{"class":146,"line":219},[552,557,562],{"type":51,"tag":144,"props":553,"children":554},{"style":286},[555],{"type":57,"value":556},"}",{"type":51,"tag":144,"props":558,"children":559},{"style":292},[560],{"type":57,"value":561},")",{"type":51,"tag":144,"props":563,"children":564},{"style":286},[565],{"type":57,"value":326},{"type":51,"tag":144,"props":567,"children":568},{"class":146,"line":228},[569,573,577,582,586,591,595,599,604,608,613],{"type":51,"tag":144,"props":570,"children":571},{"style":292},[572],{"type":57,"value":21},{"type":51,"tag":144,"props":574,"children":575},{"style":286},[576],{"type":57,"value":443},{"type":51,"tag":144,"props":578,"children":579},{"style":401},[580],{"type":57,"value":581},"pipe",{"type":51,"tag":144,"props":583,"children":584},{"style":292},[585],{"type":57,"value":461},{"type":51,"tag":144,"props":587,"children":588},{"style":401},[589],{"type":57,"value":590},"createWriteStream",{"type":51,"tag":144,"props":592,"children":593},{"style":292},[594],{"type":57,"value":461},{"type":51,"tag":144,"props":596,"children":597},{"style":286},[598],{"type":57,"value":321},{"type":51,"tag":144,"props":600,"children":601},{"style":313},[602],{"type":57,"value":603},"output.mp3",{"type":51,"tag":144,"props":605,"children":606},{"style":286},[607],{"type":57,"value":321},{"type":51,"tag":144,"props":609,"children":610},{"style":292},[611],{"type":57,"value":612},"))",{"type":51,"tag":144,"props":614,"children":615},{"style":286},[616],{"type":57,"value":326},{"type":51,"tag":127,"props":618,"children":620},{"id":619},"curl",[621],{"type":57,"value":622},"cURL",{"type":51,"tag":134,"props":624,"children":628},{"className":625,"code":626,"language":627,"meta":138,"style":138},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST \"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\" \\\n  -H \"xi-api-key: $ELEVENLABS_API_KEY\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"prompt\": \"A chill lo-fi beat\", \"music_length_ms\": 30000, \"model_id\": \"music_v2\"}' \\\n  --output output.mp3\n","bash",[629],{"type":51,"tag":90,"props":630,"children":631},{"__ignoreMap":138},[632,668,716,743],{"type":51,"tag":144,"props":633,"children":634},{"class":146,"line":147},[635,640,645,650,654,659,663],{"type":51,"tag":144,"props":636,"children":638},{"style":637},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[639],{"type":57,"value":619},{"type":51,"tag":144,"props":641,"children":642},{"style":313},[643],{"type":57,"value":644}," -X",{"type":51,"tag":144,"props":646,"children":647},{"style":313},[648],{"type":57,"value":649}," POST",{"type":51,"tag":144,"props":651,"children":652},{"style":286},[653],{"type":57,"value":310},{"type":51,"tag":144,"props":655,"children":656},{"style":313},[657],{"type":57,"value":658},"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic",{"type":51,"tag":144,"props":660,"children":661},{"style":286},[662],{"type":57,"value":321},{"type":51,"tag":144,"props":664,"children":665},{"style":292},[666],{"type":57,"value":667}," \\\n",{"type":51,"tag":144,"props":669,"children":670},{"class":146,"line":156},[671,676,680,685,690,694,699,703,708,712],{"type":51,"tag":144,"props":672,"children":673},{"style":313},[674],{"type":57,"value":675},"  -H",{"type":51,"tag":144,"props":677,"children":678},{"style":286},[679],{"type":57,"value":310},{"type":51,"tag":144,"props":681,"children":682},{"style":313},[683],{"type":57,"value":684},"xi-api-key: ",{"type":51,"tag":144,"props":686,"children":687},{"style":292},[688],{"type":57,"value":689},"$ELEVENLABS_API_KEY",{"type":51,"tag":144,"props":691,"children":692},{"style":286},[693],{"type":57,"value":321},{"type":51,"tag":144,"props":695,"children":696},{"style":313},[697],{"type":57,"value":698}," -H",{"type":51,"tag":144,"props":700,"children":701},{"style":286},[702],{"type":57,"value":310},{"type":51,"tag":144,"props":704,"children":705},{"style":313},[706],{"type":57,"value":707},"Content-Type: application\u002Fjson",{"type":51,"tag":144,"props":709,"children":710},{"style":286},[711],{"type":57,"value":321},{"type":51,"tag":144,"props":713,"children":714},{"style":292},[715],{"type":57,"value":667},{"type":51,"tag":144,"props":717,"children":718},{"class":146,"line":166},[719,724,729,734,739],{"type":51,"tag":144,"props":720,"children":721},{"style":313},[722],{"type":57,"value":723},"  -d",{"type":51,"tag":144,"props":725,"children":726},{"style":286},[727],{"type":57,"value":728}," '",{"type":51,"tag":144,"props":730,"children":731},{"style":313},[732],{"type":57,"value":733},"{\"prompt\": \"A chill lo-fi beat\", \"music_length_ms\": 30000, \"model_id\": \"music_v2\"}",{"type":51,"tag":144,"props":735,"children":736},{"style":286},[737],{"type":57,"value":738},"'",{"type":51,"tag":144,"props":740,"children":741},{"style":292},[742],{"type":57,"value":667},{"type":51,"tag":144,"props":744,"children":745},{"class":146,"line":175},[746,751],{"type":51,"tag":144,"props":747,"children":748},{"style":313},[749],{"type":57,"value":750},"  --output",{"type":51,"tag":144,"props":752,"children":753},{"style":313},[754],{"type":57,"value":755}," output.mp3\n",{"type":51,"tag":120,"props":757,"children":759},{"id":758},"methods",[760],{"type":57,"value":761},"Methods",{"type":51,"tag":763,"props":764,"children":765},"table",{},[766,785],{"type":51,"tag":767,"props":768,"children":769},"thead",{},[770],{"type":51,"tag":771,"props":772,"children":773},"tr",{},[774,780],{"type":51,"tag":775,"props":776,"children":777},"th",{},[778],{"type":57,"value":779},"Method",{"type":51,"tag":775,"props":781,"children":782},{},[783],{"type":57,"value":784},"Description",{"type":51,"tag":786,"props":787,"children":788},"tbody",{},[789,807,824,841,866,883,900,917,934,951,968,985],{"type":51,"tag":771,"props":790,"children":791},{},[792,802],{"type":51,"tag":793,"props":794,"children":795},"td",{},[796],{"type":51,"tag":90,"props":797,"children":799},{"className":798},[],[800],{"type":57,"value":801},"music.compose",{"type":51,"tag":793,"props":803,"children":804},{},[805],{"type":57,"value":806},"Generate audio from a prompt or composition plan",{"type":51,"tag":771,"props":808,"children":809},{},[810,819],{"type":51,"tag":793,"props":811,"children":812},{},[813],{"type":51,"tag":90,"props":814,"children":816},{"className":815},[],[817],{"type":57,"value":818},"music.stream",{"type":51,"tag":793,"props":820,"children":821},{},[822],{"type":57,"value":823},"Stream audio chunks as they are generated (paid plans)",{"type":51,"tag":771,"props":825,"children":826},{},[827,836],{"type":51,"tag":793,"props":828,"children":829},{},[830],{"type":51,"tag":90,"props":831,"children":833},{"className":832},[],[834],{"type":57,"value":835},"music.composition_plan.create",{"type":51,"tag":793,"props":837,"children":838},{},[839],{"type":57,"value":840},"Generate a structured plan for fine-grained control",{"type":51,"tag":771,"props":842,"children":843},{},[844,853],{"type":51,"tag":793,"props":845,"children":846},{},[847],{"type":51,"tag":90,"props":848,"children":850},{"className":849},[],[851],{"type":57,"value":852},"music.compose_detailed",{"type":51,"tag":793,"props":854,"children":855},{},[856,858,864],{"type":57,"value":857},"Generate audio + composition plan + metadata; pass ",{"type":51,"tag":90,"props":859,"children":861},{"className":860},[],[862],{"type":57,"value":863},"store_for_inpainting=True",{"type":57,"value":865}," to enable inpainting",{"type":51,"tag":771,"props":867,"children":868},{},[869,878],{"type":51,"tag":793,"props":870,"children":871},{},[872],{"type":51,"tag":90,"props":873,"children":875},{"className":874},[],[876],{"type":57,"value":877},"music.compose_detailed_stream",{"type":51,"tag":793,"props":879,"children":880},{},[881],{"type":57,"value":882},"Stream audio plus composition plan, metadata, and optional word timestamps as Server-Sent Events",{"type":51,"tag":771,"props":884,"children":885},{},[886,895],{"type":51,"tag":793,"props":887,"children":888},{},[889],{"type":51,"tag":90,"props":890,"children":892},{"className":891},[],[893],{"type":57,"value":894},"music.video_to_music",{"type":51,"tag":793,"props":896,"children":897},{},[898],{"type":57,"value":899},"Generate background music from one or more uploaded video files",{"type":51,"tag":771,"props":901,"children":902},{},[903,912],{"type":51,"tag":793,"props":904,"children":905},{},[906],{"type":51,"tag":90,"props":907,"children":909},{"className":908},[],[910],{"type":57,"value":911},"music.upload",{"type":51,"tag":793,"props":913,"children":914},{},[915],{"type":57,"value":916},"Upload an audio file for later inpainting workflows, optionally extracting its composition plan or word-level timestamps",{"type":51,"tag":771,"props":918,"children":919},{},[920,929],{"type":51,"tag":793,"props":921,"children":922},{},[923],{"type":51,"tag":90,"props":924,"children":926},{"className":925},[],[927],{"type":57,"value":928},"music.finetunes.list",{"type":51,"tag":793,"props":930,"children":931},{},[932],{"type":57,"value":933},"List accessible music finetunes",{"type":51,"tag":771,"props":935,"children":936},{},[937,946],{"type":51,"tag":793,"props":938,"children":939},{},[940],{"type":51,"tag":90,"props":941,"children":943},{"className":942},[],[944],{"type":57,"value":945},"music.finetunes.create",{"type":51,"tag":793,"props":947,"children":948},{},[949],{"type":57,"value":950},"Train a music finetune from uploaded audio",{"type":51,"tag":771,"props":952,"children":953},{},[954,963],{"type":51,"tag":793,"props":955,"children":956},{},[957],{"type":51,"tag":90,"props":958,"children":960},{"className":959},[],[961],{"type":57,"value":962},"music.finetunes.get",{"type":51,"tag":793,"props":964,"children":965},{},[966],{"type":57,"value":967},"Retrieve finetune status and metadata",{"type":51,"tag":771,"props":969,"children":970},{},[971,980],{"type":51,"tag":793,"props":972,"children":973},{},[974],{"type":51,"tag":90,"props":975,"children":977},{"className":976},[],[978],{"type":57,"value":979},"music.finetunes.update",{"type":51,"tag":793,"props":981,"children":982},{},[983],{"type":57,"value":984},"Update finetune metadata or visibility",{"type":51,"tag":771,"props":986,"children":987},{},[988,997],{"type":51,"tag":793,"props":989,"children":990},{},[991],{"type":51,"tag":90,"props":992,"children":994},{"className":993},[],[995],{"type":57,"value":996},"music.finetunes.delete",{"type":51,"tag":793,"props":998,"children":999},{},[1000],{"type":57,"value":1001},"Delete a music finetune",{"type":51,"tag":60,"props":1003,"children":1004},{},[1005,1007,1013],{"type":57,"value":1006},"See ",{"type":51,"tag":81,"props":1008,"children":1010},{"href":1009},"references\u002Fapi_reference.md",[1011],{"type":57,"value":1012},"API Reference",{"type":57,"value":1014}," for full parameter details.",{"type":51,"tag":60,"props":1016,"children":1017},{},[1018,1023],{"type":51,"tag":90,"props":1019,"children":1021},{"className":1020},[],[1022],{"type":57,"value":911},{"type":57,"value":1024}," is available to enterprise clients with access to the inpainting feature.",{"type":51,"tag":120,"props":1026,"children":1028},{"id":1027},"music-finetunes",[1029],{"type":57,"value":1030},"Music Finetunes",{"type":51,"tag":60,"props":1032,"children":1033},{},[1034,1036,1048,1050,1057,1059,1065,1067,1073,1075,1081],{"type":57,"value":1035},"Create a finetune from training audio with\n",{"type":51,"tag":81,"props":1037,"children":1041},{"href":1038,"rel":1039},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fcreate",[1040],"nofollow",[1042],{"type":51,"tag":90,"props":1043,"children":1045},{"className":1044},[],[1046],{"type":57,"value":1047},"POST \u002Fv1\u002Fmusic\u002Ffinetunes",{"type":57,"value":1049},",\nthen poll the ",{"type":51,"tag":81,"props":1051,"children":1054},{"href":1052,"rel":1053},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fget",[1040],[1055],{"type":57,"value":1056},"get endpoint",{"type":57,"value":1058}," until\nits status is ",{"type":51,"tag":90,"props":1060,"children":1062},{"className":1061},[],[1063],{"type":57,"value":1064},"completed",{"type":57,"value":1066},". Pass the returned ",{"type":51,"tag":90,"props":1068,"children":1070},{"className":1069},[],[1071],{"type":57,"value":1072},"id",{"type":57,"value":1074}," as ",{"type":51,"tag":90,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":57,"value":1080},"finetune_id",{"type":57,"value":1082}," when composing music.",{"type":51,"tag":60,"props":1084,"children":1085},{},[1086,1088,1095,1096,1103,1105,1112],{"type":57,"value":1087},"Use the ",{"type":51,"tag":81,"props":1089,"children":1092},{"href":1090,"rel":1091},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Flist",[1040],[1093],{"type":57,"value":1094},"list",{"type":57,"value":498},{"type":51,"tag":81,"props":1097,"children":1100},{"href":1098,"rel":1099},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fupdate",[1040],[1101],{"type":57,"value":1102},"update",{"type":57,"value":1104},", and\n",{"type":51,"tag":81,"props":1106,"children":1109},{"href":1107,"rel":1108},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Ffinetunes\u002Fdelete",[1040],[1110],{"type":57,"value":1111},"delete",{"type":57,"value":1113}," endpoints to manage\naccessible finetunes.",{"type":51,"tag":120,"props":1115,"children":1117},{"id":1116},"video-to-music",[1118],{"type":57,"value":1119},"Video to Music",{"type":51,"tag":60,"props":1121,"children":1122},{},[1123,1125,1136,1138,1144,1146,1156,1158,1164],{"type":57,"value":1124},"Generate background music from uploaded video clips via\n",{"type":51,"tag":81,"props":1126,"children":1129},{"href":1127,"rel":1128},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Fvideo-to-music",[1040],[1130],{"type":51,"tag":90,"props":1131,"children":1133},{"className":1132},[],[1134],{"type":57,"value":1135},"POST \u002Fv1\u002Fmusic\u002Fvideo-to-music",{"type":57,"value":1137},"\n(",{"type":51,"tag":90,"props":1139,"children":1141},{"className":1140},[],[1142],{"type":57,"value":1143},"client.music.video_to_music",{"type":57,"value":1145},"). This is separate from prompt-based\n",{"type":51,"tag":81,"props":1147,"children":1150},{"href":1148,"rel":1149},"https:\u002F\u002Felevenlabs.io\u002Fdocs\u002Fapi-reference\u002Fmusic\u002Fcompose",[1040],[1151],{"type":51,"tag":90,"props":1152,"children":1154},{"className":1153},[],[1155],{"type":57,"value":801},{"type":57,"value":1157}," (",{"type":51,"tag":90,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":57,"value":1163},"POST \u002Fv1\u002Fmusic",{"type":57,"value":1165},").",{"type":51,"tag":60,"props":1167,"children":1168},{},[1169,1171,1177,1179,1185,1187,1193,1195,1201],{"type":57,"value":1170},"The API combines videos in order, accepts an optional natural-language description, and lets you\nsteer style with up to 10 tags such as ",{"type":51,"tag":90,"props":1172,"children":1174},{"className":1173},[],[1175],{"type":57,"value":1176},"upbeat",{"type":57,"value":1178}," or ",{"type":51,"tag":90,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":57,"value":1184},"cinematic",{"type":57,"value":1186},". This endpoint still defaults to\n",{"type":51,"tag":90,"props":1188,"children":1190},{"className":1189},[],[1191],{"type":57,"value":1192},"music_v1",{"type":57,"value":1194},"; pass ",{"type":51,"tag":90,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":57,"value":1200},"model_id=\"music_v2\"",{"type":57,"value":1202}," to use the newer model.",{"type":51,"tag":127,"props":1204,"children":1206},{"id":1205},"python-1",[1207],{"type":57,"value":132},{"type":51,"tag":134,"props":1209,"children":1211},{"className":136,"code":1210,"language":129,"meta":138,"style":138},"from elevenlabs import ElevenLabs\n\nclient = ElevenLabs()\n\naudio = client.music.video_to_music(\n    videos=[\"trailer.mp4\"],\n    description=\"Build suspense, then resolve with a warm cinematic finish.\",\n    tags=[\"cinematic\", \"suspenseful\", \"uplifting\"],\n    model_id=\"music_v2\",\n)\n\nwith open(\"video-score.mp3\", \"wb\") as f:\n    for chunk in audio:\n        f.write(chunk)\n",[1212],{"type":51,"tag":90,"props":1213,"children":1214},{"__ignoreMap":138},[1215,1222,1229,1236,1243,1251,1259,1267,1275,1282,1289,1296,1304,1311],{"type":51,"tag":144,"props":1216,"children":1217},{"class":146,"line":147},[1218],{"type":51,"tag":144,"props":1219,"children":1220},{},[1221],{"type":57,"value":153},{"type":51,"tag":144,"props":1223,"children":1224},{"class":146,"line":156},[1225],{"type":51,"tag":144,"props":1226,"children":1227},{"emptyLinePlaceholder":160},[1228],{"type":57,"value":163},{"type":51,"tag":144,"props":1230,"children":1231},{"class":146,"line":166},[1232],{"type":51,"tag":144,"props":1233,"children":1234},{},[1235],{"type":57,"value":172},{"type":51,"tag":144,"props":1237,"children":1238},{"class":146,"line":175},[1239],{"type":51,"tag":144,"props":1240,"children":1241},{"emptyLinePlaceholder":160},[1242],{"type":57,"value":163},{"type":51,"tag":144,"props":1244,"children":1245},{"class":146,"line":183},[1246],{"type":51,"tag":144,"props":1247,"children":1248},{},[1249],{"type":57,"value":1250},"audio = client.music.video_to_music(\n",{"type":51,"tag":144,"props":1252,"children":1253},{"class":146,"line":192},[1254],{"type":51,"tag":144,"props":1255,"children":1256},{},[1257],{"type":57,"value":1258},"    videos=[\"trailer.mp4\"],\n",{"type":51,"tag":144,"props":1260,"children":1261},{"class":146,"line":201},[1262],{"type":51,"tag":144,"props":1263,"children":1264},{},[1265],{"type":57,"value":1266},"    description=\"Build suspense, then resolve with a warm cinematic finish.\",\n",{"type":51,"tag":144,"props":1268,"children":1269},{"class":146,"line":210},[1270],{"type":51,"tag":144,"props":1271,"children":1272},{},[1273],{"type":57,"value":1274},"    tags=[\"cinematic\", \"suspenseful\", \"uplifting\"],\n",{"type":51,"tag":144,"props":1276,"children":1277},{"class":146,"line":219},[1278],{"type":51,"tag":144,"props":1279,"children":1280},{},[1281],{"type":57,"value":216},{"type":51,"tag":144,"props":1283,"children":1284},{"class":146,"line":228},[1285],{"type":51,"tag":144,"props":1286,"children":1287},{},[1288],{"type":57,"value":225},{"type":51,"tag":144,"props":1290,"children":1291},{"class":146,"line":236},[1292],{"type":51,"tag":144,"props":1293,"children":1294},{"emptyLinePlaceholder":160},[1295],{"type":57,"value":163},{"type":51,"tag":144,"props":1297,"children":1298},{"class":146,"line":245},[1299],{"type":51,"tag":144,"props":1300,"children":1301},{},[1302],{"type":57,"value":1303},"with open(\"video-score.mp3\", \"wb\") as f:\n",{"type":51,"tag":144,"props":1305,"children":1306},{"class":146,"line":254},[1307],{"type":51,"tag":144,"props":1308,"children":1309},{},[1310],{"type":57,"value":251},{"type":51,"tag":144,"props":1312,"children":1314},{"class":146,"line":1313},14,[1315],{"type":51,"tag":144,"props":1316,"children":1317},{},[1318],{"type":57,"value":260},{"type":51,"tag":127,"props":1320,"children":1322},{"id":1321},"typescript-1",[1323],{"type":57,"value":266},{"type":51,"tag":134,"props":1325,"children":1327},{"className":269,"code":1326,"language":263,"meta":138,"style":138},"import { ElevenLabsClient } from \"@elevenlabs\u002Felevenlabs-js\";\nimport { createReadStream, createWriteStream } from \"fs\";\n\nconst client = new ElevenLabsClient();\n\nconst audio = await client.music.videoToMusic({\n  videos: [createReadStream(\"trailer.mp4\")],\n  description: \"Build suspense, then resolve with a warm cinematic finish.\",\n  tags: [\"cinematic\", \"suspenseful\", \"uplifting\"],\n  modelId: \"music_v2\",\n});\n\naudio.pipe(createWriteStream(\"video-score.mp3\"));\n",[1328],{"type":51,"tag":90,"props":1329,"children":1330},{"__ignoreMap":138},[1331,1370,1419,1426,1457,1464,1512,1560,1589,1660,1687,1702,1709],{"type":51,"tag":144,"props":1332,"children":1333},{"class":146,"line":147},[1334,1338,1342,1346,1350,1354,1358,1362,1366],{"type":51,"tag":144,"props":1335,"children":1336},{"style":280},[1337],{"type":57,"value":283},{"type":51,"tag":144,"props":1339,"children":1340},{"style":286},[1341],{"type":57,"value":289},{"type":51,"tag":144,"props":1343,"children":1344},{"style":292},[1345],{"type":57,"value":295},{"type":51,"tag":144,"props":1347,"children":1348},{"style":286},[1349],{"type":57,"value":300},{"type":51,"tag":144,"props":1351,"children":1352},{"style":280},[1353],{"type":57,"value":305},{"type":51,"tag":144,"props":1355,"children":1356},{"style":286},[1357],{"type":57,"value":310},{"type":51,"tag":144,"props":1359,"children":1360},{"style":313},[1361],{"type":57,"value":316},{"type":51,"tag":144,"props":1363,"children":1364},{"style":286},[1365],{"type":57,"value":321},{"type":51,"tag":144,"props":1367,"children":1368},{"style":286},[1369],{"type":57,"value":326},{"type":51,"tag":144,"props":1371,"children":1372},{"class":146,"line":156},[1373,1377,1381,1386,1391,1395,1399,1403,1407,1411,1415],{"type":51,"tag":144,"props":1374,"children":1375},{"style":280},[1376],{"type":57,"value":283},{"type":51,"tag":144,"props":1378,"children":1379},{"style":286},[1380],{"type":57,"value":289},{"type":51,"tag":144,"props":1382,"children":1383},{"style":292},[1384],{"type":57,"value":1385}," createReadStream",{"type":51,"tag":144,"props":1387,"children":1388},{"style":286},[1389],{"type":57,"value":1390},",",{"type":51,"tag":144,"props":1392,"children":1393},{"style":292},[1394],{"type":57,"value":342},{"type":51,"tag":144,"props":1396,"children":1397},{"style":286},[1398],{"type":57,"value":300},{"type":51,"tag":144,"props":1400,"children":1401},{"style":280},[1402],{"type":57,"value":305},{"type":51,"tag":144,"props":1404,"children":1405},{"style":286},[1406],{"type":57,"value":310},{"type":51,"tag":144,"props":1408,"children":1409},{"style":313},[1410],{"type":57,"value":359},{"type":51,"tag":144,"props":1412,"children":1413},{"style":286},[1414],{"type":57,"value":321},{"type":51,"tag":144,"props":1416,"children":1417},{"style":286},[1418],{"type":57,"value":326},{"type":51,"tag":144,"props":1420,"children":1421},{"class":146,"line":166},[1422],{"type":51,"tag":144,"props":1423,"children":1424},{"emptyLinePlaceholder":160},[1425],{"type":57,"value":163},{"type":51,"tag":144,"props":1427,"children":1428},{"class":146,"line":175},[1429,1433,1437,1441,1445,1449,1453],{"type":51,"tag":144,"props":1430,"children":1431},{"style":380},[1432],{"type":57,"value":383},{"type":51,"tag":144,"props":1434,"children":1435},{"style":292},[1436],{"type":57,"value":388},{"type":51,"tag":144,"props":1438,"children":1439},{"style":286},[1440],{"type":57,"value":393},{"type":51,"tag":144,"props":1442,"children":1443},{"style":286},[1444],{"type":57,"value":398},{"type":51,"tag":144,"props":1446,"children":1447},{"style":401},[1448],{"type":57,"value":295},{"type":51,"tag":144,"props":1450,"children":1451},{"style":292},[1452],{"type":57,"value":408},{"type":51,"tag":144,"props":1454,"children":1455},{"style":286},[1456],{"type":57,"value":326},{"type":51,"tag":144,"props":1458,"children":1459},{"class":146,"line":183},[1460],{"type":51,"tag":144,"props":1461,"children":1462},{"emptyLinePlaceholder":160},[1463],{"type":57,"value":163},{"type":51,"tag":144,"props":1465,"children":1466},{"class":146,"line":192},[1467,1471,1475,1479,1483,1487,1491,1495,1499,1504,1508],{"type":51,"tag":144,"props":1468,"children":1469},{"style":380},[1470],{"type":57,"value":383},{"type":51,"tag":144,"props":1472,"children":1473},{"style":292},[1474],{"type":57,"value":424},{"type":51,"tag":144,"props":1476,"children":1477},{"style":286},[1478],{"type":57,"value":393},{"type":51,"tag":144,"props":1480,"children":1481},{"style":280},[1482],{"type":57,"value":433},{"type":51,"tag":144,"props":1484,"children":1485},{"style":292},[1486],{"type":57,"value":438},{"type":51,"tag":144,"props":1488,"children":1489},{"style":286},[1490],{"type":57,"value":443},{"type":51,"tag":144,"props":1492,"children":1493},{"style":292},[1494],{"type":57,"value":4},{"type":51,"tag":144,"props":1496,"children":1497},{"style":286},[1498],{"type":57,"value":443},{"type":51,"tag":144,"props":1500,"children":1501},{"style":401},[1502],{"type":57,"value":1503},"videoToMusic",{"type":51,"tag":144,"props":1505,"children":1506},{"style":292},[1507],{"type":57,"value":461},{"type":51,"tag":144,"props":1509,"children":1510},{"style":286},[1511],{"type":57,"value":466},{"type":51,"tag":144,"props":1513,"children":1514},{"class":146,"line":201},[1515,1520,1524,1529,1534,1538,1542,1547,1551,1556],{"type":51,"tag":144,"props":1516,"children":1517},{"style":472},[1518],{"type":57,"value":1519},"  videos",{"type":51,"tag":144,"props":1521,"children":1522},{"style":286},[1523],{"type":57,"value":480},{"type":51,"tag":144,"props":1525,"children":1526},{"style":292},[1527],{"type":57,"value":1528}," [",{"type":51,"tag":144,"props":1530,"children":1531},{"style":401},[1532],{"type":57,"value":1533},"createReadStream",{"type":51,"tag":144,"props":1535,"children":1536},{"style":292},[1537],{"type":57,"value":461},{"type":51,"tag":144,"props":1539,"children":1540},{"style":286},[1541],{"type":57,"value":321},{"type":51,"tag":144,"props":1543,"children":1544},{"style":313},[1545],{"type":57,"value":1546},"trailer.mp4",{"type":51,"tag":144,"props":1548,"children":1549},{"style":286},[1550],{"type":57,"value":321},{"type":51,"tag":144,"props":1552,"children":1553},{"style":292},[1554],{"type":57,"value":1555},")]",{"type":51,"tag":144,"props":1557,"children":1558},{"style":286},[1559],{"type":57,"value":498},{"type":51,"tag":144,"props":1561,"children":1562},{"class":146,"line":210},[1563,1568,1572,1576,1581,1585],{"type":51,"tag":144,"props":1564,"children":1565},{"style":472},[1566],{"type":57,"value":1567},"  description",{"type":51,"tag":144,"props":1569,"children":1570},{"style":286},[1571],{"type":57,"value":480},{"type":51,"tag":144,"props":1573,"children":1574},{"style":286},[1575],{"type":57,"value":310},{"type":51,"tag":144,"props":1577,"children":1578},{"style":313},[1579],{"type":57,"value":1580},"Build suspense, then resolve with a warm cinematic finish.",{"type":51,"tag":144,"props":1582,"children":1583},{"style":286},[1584],{"type":57,"value":321},{"type":51,"tag":144,"props":1586,"children":1587},{"style":286},[1588],{"type":57,"value":498},{"type":51,"tag":144,"props":1590,"children":1591},{"class":146,"line":219},[1592,1597,1601,1605,1609,1613,1617,1621,1625,1630,1634,1638,1642,1647,1651,1656],{"type":51,"tag":144,"props":1593,"children":1594},{"style":472},[1595],{"type":57,"value":1596},"  tags",{"type":51,"tag":144,"props":1598,"children":1599},{"style":286},[1600],{"type":57,"value":480},{"type":51,"tag":144,"props":1602,"children":1603},{"style":292},[1604],{"type":57,"value":1528},{"type":51,"tag":144,"props":1606,"children":1607},{"style":286},[1608],{"type":57,"value":321},{"type":51,"tag":144,"props":1610,"children":1611},{"style":313},[1612],{"type":57,"value":1184},{"type":51,"tag":144,"props":1614,"children":1615},{"style":286},[1616],{"type":57,"value":321},{"type":51,"tag":144,"props":1618,"children":1619},{"style":286},[1620],{"type":57,"value":1390},{"type":51,"tag":144,"props":1622,"children":1623},{"style":286},[1624],{"type":57,"value":310},{"type":51,"tag":144,"props":1626,"children":1627},{"style":313},[1628],{"type":57,"value":1629},"suspenseful",{"type":51,"tag":144,"props":1631,"children":1632},{"style":286},[1633],{"type":57,"value":321},{"type":51,"tag":144,"props":1635,"children":1636},{"style":286},[1637],{"type":57,"value":1390},{"type":51,"tag":144,"props":1639,"children":1640},{"style":286},[1641],{"type":57,"value":310},{"type":51,"tag":144,"props":1643,"children":1644},{"style":313},[1645],{"type":57,"value":1646},"uplifting",{"type":51,"tag":144,"props":1648,"children":1649},{"style":286},[1650],{"type":57,"value":321},{"type":51,"tag":144,"props":1652,"children":1653},{"style":292},[1654],{"type":57,"value":1655},"]",{"type":51,"tag":144,"props":1657,"children":1658},{"style":286},[1659],{"type":57,"value":498},{"type":51,"tag":144,"props":1661,"children":1662},{"class":146,"line":228},[1663,1667,1671,1675,1679,1683],{"type":51,"tag":144,"props":1664,"children":1665},{"style":472},[1666],{"type":57,"value":528},{"type":51,"tag":144,"props":1668,"children":1669},{"style":286},[1670],{"type":57,"value":480},{"type":51,"tag":144,"props":1672,"children":1673},{"style":286},[1674],{"type":57,"value":310},{"type":51,"tag":144,"props":1676,"children":1677},{"style":313},[1678],{"type":57,"value":108},{"type":51,"tag":144,"props":1680,"children":1681},{"style":286},[1682],{"type":57,"value":321},{"type":51,"tag":144,"props":1684,"children":1685},{"style":286},[1686],{"type":57,"value":498},{"type":51,"tag":144,"props":1688,"children":1689},{"class":146,"line":236},[1690,1694,1698],{"type":51,"tag":144,"props":1691,"children":1692},{"style":286},[1693],{"type":57,"value":556},{"type":51,"tag":144,"props":1695,"children":1696},{"style":292},[1697],{"type":57,"value":561},{"type":51,"tag":144,"props":1699,"children":1700},{"style":286},[1701],{"type":57,"value":326},{"type":51,"tag":144,"props":1703,"children":1704},{"class":146,"line":245},[1705],{"type":51,"tag":144,"props":1706,"children":1707},{"emptyLinePlaceholder":160},[1708],{"type":57,"value":163},{"type":51,"tag":144,"props":1710,"children":1711},{"class":146,"line":254},[1712,1716,1720,1724,1728,1732,1736,1740,1745,1749,1753],{"type":51,"tag":144,"props":1713,"children":1714},{"style":292},[1715],{"type":57,"value":21},{"type":51,"tag":144,"props":1717,"children":1718},{"style":286},[1719],{"type":57,"value":443},{"type":51,"tag":144,"props":1721,"children":1722},{"style":401},[1723],{"type":57,"value":581},{"type":51,"tag":144,"props":1725,"children":1726},{"style":292},[1727],{"type":57,"value":461},{"type":51,"tag":144,"props":1729,"children":1730},{"style":401},[1731],{"type":57,"value":590},{"type":51,"tag":144,"props":1733,"children":1734},{"style":292},[1735],{"type":57,"value":461},{"type":51,"tag":144,"props":1737,"children":1738},{"style":286},[1739],{"type":57,"value":321},{"type":51,"tag":144,"props":1741,"children":1742},{"style":313},[1743],{"type":57,"value":1744},"video-score.mp3",{"type":51,"tag":144,"props":1746,"children":1747},{"style":286},[1748],{"type":57,"value":321},{"type":51,"tag":144,"props":1750,"children":1751},{"style":292},[1752],{"type":57,"value":612},{"type":51,"tag":144,"props":1754,"children":1755},{"style":286},[1756],{"type":57,"value":326},{"type":51,"tag":127,"props":1758,"children":1760},{"id":1759},"curl-1",[1761],{"type":57,"value":622},{"type":51,"tag":134,"props":1763,"children":1765},{"className":625,"code":1764,"language":627,"meta":138,"style":138},"curl -X POST \"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\u002Fvideo-to-music\" \\\n  -H \"xi-api-key: $ELEVENLABS_API_KEY\" \\\n  -F \"videos=@trailer.mp4\" \\\n  -F \"description=Build suspense, then resolve with a warm cinematic finish.\" \\\n  -F \"tags=cinematic\" \\\n  -F \"tags=suspenseful\" \\\n  -F \"tags=uplifting\" \\\n  -F \"model_id=music_v2\" \\\n  --output video-score.mp3\n",[1766],{"type":51,"tag":90,"props":1767,"children":1768},{"__ignoreMap":138},[1769,1801,1828,1853,1877,1901,1925,1949,1973],{"type":51,"tag":144,"props":1770,"children":1771},{"class":146,"line":147},[1772,1776,1780,1784,1788,1793,1797],{"type":51,"tag":144,"props":1773,"children":1774},{"style":637},[1775],{"type":57,"value":619},{"type":51,"tag":144,"props":1777,"children":1778},{"style":313},[1779],{"type":57,"value":644},{"type":51,"tag":144,"props":1781,"children":1782},{"style":313},[1783],{"type":57,"value":649},{"type":51,"tag":144,"props":1785,"children":1786},{"style":286},[1787],{"type":57,"value":310},{"type":51,"tag":144,"props":1789,"children":1790},{"style":313},[1791],{"type":57,"value":1792},"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\u002Fvideo-to-music",{"type":51,"tag":144,"props":1794,"children":1795},{"style":286},[1796],{"type":57,"value":321},{"type":51,"tag":144,"props":1798,"children":1799},{"style":292},[1800],{"type":57,"value":667},{"type":51,"tag":144,"props":1802,"children":1803},{"class":146,"line":156},[1804,1808,1812,1816,1820,1824],{"type":51,"tag":144,"props":1805,"children":1806},{"style":313},[1807],{"type":57,"value":675},{"type":51,"tag":144,"props":1809,"children":1810},{"style":286},[1811],{"type":57,"value":310},{"type":51,"tag":144,"props":1813,"children":1814},{"style":313},[1815],{"type":57,"value":684},{"type":51,"tag":144,"props":1817,"children":1818},{"style":292},[1819],{"type":57,"value":689},{"type":51,"tag":144,"props":1821,"children":1822},{"style":286},[1823],{"type":57,"value":321},{"type":51,"tag":144,"props":1825,"children":1826},{"style":292},[1827],{"type":57,"value":667},{"type":51,"tag":144,"props":1829,"children":1830},{"class":146,"line":166},[1831,1836,1840,1845,1849],{"type":51,"tag":144,"props":1832,"children":1833},{"style":313},[1834],{"type":57,"value":1835},"  -F",{"type":51,"tag":144,"props":1837,"children":1838},{"style":286},[1839],{"type":57,"value":310},{"type":51,"tag":144,"props":1841,"children":1842},{"style":313},[1843],{"type":57,"value":1844},"videos=@trailer.mp4",{"type":51,"tag":144,"props":1846,"children":1847},{"style":286},[1848],{"type":57,"value":321},{"type":51,"tag":144,"props":1850,"children":1851},{"style":292},[1852],{"type":57,"value":667},{"type":51,"tag":144,"props":1854,"children":1855},{"class":146,"line":175},[1856,1860,1864,1869,1873],{"type":51,"tag":144,"props":1857,"children":1858},{"style":313},[1859],{"type":57,"value":1835},{"type":51,"tag":144,"props":1861,"children":1862},{"style":286},[1863],{"type":57,"value":310},{"type":51,"tag":144,"props":1865,"children":1866},{"style":313},[1867],{"type":57,"value":1868},"description=Build suspense, then resolve with a warm cinematic finish.",{"type":51,"tag":144,"props":1870,"children":1871},{"style":286},[1872],{"type":57,"value":321},{"type":51,"tag":144,"props":1874,"children":1875},{"style":292},[1876],{"type":57,"value":667},{"type":51,"tag":144,"props":1878,"children":1879},{"class":146,"line":183},[1880,1884,1888,1893,1897],{"type":51,"tag":144,"props":1881,"children":1882},{"style":313},[1883],{"type":57,"value":1835},{"type":51,"tag":144,"props":1885,"children":1886},{"style":286},[1887],{"type":57,"value":310},{"type":51,"tag":144,"props":1889,"children":1890},{"style":313},[1891],{"type":57,"value":1892},"tags=cinematic",{"type":51,"tag":144,"props":1894,"children":1895},{"style":286},[1896],{"type":57,"value":321},{"type":51,"tag":144,"props":1898,"children":1899},{"style":292},[1900],{"type":57,"value":667},{"type":51,"tag":144,"props":1902,"children":1903},{"class":146,"line":192},[1904,1908,1912,1917,1921],{"type":51,"tag":144,"props":1905,"children":1906},{"style":313},[1907],{"type":57,"value":1835},{"type":51,"tag":144,"props":1909,"children":1910},{"style":286},[1911],{"type":57,"value":310},{"type":51,"tag":144,"props":1913,"children":1914},{"style":313},[1915],{"type":57,"value":1916},"tags=suspenseful",{"type":51,"tag":144,"props":1918,"children":1919},{"style":286},[1920],{"type":57,"value":321},{"type":51,"tag":144,"props":1922,"children":1923},{"style":292},[1924],{"type":57,"value":667},{"type":51,"tag":144,"props":1926,"children":1927},{"class":146,"line":201},[1928,1932,1936,1941,1945],{"type":51,"tag":144,"props":1929,"children":1930},{"style":313},[1931],{"type":57,"value":1835},{"type":51,"tag":144,"props":1933,"children":1934},{"style":286},[1935],{"type":57,"value":310},{"type":51,"tag":144,"props":1937,"children":1938},{"style":313},[1939],{"type":57,"value":1940},"tags=uplifting",{"type":51,"tag":144,"props":1942,"children":1943},{"style":286},[1944],{"type":57,"value":321},{"type":51,"tag":144,"props":1946,"children":1947},{"style":292},[1948],{"type":57,"value":667},{"type":51,"tag":144,"props":1950,"children":1951},{"class":146,"line":210},[1952,1956,1960,1965,1969],{"type":51,"tag":144,"props":1953,"children":1954},{"style":313},[1955],{"type":57,"value":1835},{"type":51,"tag":144,"props":1957,"children":1958},{"style":286},[1959],{"type":57,"value":310},{"type":51,"tag":144,"props":1961,"children":1962},{"style":313},[1963],{"type":57,"value":1964},"model_id=music_v2",{"type":51,"tag":144,"props":1966,"children":1967},{"style":286},[1968],{"type":57,"value":321},{"type":51,"tag":144,"props":1970,"children":1971},{"style":292},[1972],{"type":57,"value":667},{"type":51,"tag":144,"props":1974,"children":1975},{"class":146,"line":219},[1976,1980],{"type":51,"tag":144,"props":1977,"children":1978},{"style":313},[1979],{"type":57,"value":750},{"type":51,"tag":144,"props":1981,"children":1982},{"style":313},[1983],{"type":57,"value":1984}," video-score.mp3\n",{"type":51,"tag":60,"props":1986,"children":1987},{},[1988],{"type":57,"value":1989},"Constraints from the current API schema:",{"type":51,"tag":1991,"props":1992,"children":1993},"ul",{},[1994,2000,2005,2010],{"type":51,"tag":1995,"props":1996,"children":1997},"li",{},[1998],{"type":57,"value":1999},"Upload 1-10 video files per request",{"type":51,"tag":1995,"props":2001,"children":2002},{},[2003],{"type":57,"value":2004},"Keep total combined upload size at or below 200 MB",{"type":51,"tag":1995,"props":2006,"children":2007},{},[2008],{"type":57,"value":2009},"Keep total combined video duration at or below 600 seconds",{"type":51,"tag":1995,"props":2011,"children":2012},{},[2013,2015,2021,2023,2029],{"type":57,"value":2014},"Use ",{"type":51,"tag":90,"props":2016,"children":2018},{"className":2017},[],[2019],{"type":57,"value":2020},"description",{"type":57,"value":2022}," for high-level musical direction and ",{"type":51,"tag":90,"props":2024,"children":2026},{"className":2025},[],[2027],{"type":57,"value":2028},"tags",{"type":57,"value":2030}," for concise style cues",{"type":51,"tag":120,"props":2032,"children":2034},{"id":2033},"composition-plans",[2035],{"type":57,"value":2036},"Composition Plans",{"type":51,"tag":60,"props":2038,"children":2039},{},[2040,2045,2047,2053,2055,2060,2062,2068,2070,2076,2077,2083,2085,2091,2092,2098,2099,2105,2107,2113,2115,2120],{"type":51,"tag":90,"props":2041,"children":2043},{"className":2042},[],[2044],{"type":57,"value":108},{"type":57,"value":2046}," composition plans are an ordered list of ",{"type":51,"tag":90,"props":2048,"children":2050},{"className":2049},[],[2051],{"type":57,"value":2052},"chunks",{"type":57,"value":2054},". Each chunk specifies its own\n",{"type":51,"tag":90,"props":2056,"children":2058},{"className":2057},[],[2059],{"type":57,"value":57},{"type":57,"value":2061}," (section label, lyrics, inline cues), ",{"type":51,"tag":90,"props":2063,"children":2065},{"className":2064},[],[2066],{"type":57,"value":2067},"duration_ms",{"type":57,"value":2069},", ",{"type":51,"tag":90,"props":2071,"children":2073},{"className":2072},[],[2074],{"type":57,"value":2075},"positive_styles",{"type":57,"value":2069},{"type":51,"tag":90,"props":2078,"children":2080},{"className":2079},[],[2081],{"type":57,"value":2082},"negative_styles",{"type":57,"value":2084},",\nand ",{"type":51,"tag":90,"props":2086,"children":2088},{"className":2087},[],[2089],{"type":57,"value":2090},"context_adherence",{"type":57,"value":1157},{"type":51,"tag":90,"props":2093,"children":2095},{"className":2094},[],[2096],{"type":57,"value":2097},"low",{"type":57,"value":2069},{"type":51,"tag":90,"props":2100,"children":2102},{"className":2101},[],[2103],{"type":57,"value":2104},"medium",{"type":57,"value":2106},", or ",{"type":51,"tag":90,"props":2108,"children":2110},{"className":2109},[],[2111],{"type":57,"value":2112},"high",{"type":57,"value":2114},", default ",{"type":51,"tag":90,"props":2116,"children":2118},{"className":2117},[],[2119],{"type":57,"value":2112},{"type":57,"value":2121},"). Up to 30 chunks per plan,\neach 3,000–120,000 ms, total length 3 s to 10 minutes.",{"type":51,"tag":60,"props":2123,"children":2124},{},[2125],{"type":57,"value":2126},"Generate a plan first, edit it, then compose:",{"type":51,"tag":134,"props":2128,"children":2130},{"className":136,"code":2129,"language":129,"meta":138,"style":138},"plan = client.music.composition_plan.create(\n    prompt=\"An epic orchestral piece building to a climax\",\n    music_length_ms=60000,\n    model_id=\"music_v2\",\n)\n\n# Edit chunks in place\nplan[\"chunks\"][0][\"text\"] = \"[Intro]\\nQuiet strings rising\"\n\naudio = client.music.compose(\n    composition_plan=plan,\n    model_id=\"music_v2\",\n)\n",[2131],{"type":51,"tag":90,"props":2132,"children":2133},{"__ignoreMap":138},[2134,2142,2150,2158,2165,2172,2179,2187,2195,2202,2209,2217,2224],{"type":51,"tag":144,"props":2135,"children":2136},{"class":146,"line":147},[2137],{"type":51,"tag":144,"props":2138,"children":2139},{},[2140],{"type":57,"value":2141},"plan = client.music.composition_plan.create(\n",{"type":51,"tag":144,"props":2143,"children":2144},{"class":146,"line":156},[2145],{"type":51,"tag":144,"props":2146,"children":2147},{},[2148],{"type":57,"value":2149},"    prompt=\"An epic orchestral piece building to a climax\",\n",{"type":51,"tag":144,"props":2151,"children":2152},{"class":146,"line":166},[2153],{"type":51,"tag":144,"props":2154,"children":2155},{},[2156],{"type":57,"value":2157},"    music_length_ms=60000,\n",{"type":51,"tag":144,"props":2159,"children":2160},{"class":146,"line":175},[2161],{"type":51,"tag":144,"props":2162,"children":2163},{},[2164],{"type":57,"value":216},{"type":51,"tag":144,"props":2166,"children":2167},{"class":146,"line":183},[2168],{"type":51,"tag":144,"props":2169,"children":2170},{},[2171],{"type":57,"value":225},{"type":51,"tag":144,"props":2173,"children":2174},{"class":146,"line":192},[2175],{"type":51,"tag":144,"props":2176,"children":2177},{"emptyLinePlaceholder":160},[2178],{"type":57,"value":163},{"type":51,"tag":144,"props":2180,"children":2181},{"class":146,"line":201},[2182],{"type":51,"tag":144,"props":2183,"children":2184},{},[2185],{"type":57,"value":2186},"# Edit chunks in place\n",{"type":51,"tag":144,"props":2188,"children":2189},{"class":146,"line":210},[2190],{"type":51,"tag":144,"props":2191,"children":2192},{},[2193],{"type":57,"value":2194},"plan[\"chunks\"][0][\"text\"] = \"[Intro]\\nQuiet strings rising\"\n",{"type":51,"tag":144,"props":2196,"children":2197},{"class":146,"line":219},[2198],{"type":51,"tag":144,"props":2199,"children":2200},{"emptyLinePlaceholder":160},[2201],{"type":57,"value":163},{"type":51,"tag":144,"props":2203,"children":2204},{"class":146,"line":228},[2205],{"type":51,"tag":144,"props":2206,"children":2207},{},[2208],{"type":57,"value":189},{"type":51,"tag":144,"props":2210,"children":2211},{"class":146,"line":236},[2212],{"type":51,"tag":144,"props":2213,"children":2214},{},[2215],{"type":57,"value":2216},"    composition_plan=plan,\n",{"type":51,"tag":144,"props":2218,"children":2219},{"class":146,"line":245},[2220],{"type":51,"tag":144,"props":2221,"children":2222},{},[2223],{"type":57,"value":216},{"type":51,"tag":144,"props":2225,"children":2226},{"class":146,"line":254},[2227],{"type":51,"tag":144,"props":2228,"children":2229},{},[2230],{"type":57,"value":225},{"type":51,"tag":134,"props":2232,"children":2234},{"className":269,"code":2233,"language":263,"meta":138,"style":138},"const plan = await client.music.compositionPlan.create({\n  prompt: \"An epic orchestral piece building to a climax\",\n  musicLengthMs: 60000,\n  modelId: \"music_v2\",\n});\n\nplan.chunks[0].text = \"[Intro]\\nQuiet strings rising\";\n\nconst audio = await client.music.compose({\n  compositionPlan: plan,\n  modelId: \"music_v2\",\n});\n",[2235],{"type":51,"tag":90,"props":2236,"children":2237},{"__ignoreMap":138},[2238,2296,2324,2344,2371,2386,2393,2459,2466,2513,2534,2561],{"type":51,"tag":144,"props":2239,"children":2240},{"class":146,"line":147},[2241,2245,2250,2254,2258,2262,2266,2270,2274,2279,2283,2288,2292],{"type":51,"tag":144,"props":2242,"children":2243},{"style":380},[2244],{"type":57,"value":383},{"type":51,"tag":144,"props":2246,"children":2247},{"style":292},[2248],{"type":57,"value":2249}," plan ",{"type":51,"tag":144,"props":2251,"children":2252},{"style":286},[2253],{"type":57,"value":393},{"type":51,"tag":144,"props":2255,"children":2256},{"style":280},[2257],{"type":57,"value":433},{"type":51,"tag":144,"props":2259,"children":2260},{"style":292},[2261],{"type":57,"value":438},{"type":51,"tag":144,"props":2263,"children":2264},{"style":286},[2265],{"type":57,"value":443},{"type":51,"tag":144,"props":2267,"children":2268},{"style":292},[2269],{"type":57,"value":4},{"type":51,"tag":144,"props":2271,"children":2272},{"style":286},[2273],{"type":57,"value":443},{"type":51,"tag":144,"props":2275,"children":2276},{"style":292},[2277],{"type":57,"value":2278},"compositionPlan",{"type":51,"tag":144,"props":2280,"children":2281},{"style":286},[2282],{"type":57,"value":443},{"type":51,"tag":144,"props":2284,"children":2285},{"style":401},[2286],{"type":57,"value":2287},"create",{"type":51,"tag":144,"props":2289,"children":2290},{"style":292},[2291],{"type":57,"value":461},{"type":51,"tag":144,"props":2293,"children":2294},{"style":286},[2295],{"type":57,"value":466},{"type":51,"tag":144,"props":2297,"children":2298},{"class":146,"line":156},[2299,2303,2307,2311,2316,2320],{"type":51,"tag":144,"props":2300,"children":2301},{"style":472},[2302],{"type":57,"value":475},{"type":51,"tag":144,"props":2304,"children":2305},{"style":286},[2306],{"type":57,"value":480},{"type":51,"tag":144,"props":2308,"children":2309},{"style":286},[2310],{"type":57,"value":310},{"type":51,"tag":144,"props":2312,"children":2313},{"style":313},[2314],{"type":57,"value":2315},"An epic orchestral piece building to a climax",{"type":51,"tag":144,"props":2317,"children":2318},{"style":286},[2319],{"type":57,"value":321},{"type":51,"tag":144,"props":2321,"children":2322},{"style":286},[2323],{"type":57,"value":498},{"type":51,"tag":144,"props":2325,"children":2326},{"class":146,"line":166},[2327,2331,2335,2340],{"type":51,"tag":144,"props":2328,"children":2329},{"style":472},[2330],{"type":57,"value":506},{"type":51,"tag":144,"props":2332,"children":2333},{"style":286},[2334],{"type":57,"value":480},{"type":51,"tag":144,"props":2336,"children":2337},{"style":513},[2338],{"type":57,"value":2339}," 60000",{"type":51,"tag":144,"props":2341,"children":2342},{"style":286},[2343],{"type":57,"value":498},{"type":51,"tag":144,"props":2345,"children":2346},{"class":146,"line":175},[2347,2351,2355,2359,2363,2367],{"type":51,"tag":144,"props":2348,"children":2349},{"style":472},[2350],{"type":57,"value":528},{"type":51,"tag":144,"props":2352,"children":2353},{"style":286},[2354],{"type":57,"value":480},{"type":51,"tag":144,"props":2356,"children":2357},{"style":286},[2358],{"type":57,"value":310},{"type":51,"tag":144,"props":2360,"children":2361},{"style":313},[2362],{"type":57,"value":108},{"type":51,"tag":144,"props":2364,"children":2365},{"style":286},[2366],{"type":57,"value":321},{"type":51,"tag":144,"props":2368,"children":2369},{"style":286},[2370],{"type":57,"value":498},{"type":51,"tag":144,"props":2372,"children":2373},{"class":146,"line":183},[2374,2378,2382],{"type":51,"tag":144,"props":2375,"children":2376},{"style":286},[2377],{"type":57,"value":556},{"type":51,"tag":144,"props":2379,"children":2380},{"style":292},[2381],{"type":57,"value":561},{"type":51,"tag":144,"props":2383,"children":2384},{"style":286},[2385],{"type":57,"value":326},{"type":51,"tag":144,"props":2387,"children":2388},{"class":146,"line":192},[2389],{"type":51,"tag":144,"props":2390,"children":2391},{"emptyLinePlaceholder":160},[2392],{"type":57,"value":163},{"type":51,"tag":144,"props":2394,"children":2395},{"class":146,"line":201},[2396,2401,2405,2410,2415,2419,2423,2428,2432,2436,2441,2446,2451,2455],{"type":51,"tag":144,"props":2397,"children":2398},{"style":292},[2399],{"type":57,"value":2400},"plan",{"type":51,"tag":144,"props":2402,"children":2403},{"style":286},[2404],{"type":57,"value":443},{"type":51,"tag":144,"props":2406,"children":2407},{"style":292},[2408],{"type":57,"value":2409},"chunks[",{"type":51,"tag":144,"props":2411,"children":2412},{"style":513},[2413],{"type":57,"value":2414},"0",{"type":51,"tag":144,"props":2416,"children":2417},{"style":292},[2418],{"type":57,"value":1655},{"type":51,"tag":144,"props":2420,"children":2421},{"style":286},[2422],{"type":57,"value":443},{"type":51,"tag":144,"props":2424,"children":2425},{"style":292},[2426],{"type":57,"value":2427},"text ",{"type":51,"tag":144,"props":2429,"children":2430},{"style":286},[2431],{"type":57,"value":393},{"type":51,"tag":144,"props":2433,"children":2434},{"style":286},[2435],{"type":57,"value":310},{"type":51,"tag":144,"props":2437,"children":2438},{"style":313},[2439],{"type":57,"value":2440},"[Intro]",{"type":51,"tag":144,"props":2442,"children":2443},{"style":292},[2444],{"type":57,"value":2445},"\\n",{"type":51,"tag":144,"props":2447,"children":2448},{"style":313},[2449],{"type":57,"value":2450},"Quiet strings rising",{"type":51,"tag":144,"props":2452,"children":2453},{"style":286},[2454],{"type":57,"value":321},{"type":51,"tag":144,"props":2456,"children":2457},{"style":286},[2458],{"type":57,"value":326},{"type":51,"tag":144,"props":2460,"children":2461},{"class":146,"line":210},[2462],{"type":51,"tag":144,"props":2463,"children":2464},{"emptyLinePlaceholder":160},[2465],{"type":57,"value":163},{"type":51,"tag":144,"props":2467,"children":2468},{"class":146,"line":219},[2469,2473,2477,2481,2485,2489,2493,2497,2501,2505,2509],{"type":51,"tag":144,"props":2470,"children":2471},{"style":380},[2472],{"type":57,"value":383},{"type":51,"tag":144,"props":2474,"children":2475},{"style":292},[2476],{"type":57,"value":424},{"type":51,"tag":144,"props":2478,"children":2479},{"style":286},[2480],{"type":57,"value":393},{"type":51,"tag":144,"props":2482,"children":2483},{"style":280},[2484],{"type":57,"value":433},{"type":51,"tag":144,"props":2486,"children":2487},{"style":292},[2488],{"type":57,"value":438},{"type":51,"tag":144,"props":2490,"children":2491},{"style":286},[2492],{"type":57,"value":443},{"type":51,"tag":144,"props":2494,"children":2495},{"style":292},[2496],{"type":57,"value":4},{"type":51,"tag":144,"props":2498,"children":2499},{"style":286},[2500],{"type":57,"value":443},{"type":51,"tag":144,"props":2502,"children":2503},{"style":401},[2504],{"type":57,"value":456},{"type":51,"tag":144,"props":2506,"children":2507},{"style":292},[2508],{"type":57,"value":461},{"type":51,"tag":144,"props":2510,"children":2511},{"style":286},[2512],{"type":57,"value":466},{"type":51,"tag":144,"props":2514,"children":2515},{"class":146,"line":228},[2516,2521,2525,2530],{"type":51,"tag":144,"props":2517,"children":2518},{"style":472},[2519],{"type":57,"value":2520},"  compositionPlan",{"type":51,"tag":144,"props":2522,"children":2523},{"style":286},[2524],{"type":57,"value":480},{"type":51,"tag":144,"props":2526,"children":2527},{"style":292},[2528],{"type":57,"value":2529}," plan",{"type":51,"tag":144,"props":2531,"children":2532},{"style":286},[2533],{"type":57,"value":498},{"type":51,"tag":144,"props":2535,"children":2536},{"class":146,"line":236},[2537,2541,2545,2549,2553,2557],{"type":51,"tag":144,"props":2538,"children":2539},{"style":472},[2540],{"type":57,"value":528},{"type":51,"tag":144,"props":2542,"children":2543},{"style":286},[2544],{"type":57,"value":480},{"type":51,"tag":144,"props":2546,"children":2547},{"style":286},[2548],{"type":57,"value":310},{"type":51,"tag":144,"props":2550,"children":2551},{"style":313},[2552],{"type":57,"value":108},{"type":51,"tag":144,"props":2554,"children":2555},{"style":286},[2556],{"type":57,"value":321},{"type":51,"tag":144,"props":2558,"children":2559},{"style":286},[2560],{"type":57,"value":498},{"type":51,"tag":144,"props":2562,"children":2563},{"class":146,"line":245},[2564,2568,2572],{"type":51,"tag":144,"props":2565,"children":2566},{"style":286},[2567],{"type":57,"value":556},{"type":51,"tag":144,"props":2569,"children":2570},{"style":292},[2571],{"type":57,"value":561},{"type":51,"tag":144,"props":2573,"children":2574},{"style":286},[2575],{"type":57,"value":326},{"type":51,"tag":60,"props":2577,"children":2578},{},[2579],{"type":57,"value":2580},"Or hand-build a plan to control lyrics and style per section:",{"type":51,"tag":134,"props":2582,"children":2584},{"className":136,"code":2583,"language":129,"meta":138,"style":138},"composition_plan = {\n    \"chunks\": [\n        {\n            \"text\": \"[Verse]\\nWalking down an empty street\",\n            \"duration_ms\": 15000,\n            \"positive_styles\": [\"pop\", \"upbeat\", \"female vocals\", \"acoustic guitar\"],\n            \"negative_styles\": [\"dark\", \"slow\"],\n            \"context_adherence\": \"high\",\n        },\n        {\n            \"text\": \"[Chorus]\\nThis is my moment\",\n            \"duration_ms\": 15000,\n            \"positive_styles\": [\"powerful vocals\", \"full band\"],\n            \"negative_styles\": [],\n            \"context_adherence\": \"high\",\n        },\n    ]\n}\n\naudio = client.music.compose(composition_plan=composition_plan, model_id=\"music_v2\")\n",[2585],{"type":51,"tag":90,"props":2586,"children":2587},{"__ignoreMap":138},[2588,2596,2604,2612,2620,2628,2636,2644,2652,2660,2667,2675,2682,2690,2698,2706,2714,2723,2732,2740],{"type":51,"tag":144,"props":2589,"children":2590},{"class":146,"line":147},[2591],{"type":51,"tag":144,"props":2592,"children":2593},{},[2594],{"type":57,"value":2595},"composition_plan = {\n",{"type":51,"tag":144,"props":2597,"children":2598},{"class":146,"line":156},[2599],{"type":51,"tag":144,"props":2600,"children":2601},{},[2602],{"type":57,"value":2603},"    \"chunks\": [\n",{"type":51,"tag":144,"props":2605,"children":2606},{"class":146,"line":166},[2607],{"type":51,"tag":144,"props":2608,"children":2609},{},[2610],{"type":57,"value":2611},"        {\n",{"type":51,"tag":144,"props":2613,"children":2614},{"class":146,"line":175},[2615],{"type":51,"tag":144,"props":2616,"children":2617},{},[2618],{"type":57,"value":2619},"            \"text\": \"[Verse]\\nWalking down an empty street\",\n",{"type":51,"tag":144,"props":2621,"children":2622},{"class":146,"line":183},[2623],{"type":51,"tag":144,"props":2624,"children":2625},{},[2626],{"type":57,"value":2627},"            \"duration_ms\": 15000,\n",{"type":51,"tag":144,"props":2629,"children":2630},{"class":146,"line":192},[2631],{"type":51,"tag":144,"props":2632,"children":2633},{},[2634],{"type":57,"value":2635},"            \"positive_styles\": [\"pop\", \"upbeat\", \"female vocals\", \"acoustic guitar\"],\n",{"type":51,"tag":144,"props":2637,"children":2638},{"class":146,"line":201},[2639],{"type":51,"tag":144,"props":2640,"children":2641},{},[2642],{"type":57,"value":2643},"            \"negative_styles\": [\"dark\", \"slow\"],\n",{"type":51,"tag":144,"props":2645,"children":2646},{"class":146,"line":210},[2647],{"type":51,"tag":144,"props":2648,"children":2649},{},[2650],{"type":57,"value":2651},"            \"context_adherence\": \"high\",\n",{"type":51,"tag":144,"props":2653,"children":2654},{"class":146,"line":219},[2655],{"type":51,"tag":144,"props":2656,"children":2657},{},[2658],{"type":57,"value":2659},"        },\n",{"type":51,"tag":144,"props":2661,"children":2662},{"class":146,"line":228},[2663],{"type":51,"tag":144,"props":2664,"children":2665},{},[2666],{"type":57,"value":2611},{"type":51,"tag":144,"props":2668,"children":2669},{"class":146,"line":236},[2670],{"type":51,"tag":144,"props":2671,"children":2672},{},[2673],{"type":57,"value":2674},"            \"text\": \"[Chorus]\\nThis is my moment\",\n",{"type":51,"tag":144,"props":2676,"children":2677},{"class":146,"line":245},[2678],{"type":51,"tag":144,"props":2679,"children":2680},{},[2681],{"type":57,"value":2627},{"type":51,"tag":144,"props":2683,"children":2684},{"class":146,"line":254},[2685],{"type":51,"tag":144,"props":2686,"children":2687},{},[2688],{"type":57,"value":2689},"            \"positive_styles\": [\"powerful vocals\", \"full band\"],\n",{"type":51,"tag":144,"props":2691,"children":2692},{"class":146,"line":1313},[2693],{"type":51,"tag":144,"props":2694,"children":2695},{},[2696],{"type":57,"value":2697},"            \"negative_styles\": [],\n",{"type":51,"tag":144,"props":2699,"children":2701},{"class":146,"line":2700},15,[2702],{"type":51,"tag":144,"props":2703,"children":2704},{},[2705],{"type":57,"value":2651},{"type":51,"tag":144,"props":2707,"children":2709},{"class":146,"line":2708},16,[2710],{"type":51,"tag":144,"props":2711,"children":2712},{},[2713],{"type":57,"value":2659},{"type":51,"tag":144,"props":2715,"children":2717},{"class":146,"line":2716},17,[2718],{"type":51,"tag":144,"props":2719,"children":2720},{},[2721],{"type":57,"value":2722},"    ]\n",{"type":51,"tag":144,"props":2724,"children":2726},{"class":146,"line":2725},18,[2727],{"type":51,"tag":144,"props":2728,"children":2729},{},[2730],{"type":57,"value":2731},"}\n",{"type":51,"tag":144,"props":2733,"children":2735},{"class":146,"line":2734},19,[2736],{"type":51,"tag":144,"props":2737,"children":2738},{"emptyLinePlaceholder":160},[2739],{"type":57,"value":163},{"type":51,"tag":144,"props":2741,"children":2743},{"class":146,"line":2742},20,[2744],{"type":51,"tag":144,"props":2745,"children":2746},{},[2747],{"type":57,"value":2748},"audio = client.music.compose(composition_plan=composition_plan, model_id=\"music_v2\")\n",{"type":51,"tag":134,"props":2750,"children":2752},{"className":269,"code":2751,"language":263,"meta":138,"style":138},"const compositionPlan = {\n  chunks: [\n    {\n      text: \"[Verse]\\nWalking down an empty street\",\n      durationMs: 15000,\n      positiveStyles: [\"pop\", \"upbeat\", \"female vocals\", \"acoustic guitar\"],\n      negativeStyles: [\"dark\", \"slow\"],\n      contextAdherence: \"high\",\n    },\n    {\n      text: \"[Chorus]\\nThis is my moment\",\n      durationMs: 15000,\n      positiveStyles: [\"powerful vocals\", \"full band\"],\n      negativeStyles: [],\n      contextAdherence: \"high\",\n    },\n  ],\n};\n\nconst audio = await client.music.compose({\n  compositionPlan,\n  modelId: \"music_v2\",\n});\n",[2753],{"type":51,"tag":90,"props":2754,"children":2755},{"__ignoreMap":138},[2756,2777,2794,2802,2840,2861,2948,3002,3030,3038,3045,3082,3101,3154,3174,3201,3208,3220,3228,3235,3282,3294,3322],{"type":51,"tag":144,"props":2757,"children":2758},{"class":146,"line":147},[2759,2763,2768,2772],{"type":51,"tag":144,"props":2760,"children":2761},{"style":380},[2762],{"type":57,"value":383},{"type":51,"tag":144,"props":2764,"children":2765},{"style":292},[2766],{"type":57,"value":2767}," compositionPlan ",{"type":51,"tag":144,"props":2769,"children":2770},{"style":286},[2771],{"type":57,"value":393},{"type":51,"tag":144,"props":2773,"children":2774},{"style":286},[2775],{"type":57,"value":2776}," {\n",{"type":51,"tag":144,"props":2778,"children":2779},{"class":146,"line":156},[2780,2785,2789],{"type":51,"tag":144,"props":2781,"children":2782},{"style":472},[2783],{"type":57,"value":2784},"  chunks",{"type":51,"tag":144,"props":2786,"children":2787},{"style":286},[2788],{"type":57,"value":480},{"type":51,"tag":144,"props":2790,"children":2791},{"style":292},[2792],{"type":57,"value":2793}," [\n",{"type":51,"tag":144,"props":2795,"children":2796},{"class":146,"line":166},[2797],{"type":51,"tag":144,"props":2798,"children":2799},{"style":286},[2800],{"type":57,"value":2801},"    {\n",{"type":51,"tag":144,"props":2803,"children":2804},{"class":146,"line":175},[2805,2810,2814,2818,2823,2827,2832,2836],{"type":51,"tag":144,"props":2806,"children":2807},{"style":472},[2808],{"type":57,"value":2809},"      text",{"type":51,"tag":144,"props":2811,"children":2812},{"style":286},[2813],{"type":57,"value":480},{"type":51,"tag":144,"props":2815,"children":2816},{"style":286},[2817],{"type":57,"value":310},{"type":51,"tag":144,"props":2819,"children":2820},{"style":313},[2821],{"type":57,"value":2822},"[Verse]",{"type":51,"tag":144,"props":2824,"children":2825},{"style":292},[2826],{"type":57,"value":2445},{"type":51,"tag":144,"props":2828,"children":2829},{"style":313},[2830],{"type":57,"value":2831},"Walking down an empty street",{"type":51,"tag":144,"props":2833,"children":2834},{"style":286},[2835],{"type":57,"value":321},{"type":51,"tag":144,"props":2837,"children":2838},{"style":286},[2839],{"type":57,"value":498},{"type":51,"tag":144,"props":2841,"children":2842},{"class":146,"line":183},[2843,2848,2852,2857],{"type":51,"tag":144,"props":2844,"children":2845},{"style":472},[2846],{"type":57,"value":2847},"      durationMs",{"type":51,"tag":144,"props":2849,"children":2850},{"style":286},[2851],{"type":57,"value":480},{"type":51,"tag":144,"props":2853,"children":2854},{"style":513},[2855],{"type":57,"value":2856}," 15000",{"type":51,"tag":144,"props":2858,"children":2859},{"style":286},[2860],{"type":57,"value":498},{"type":51,"tag":144,"props":2862,"children":2863},{"class":146,"line":192},[2864,2869,2873,2877,2881,2886,2890,2894,2898,2902,2906,2910,2914,2919,2923,2927,2931,2936,2940,2944],{"type":51,"tag":144,"props":2865,"children":2866},{"style":472},[2867],{"type":57,"value":2868},"      positiveStyles",{"type":51,"tag":144,"props":2870,"children":2871},{"style":286},[2872],{"type":57,"value":480},{"type":51,"tag":144,"props":2874,"children":2875},{"style":292},[2876],{"type":57,"value":1528},{"type":51,"tag":144,"props":2878,"children":2879},{"style":286},[2880],{"type":57,"value":321},{"type":51,"tag":144,"props":2882,"children":2883},{"style":313},[2884],{"type":57,"value":2885},"pop",{"type":51,"tag":144,"props":2887,"children":2888},{"style":286},[2889],{"type":57,"value":321},{"type":51,"tag":144,"props":2891,"children":2892},{"style":286},[2893],{"type":57,"value":1390},{"type":51,"tag":144,"props":2895,"children":2896},{"style":286},[2897],{"type":57,"value":310},{"type":51,"tag":144,"props":2899,"children":2900},{"style":313},[2901],{"type":57,"value":1176},{"type":51,"tag":144,"props":2903,"children":2904},{"style":286},[2905],{"type":57,"value":321},{"type":51,"tag":144,"props":2907,"children":2908},{"style":286},[2909],{"type":57,"value":1390},{"type":51,"tag":144,"props":2911,"children":2912},{"style":286},[2913],{"type":57,"value":310},{"type":51,"tag":144,"props":2915,"children":2916},{"style":313},[2917],{"type":57,"value":2918},"female vocals",{"type":51,"tag":144,"props":2920,"children":2921},{"style":286},[2922],{"type":57,"value":321},{"type":51,"tag":144,"props":2924,"children":2925},{"style":286},[2926],{"type":57,"value":1390},{"type":51,"tag":144,"props":2928,"children":2929},{"style":286},[2930],{"type":57,"value":310},{"type":51,"tag":144,"props":2932,"children":2933},{"style":313},[2934],{"type":57,"value":2935},"acoustic guitar",{"type":51,"tag":144,"props":2937,"children":2938},{"style":286},[2939],{"type":57,"value":321},{"type":51,"tag":144,"props":2941,"children":2942},{"style":292},[2943],{"type":57,"value":1655},{"type":51,"tag":144,"props":2945,"children":2946},{"style":286},[2947],{"type":57,"value":498},{"type":51,"tag":144,"props":2949,"children":2950},{"class":146,"line":201},[2951,2956,2960,2964,2968,2973,2977,2981,2985,2990,2994,2998],{"type":51,"tag":144,"props":2952,"children":2953},{"style":472},[2954],{"type":57,"value":2955},"      negativeStyles",{"type":51,"tag":144,"props":2957,"children":2958},{"style":286},[2959],{"type":57,"value":480},{"type":51,"tag":144,"props":2961,"children":2962},{"style":292},[2963],{"type":57,"value":1528},{"type":51,"tag":144,"props":2965,"children":2966},{"style":286},[2967],{"type":57,"value":321},{"type":51,"tag":144,"props":2969,"children":2970},{"style":313},[2971],{"type":57,"value":2972},"dark",{"type":51,"tag":144,"props":2974,"children":2975},{"style":286},[2976],{"type":57,"value":321},{"type":51,"tag":144,"props":2978,"children":2979},{"style":286},[2980],{"type":57,"value":1390},{"type":51,"tag":144,"props":2982,"children":2983},{"style":286},[2984],{"type":57,"value":310},{"type":51,"tag":144,"props":2986,"children":2987},{"style":313},[2988],{"type":57,"value":2989},"slow",{"type":51,"tag":144,"props":2991,"children":2992},{"style":286},[2993],{"type":57,"value":321},{"type":51,"tag":144,"props":2995,"children":2996},{"style":292},[2997],{"type":57,"value":1655},{"type":51,"tag":144,"props":2999,"children":3000},{"style":286},[3001],{"type":57,"value":498},{"type":51,"tag":144,"props":3003,"children":3004},{"class":146,"line":210},[3005,3010,3014,3018,3022,3026],{"type":51,"tag":144,"props":3006,"children":3007},{"style":472},[3008],{"type":57,"value":3009},"      contextAdherence",{"type":51,"tag":144,"props":3011,"children":3012},{"style":286},[3013],{"type":57,"value":480},{"type":51,"tag":144,"props":3015,"children":3016},{"style":286},[3017],{"type":57,"value":310},{"type":51,"tag":144,"props":3019,"children":3020},{"style":313},[3021],{"type":57,"value":2112},{"type":51,"tag":144,"props":3023,"children":3024},{"style":286},[3025],{"type":57,"value":321},{"type":51,"tag":144,"props":3027,"children":3028},{"style":286},[3029],{"type":57,"value":498},{"type":51,"tag":144,"props":3031,"children":3032},{"class":146,"line":219},[3033],{"type":51,"tag":144,"props":3034,"children":3035},{"style":286},[3036],{"type":57,"value":3037},"    },\n",{"type":51,"tag":144,"props":3039,"children":3040},{"class":146,"line":228},[3041],{"type":51,"tag":144,"props":3042,"children":3043},{"style":286},[3044],{"type":57,"value":2801},{"type":51,"tag":144,"props":3046,"children":3047},{"class":146,"line":236},[3048,3052,3056,3060,3065,3069,3074,3078],{"type":51,"tag":144,"props":3049,"children":3050},{"style":472},[3051],{"type":57,"value":2809},{"type":51,"tag":144,"props":3053,"children":3054},{"style":286},[3055],{"type":57,"value":480},{"type":51,"tag":144,"props":3057,"children":3058},{"style":286},[3059],{"type":57,"value":310},{"type":51,"tag":144,"props":3061,"children":3062},{"style":313},[3063],{"type":57,"value":3064},"[Chorus]",{"type":51,"tag":144,"props":3066,"children":3067},{"style":292},[3068],{"type":57,"value":2445},{"type":51,"tag":144,"props":3070,"children":3071},{"style":313},[3072],{"type":57,"value":3073},"This is my moment",{"type":51,"tag":144,"props":3075,"children":3076},{"style":286},[3077],{"type":57,"value":321},{"type":51,"tag":144,"props":3079,"children":3080},{"style":286},[3081],{"type":57,"value":498},{"type":51,"tag":144,"props":3083,"children":3084},{"class":146,"line":245},[3085,3089,3093,3097],{"type":51,"tag":144,"props":3086,"children":3087},{"style":472},[3088],{"type":57,"value":2847},{"type":51,"tag":144,"props":3090,"children":3091},{"style":286},[3092],{"type":57,"value":480},{"type":51,"tag":144,"props":3094,"children":3095},{"style":513},[3096],{"type":57,"value":2856},{"type":51,"tag":144,"props":3098,"children":3099},{"style":286},[3100],{"type":57,"value":498},{"type":51,"tag":144,"props":3102,"children":3103},{"class":146,"line":254},[3104,3108,3112,3116,3120,3125,3129,3133,3137,3142,3146,3150],{"type":51,"tag":144,"props":3105,"children":3106},{"style":472},[3107],{"type":57,"value":2868},{"type":51,"tag":144,"props":3109,"children":3110},{"style":286},[3111],{"type":57,"value":480},{"type":51,"tag":144,"props":3113,"children":3114},{"style":292},[3115],{"type":57,"value":1528},{"type":51,"tag":144,"props":3117,"children":3118},{"style":286},[3119],{"type":57,"value":321},{"type":51,"tag":144,"props":3121,"children":3122},{"style":313},[3123],{"type":57,"value":3124},"powerful vocals",{"type":51,"tag":144,"props":3126,"children":3127},{"style":286},[3128],{"type":57,"value":321},{"type":51,"tag":144,"props":3130,"children":3131},{"style":286},[3132],{"type":57,"value":1390},{"type":51,"tag":144,"props":3134,"children":3135},{"style":286},[3136],{"type":57,"value":310},{"type":51,"tag":144,"props":3138,"children":3139},{"style":313},[3140],{"type":57,"value":3141},"full band",{"type":51,"tag":144,"props":3143,"children":3144},{"style":286},[3145],{"type":57,"value":321},{"type":51,"tag":144,"props":3147,"children":3148},{"style":292},[3149],{"type":57,"value":1655},{"type":51,"tag":144,"props":3151,"children":3152},{"style":286},[3153],{"type":57,"value":498},{"type":51,"tag":144,"props":3155,"children":3156},{"class":146,"line":1313},[3157,3161,3165,3170],{"type":51,"tag":144,"props":3158,"children":3159},{"style":472},[3160],{"type":57,"value":2955},{"type":51,"tag":144,"props":3162,"children":3163},{"style":286},[3164],{"type":57,"value":480},{"type":51,"tag":144,"props":3166,"children":3167},{"style":292},[3168],{"type":57,"value":3169}," []",{"type":51,"tag":144,"props":3171,"children":3172},{"style":286},[3173],{"type":57,"value":498},{"type":51,"tag":144,"props":3175,"children":3176},{"class":146,"line":2700},[3177,3181,3185,3189,3193,3197],{"type":51,"tag":144,"props":3178,"children":3179},{"style":472},[3180],{"type":57,"value":3009},{"type":51,"tag":144,"props":3182,"children":3183},{"style":286},[3184],{"type":57,"value":480},{"type":51,"tag":144,"props":3186,"children":3187},{"style":286},[3188],{"type":57,"value":310},{"type":51,"tag":144,"props":3190,"children":3191},{"style":313},[3192],{"type":57,"value":2112},{"type":51,"tag":144,"props":3194,"children":3195},{"style":286},[3196],{"type":57,"value":321},{"type":51,"tag":144,"props":3198,"children":3199},{"style":286},[3200],{"type":57,"value":498},{"type":51,"tag":144,"props":3202,"children":3203},{"class":146,"line":2708},[3204],{"type":51,"tag":144,"props":3205,"children":3206},{"style":286},[3207],{"type":57,"value":3037},{"type":51,"tag":144,"props":3209,"children":3210},{"class":146,"line":2716},[3211,3216],{"type":51,"tag":144,"props":3212,"children":3213},{"style":292},[3214],{"type":57,"value":3215},"  ]",{"type":51,"tag":144,"props":3217,"children":3218},{"style":286},[3219],{"type":57,"value":498},{"type":51,"tag":144,"props":3221,"children":3222},{"class":146,"line":2725},[3223],{"type":51,"tag":144,"props":3224,"children":3225},{"style":286},[3226],{"type":57,"value":3227},"};\n",{"type":51,"tag":144,"props":3229,"children":3230},{"class":146,"line":2734},[3231],{"type":51,"tag":144,"props":3232,"children":3233},{"emptyLinePlaceholder":160},[3234],{"type":57,"value":163},{"type":51,"tag":144,"props":3236,"children":3237},{"class":146,"line":2742},[3238,3242,3246,3250,3254,3258,3262,3266,3270,3274,3278],{"type":51,"tag":144,"props":3239,"children":3240},{"style":380},[3241],{"type":57,"value":383},{"type":51,"tag":144,"props":3243,"children":3244},{"style":292},[3245],{"type":57,"value":424},{"type":51,"tag":144,"props":3247,"children":3248},{"style":286},[3249],{"type":57,"value":393},{"type":51,"tag":144,"props":3251,"children":3252},{"style":280},[3253],{"type":57,"value":433},{"type":51,"tag":144,"props":3255,"children":3256},{"style":292},[3257],{"type":57,"value":438},{"type":51,"tag":144,"props":3259,"children":3260},{"style":286},[3261],{"type":57,"value":443},{"type":51,"tag":144,"props":3263,"children":3264},{"style":292},[3265],{"type":57,"value":4},{"type":51,"tag":144,"props":3267,"children":3268},{"style":286},[3269],{"type":57,"value":443},{"type":51,"tag":144,"props":3271,"children":3272},{"style":401},[3273],{"type":57,"value":456},{"type":51,"tag":144,"props":3275,"children":3276},{"style":292},[3277],{"type":57,"value":461},{"type":51,"tag":144,"props":3279,"children":3280},{"style":286},[3281],{"type":57,"value":466},{"type":51,"tag":144,"props":3283,"children":3285},{"class":146,"line":3284},21,[3286,3290],{"type":51,"tag":144,"props":3287,"children":3288},{"style":292},[3289],{"type":57,"value":2520},{"type":51,"tag":144,"props":3291,"children":3292},{"style":286},[3293],{"type":57,"value":498},{"type":51,"tag":144,"props":3295,"children":3297},{"class":146,"line":3296},22,[3298,3302,3306,3310,3314,3318],{"type":51,"tag":144,"props":3299,"children":3300},{"style":472},[3301],{"type":57,"value":528},{"type":51,"tag":144,"props":3303,"children":3304},{"style":286},[3305],{"type":57,"value":480},{"type":51,"tag":144,"props":3307,"children":3308},{"style":286},[3309],{"type":57,"value":310},{"type":51,"tag":144,"props":3311,"children":3312},{"style":313},[3313],{"type":57,"value":108},{"type":51,"tag":144,"props":3315,"children":3316},{"style":286},[3317],{"type":57,"value":321},{"type":51,"tag":144,"props":3319,"children":3320},{"style":286},[3321],{"type":57,"value":498},{"type":51,"tag":144,"props":3323,"children":3325},{"class":146,"line":3324},23,[3326,3330,3334],{"type":51,"tag":144,"props":3327,"children":3328},{"style":286},[3329],{"type":57,"value":556},{"type":51,"tag":144,"props":3331,"children":3332},{"style":292},[3333],{"type":57,"value":561},{"type":51,"tag":144,"props":3335,"children":3336},{"style":286},[3337],{"type":57,"value":326},{"type":51,"tag":60,"props":3339,"children":3340},{},[3341,3343,3348,3350,3355],{"type":57,"value":3342},"Put broader characteristics (genre, instrumentation, vocal style) in ",{"type":51,"tag":90,"props":3344,"children":3346},{"className":3345},[],[3347],{"type":57,"value":2075},{"type":57,"value":3349},", not in\n",{"type":51,"tag":90,"props":3351,"children":3353},{"className":3352},[],[3354],{"type":57,"value":57},{"type":57,"value":3356},". The first chunk's styles set the overall tone — include 6–7 styles there.",{"type":51,"tag":120,"props":3358,"children":3360},{"id":3359},"output-formats",[3361],{"type":57,"value":3362},"Output Formats",{"type":51,"tag":60,"props":3364,"children":3365},{},[3366,3367,3373,3375,3381,3383,3388,3390,3396,3398,3404,3406,3412],{"type":57,"value":1087},{"type":51,"tag":90,"props":3368,"children":3370},{"className":3369},[],[3371],{"type":57,"value":3372},"output_format",{"type":57,"value":3374}," query parameter on compose, detailed compose, or stream requests to select\nthe generated audio format. ",{"type":51,"tag":90,"props":3376,"children":3378},{"className":3377},[],[3379],{"type":57,"value":3380},"auto",{"type":57,"value":3382}," chooses a model-appropriate MP3 format; for ",{"type":51,"tag":90,"props":3384,"children":3386},{"className":3385},[],[3387],{"type":57,"value":108},{"type":57,"value":3389},", it\nselects ",{"type":51,"tag":90,"props":3391,"children":3393},{"className":3392},[],[3394],{"type":57,"value":3395},"mp3_48000_192",{"type":57,"value":3397},". Higher-bitrate MP3 options include ",{"type":51,"tag":90,"props":3399,"children":3401},{"className":3400},[],[3402],{"type":57,"value":3403},"mp3_48000_240",{"type":57,"value":3405}," and ",{"type":51,"tag":90,"props":3407,"children":3409},{"className":3408},[],[3410],{"type":57,"value":3411},"mp3_48000_320",{"type":57,"value":443},{"type":51,"tag":120,"props":3414,"children":3416},{"id":3415},"streaming",[3417],{"type":57,"value":3418},"Streaming",{"type":51,"tag":60,"props":3420,"children":3421},{},[3422],{"type":57,"value":3423},"For paid plans, stream audio chunks as they are generated instead of waiting for the full file:",{"type":51,"tag":134,"props":3425,"children":3427},{"className":136,"code":3426,"language":129,"meta":138,"style":138},"from io import BytesIO\n\nstream = client.music.stream(\n    prompt=\"A driving synthwave track with arpeggiated leads\",\n    music_length_ms=30000,\n    model_id=\"music_v2\",\n)\n\nbuffer = BytesIO()\nfor chunk in stream:\n    if chunk:\n        buffer.write(chunk)\n",[3428],{"type":51,"tag":90,"props":3429,"children":3430},{"__ignoreMap":138},[3431,3439,3446,3454,3462,3469,3476,3483,3490,3498,3506,3514],{"type":51,"tag":144,"props":3432,"children":3433},{"class":146,"line":147},[3434],{"type":51,"tag":144,"props":3435,"children":3436},{},[3437],{"type":57,"value":3438},"from io import BytesIO\n",{"type":51,"tag":144,"props":3440,"children":3441},{"class":146,"line":156},[3442],{"type":51,"tag":144,"props":3443,"children":3444},{"emptyLinePlaceholder":160},[3445],{"type":57,"value":163},{"type":51,"tag":144,"props":3447,"children":3448},{"class":146,"line":166},[3449],{"type":51,"tag":144,"props":3450,"children":3451},{},[3452],{"type":57,"value":3453},"stream = client.music.stream(\n",{"type":51,"tag":144,"props":3455,"children":3456},{"class":146,"line":175},[3457],{"type":51,"tag":144,"props":3458,"children":3459},{},[3460],{"type":57,"value":3461},"    prompt=\"A driving synthwave track with arpeggiated leads\",\n",{"type":51,"tag":144,"props":3463,"children":3464},{"class":146,"line":183},[3465],{"type":51,"tag":144,"props":3466,"children":3467},{},[3468],{"type":57,"value":207},{"type":51,"tag":144,"props":3470,"children":3471},{"class":146,"line":192},[3472],{"type":51,"tag":144,"props":3473,"children":3474},{},[3475],{"type":57,"value":216},{"type":51,"tag":144,"props":3477,"children":3478},{"class":146,"line":201},[3479],{"type":51,"tag":144,"props":3480,"children":3481},{},[3482],{"type":57,"value":225},{"type":51,"tag":144,"props":3484,"children":3485},{"class":146,"line":210},[3486],{"type":51,"tag":144,"props":3487,"children":3488},{"emptyLinePlaceholder":160},[3489],{"type":57,"value":163},{"type":51,"tag":144,"props":3491,"children":3492},{"class":146,"line":219},[3493],{"type":51,"tag":144,"props":3494,"children":3495},{},[3496],{"type":57,"value":3497},"buffer = BytesIO()\n",{"type":51,"tag":144,"props":3499,"children":3500},{"class":146,"line":228},[3501],{"type":51,"tag":144,"props":3502,"children":3503},{},[3504],{"type":57,"value":3505},"for chunk in stream:\n",{"type":51,"tag":144,"props":3507,"children":3508},{"class":146,"line":236},[3509],{"type":51,"tag":144,"props":3510,"children":3511},{},[3512],{"type":57,"value":3513},"    if chunk:\n",{"type":51,"tag":144,"props":3515,"children":3516},{"class":146,"line":245},[3517],{"type":51,"tag":144,"props":3518,"children":3519},{},[3520],{"type":57,"value":3521},"        buffer.write(chunk)\n",{"type":51,"tag":134,"props":3523,"children":3525},{"className":269,"code":3524,"language":263,"meta":138,"style":138},"const stream = await client.music.stream({\n  prompt: \"A driving synthwave track with arpeggiated leads\",\n  musicLengthMs: 30000,\n  modelId: \"music_v2\",\n});\n\nconst chunks: Buffer[] = [];\nfor await (const chunk of stream) {\n  chunks.push(chunk);\n}\n",[3526],{"type":51,"tag":90,"props":3527,"children":3528},{"__ignoreMap":138},[3529,3578,3606,3625,3652,3667,3674,3712,3751,3784],{"type":51,"tag":144,"props":3530,"children":3531},{"class":146,"line":147},[3532,3536,3541,3545,3549,3553,3557,3561,3565,3570,3574],{"type":51,"tag":144,"props":3533,"children":3534},{"style":380},[3535],{"type":57,"value":383},{"type":51,"tag":144,"props":3537,"children":3538},{"style":292},[3539],{"type":57,"value":3540}," stream ",{"type":51,"tag":144,"props":3542,"children":3543},{"style":286},[3544],{"type":57,"value":393},{"type":51,"tag":144,"props":3546,"children":3547},{"style":280},[3548],{"type":57,"value":433},{"type":51,"tag":144,"props":3550,"children":3551},{"style":292},[3552],{"type":57,"value":438},{"type":51,"tag":144,"props":3554,"children":3555},{"style":286},[3556],{"type":57,"value":443},{"type":51,"tag":144,"props":3558,"children":3559},{"style":292},[3560],{"type":57,"value":4},{"type":51,"tag":144,"props":3562,"children":3563},{"style":286},[3564],{"type":57,"value":443},{"type":51,"tag":144,"props":3566,"children":3567},{"style":401},[3568],{"type":57,"value":3569},"stream",{"type":51,"tag":144,"props":3571,"children":3572},{"style":292},[3573],{"type":57,"value":461},{"type":51,"tag":144,"props":3575,"children":3576},{"style":286},[3577],{"type":57,"value":466},{"type":51,"tag":144,"props":3579,"children":3580},{"class":146,"line":156},[3581,3585,3589,3593,3598,3602],{"type":51,"tag":144,"props":3582,"children":3583},{"style":472},[3584],{"type":57,"value":475},{"type":51,"tag":144,"props":3586,"children":3587},{"style":286},[3588],{"type":57,"value":480},{"type":51,"tag":144,"props":3590,"children":3591},{"style":286},[3592],{"type":57,"value":310},{"type":51,"tag":144,"props":3594,"children":3595},{"style":313},[3596],{"type":57,"value":3597},"A driving synthwave track with arpeggiated leads",{"type":51,"tag":144,"props":3599,"children":3600},{"style":286},[3601],{"type":57,"value":321},{"type":51,"tag":144,"props":3603,"children":3604},{"style":286},[3605],{"type":57,"value":498},{"type":51,"tag":144,"props":3607,"children":3608},{"class":146,"line":166},[3609,3613,3617,3621],{"type":51,"tag":144,"props":3610,"children":3611},{"style":472},[3612],{"type":57,"value":506},{"type":51,"tag":144,"props":3614,"children":3615},{"style":286},[3616],{"type":57,"value":480},{"type":51,"tag":144,"props":3618,"children":3619},{"style":513},[3620],{"type":57,"value":516},{"type":51,"tag":144,"props":3622,"children":3623},{"style":286},[3624],{"type":57,"value":498},{"type":51,"tag":144,"props":3626,"children":3627},{"class":146,"line":175},[3628,3632,3636,3640,3644,3648],{"type":51,"tag":144,"props":3629,"children":3630},{"style":472},[3631],{"type":57,"value":528},{"type":51,"tag":144,"props":3633,"children":3634},{"style":286},[3635],{"type":57,"value":480},{"type":51,"tag":144,"props":3637,"children":3638},{"style":286},[3639],{"type":57,"value":310},{"type":51,"tag":144,"props":3641,"children":3642},{"style":313},[3643],{"type":57,"value":108},{"type":51,"tag":144,"props":3645,"children":3646},{"style":286},[3647],{"type":57,"value":321},{"type":51,"tag":144,"props":3649,"children":3650},{"style":286},[3651],{"type":57,"value":498},{"type":51,"tag":144,"props":3653,"children":3654},{"class":146,"line":183},[3655,3659,3663],{"type":51,"tag":144,"props":3656,"children":3657},{"style":286},[3658],{"type":57,"value":556},{"type":51,"tag":144,"props":3660,"children":3661},{"style":292},[3662],{"type":57,"value":561},{"type":51,"tag":144,"props":3664,"children":3665},{"style":286},[3666],{"type":57,"value":326},{"type":51,"tag":144,"props":3668,"children":3669},{"class":146,"line":192},[3670],{"type":51,"tag":144,"props":3671,"children":3672},{"emptyLinePlaceholder":160},[3673],{"type":57,"value":163},{"type":51,"tag":144,"props":3675,"children":3676},{"class":146,"line":201},[3677,3681,3686,3690,3695,3700,3704,3708],{"type":51,"tag":144,"props":3678,"children":3679},{"style":380},[3680],{"type":57,"value":383},{"type":51,"tag":144,"props":3682,"children":3683},{"style":292},[3684],{"type":57,"value":3685}," chunks",{"type":51,"tag":144,"props":3687,"children":3688},{"style":286},[3689],{"type":57,"value":480},{"type":51,"tag":144,"props":3691,"children":3692},{"style":637},[3693],{"type":57,"value":3694}," Buffer",{"type":51,"tag":144,"props":3696,"children":3697},{"style":292},[3698],{"type":57,"value":3699},"[] ",{"type":51,"tag":144,"props":3701,"children":3702},{"style":286},[3703],{"type":57,"value":393},{"type":51,"tag":144,"props":3705,"children":3706},{"style":292},[3707],{"type":57,"value":3169},{"type":51,"tag":144,"props":3709,"children":3710},{"style":286},[3711],{"type":57,"value":326},{"type":51,"tag":144,"props":3713,"children":3714},{"class":146,"line":210},[3715,3720,3724,3728,3732,3737,3742,3747],{"type":51,"tag":144,"props":3716,"children":3717},{"style":280},[3718],{"type":57,"value":3719},"for",{"type":51,"tag":144,"props":3721,"children":3722},{"style":280},[3723],{"type":57,"value":433},{"type":51,"tag":144,"props":3725,"children":3726},{"style":292},[3727],{"type":57,"value":1157},{"type":51,"tag":144,"props":3729,"children":3730},{"style":380},[3731],{"type":57,"value":383},{"type":51,"tag":144,"props":3733,"children":3734},{"style":292},[3735],{"type":57,"value":3736}," chunk ",{"type":51,"tag":144,"props":3738,"children":3739},{"style":286},[3740],{"type":57,"value":3741},"of",{"type":51,"tag":144,"props":3743,"children":3744},{"style":292},[3745],{"type":57,"value":3746}," stream) ",{"type":51,"tag":144,"props":3748,"children":3749},{"style":286},[3750],{"type":57,"value":466},{"type":51,"tag":144,"props":3752,"children":3753},{"class":146,"line":219},[3754,3758,3762,3767,3771,3776,3780],{"type":51,"tag":144,"props":3755,"children":3756},{"style":292},[3757],{"type":57,"value":2784},{"type":51,"tag":144,"props":3759,"children":3760},{"style":286},[3761],{"type":57,"value":443},{"type":51,"tag":144,"props":3763,"children":3764},{"style":401},[3765],{"type":57,"value":3766},"push",{"type":51,"tag":144,"props":3768,"children":3769},{"style":472},[3770],{"type":57,"value":461},{"type":51,"tag":144,"props":3772,"children":3773},{"style":292},[3774],{"type":57,"value":3775},"chunk",{"type":51,"tag":144,"props":3777,"children":3778},{"style":472},[3779],{"type":57,"value":561},{"type":51,"tag":144,"props":3781,"children":3782},{"style":286},[3783],{"type":57,"value":326},{"type":51,"tag":144,"props":3785,"children":3786},{"class":146,"line":228},[3787],{"type":51,"tag":144,"props":3788,"children":3789},{"style":286},[3790],{"type":57,"value":2731},{"type":51,"tag":127,"props":3792,"children":3794},{"id":3793},"detailed-streaming",[3795],{"type":57,"value":3796},"Detailed streaming",{"type":51,"tag":60,"props":3798,"children":3799},{},[3800,3802,3808,3810,3816,3818,3824],{"type":57,"value":3801},"Use detailed streaming when the application needs generated music metadata while audio is still\narriving. ",{"type":51,"tag":90,"props":3803,"children":3805},{"className":3804},[],[3806],{"type":57,"value":3807},"POST \u002Fv1\u002Fmusic\u002Fdetailed\u002Fstream",{"type":57,"value":3809}," accepts the same prompt or composition-plan body as\ndetailed compose, streams ",{"type":51,"tag":90,"props":3811,"children":3813},{"className":3812},[],[3814],{"type":57,"value":3815},"text\u002Fevent-stream",{"type":57,"value":3817},", and can include word timestamps with\n",{"type":51,"tag":90,"props":3819,"children":3821},{"className":3820},[],[3822],{"type":57,"value":3823},"with_timestamps",{"type":57,"value":443},{"type":51,"tag":134,"props":3826,"children":3828},{"className":625,"code":3827,"language":627,"meta":138,"style":138},"curl -N -X POST \"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\u002Fdetailed\u002Fstream?output_format=auto\" \\\n  -H \"xi-api-key: $ELEVENLABS_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"prompt\": \"A bright indie pop hook with warm guitars\", \"music_length_ms\": 30000, \"model_id\": \"music_v2\", \"with_timestamps\": true}'\n",[3829],{"type":51,"tag":90,"props":3830,"children":3831},{"__ignoreMap":138},[3832,3869,3896,3919],{"type":51,"tag":144,"props":3833,"children":3834},{"class":146,"line":147},[3835,3839,3844,3848,3852,3856,3861,3865],{"type":51,"tag":144,"props":3836,"children":3837},{"style":637},[3838],{"type":57,"value":619},{"type":51,"tag":144,"props":3840,"children":3841},{"style":313},[3842],{"type":57,"value":3843}," -N",{"type":51,"tag":144,"props":3845,"children":3846},{"style":313},[3847],{"type":57,"value":644},{"type":51,"tag":144,"props":3849,"children":3850},{"style":313},[3851],{"type":57,"value":649},{"type":51,"tag":144,"props":3853,"children":3854},{"style":286},[3855],{"type":57,"value":310},{"type":51,"tag":144,"props":3857,"children":3858},{"style":313},[3859],{"type":57,"value":3860},"https:\u002F\u002Fapi.elevenlabs.io\u002Fv1\u002Fmusic\u002Fdetailed\u002Fstream?output_format=auto",{"type":51,"tag":144,"props":3862,"children":3863},{"style":286},[3864],{"type":57,"value":321},{"type":51,"tag":144,"props":3866,"children":3867},{"style":292},[3868],{"type":57,"value":667},{"type":51,"tag":144,"props":3870,"children":3871},{"class":146,"line":156},[3872,3876,3880,3884,3888,3892],{"type":51,"tag":144,"props":3873,"children":3874},{"style":313},[3875],{"type":57,"value":675},{"type":51,"tag":144,"props":3877,"children":3878},{"style":286},[3879],{"type":57,"value":310},{"type":51,"tag":144,"props":3881,"children":3882},{"style":313},[3883],{"type":57,"value":684},{"type":51,"tag":144,"props":3885,"children":3886},{"style":292},[3887],{"type":57,"value":689},{"type":51,"tag":144,"props":3889,"children":3890},{"style":286},[3891],{"type":57,"value":321},{"type":51,"tag":144,"props":3893,"children":3894},{"style":292},[3895],{"type":57,"value":667},{"type":51,"tag":144,"props":3897,"children":3898},{"class":146,"line":166},[3899,3903,3907,3911,3915],{"type":51,"tag":144,"props":3900,"children":3901},{"style":313},[3902],{"type":57,"value":675},{"type":51,"tag":144,"props":3904,"children":3905},{"style":286},[3906],{"type":57,"value":310},{"type":51,"tag":144,"props":3908,"children":3909},{"style":313},[3910],{"type":57,"value":707},{"type":51,"tag":144,"props":3912,"children":3913},{"style":286},[3914],{"type":57,"value":321},{"type":51,"tag":144,"props":3916,"children":3917},{"style":292},[3918],{"type":57,"value":667},{"type":51,"tag":144,"props":3920,"children":3921},{"class":146,"line":175},[3922,3926,3930,3935],{"type":51,"tag":144,"props":3923,"children":3924},{"style":313},[3925],{"type":57,"value":723},{"type":51,"tag":144,"props":3927,"children":3928},{"style":286},[3929],{"type":57,"value":728},{"type":51,"tag":144,"props":3931,"children":3932},{"style":313},[3933],{"type":57,"value":3934},"{\"prompt\": \"A bright indie pop hook with warm guitars\", \"music_length_ms\": 30000, \"model_id\": \"music_v2\", \"with_timestamps\": true}",{"type":51,"tag":144,"props":3936,"children":3937},{"style":286},[3938],{"type":57,"value":3939},"'\n",{"type":51,"tag":120,"props":3941,"children":3943},{"id":3942},"inpainting",[3944],{"type":57,"value":3945},"Inpainting",{"type":51,"tag":60,"props":3947,"children":3948},{},[3949,3951,3956,3958,3963],{"type":57,"value":3950},"Inpainting edits or extends a stored song by mixing ",{"type":51,"tag":73,"props":3952,"children":3953},{},[3954],{"type":57,"value":3955},"audio reference chunks",{"type":57,"value":3957}," (unchanged slices\nof a stored song) with new ",{"type":51,"tag":73,"props":3959,"children":3960},{},[3961],{"type":57,"value":3962},"generation chunks",{"type":57,"value":3964}," in a single composition plan.",{"type":51,"tag":60,"props":3966,"children":3967},{},[3968,3970,3976],{"type":57,"value":3969},"Step 1 — get a ",{"type":51,"tag":90,"props":3971,"children":3973},{"className":3972},[],[3974],{"type":57,"value":3975},"song_id",{"type":57,"value":3977},", either by storing a fresh generation or uploading existing audio:",{"type":51,"tag":134,"props":3979,"children":3981},{"className":136,"code":3980,"language":129,"meta":138,"style":138},"# Option A: keep a generation for later editing\nresult = client.music.compose_detailed(\n    prompt=\"An upbeat pop song with verse and chorus\",\n    music_length_ms=60000,\n    model_id=\"music_v2\",\n    store_for_inpainting=True,\n)\nsong_id = result.song_id\n\n# Option B: upload an existing track and extract its plan\nuploaded = client.music.upload(\n    file=open(\"my-song.mp3\", \"rb\"),\n    extract_composition_plan=\"music_v2\",\n)\nsong_id = uploaded.song_id\ncomposition_plan = uploaded.composition_plan\n",[3982],{"type":51,"tag":90,"props":3983,"children":3984},{"__ignoreMap":138},[3985,3993,4001,4009,4016,4023,4031,4038,4046,4053,4061,4069,4077,4085,4092,4100],{"type":51,"tag":144,"props":3986,"children":3987},{"class":146,"line":147},[3988],{"type":51,"tag":144,"props":3989,"children":3990},{},[3991],{"type":57,"value":3992},"# Option A: keep a generation for later editing\n",{"type":51,"tag":144,"props":3994,"children":3995},{"class":146,"line":156},[3996],{"type":51,"tag":144,"props":3997,"children":3998},{},[3999],{"type":57,"value":4000},"result = client.music.compose_detailed(\n",{"type":51,"tag":144,"props":4002,"children":4003},{"class":146,"line":166},[4004],{"type":51,"tag":144,"props":4005,"children":4006},{},[4007],{"type":57,"value":4008},"    prompt=\"An upbeat pop song with verse and chorus\",\n",{"type":51,"tag":144,"props":4010,"children":4011},{"class":146,"line":175},[4012],{"type":51,"tag":144,"props":4013,"children":4014},{},[4015],{"type":57,"value":2157},{"type":51,"tag":144,"props":4017,"children":4018},{"class":146,"line":183},[4019],{"type":51,"tag":144,"props":4020,"children":4021},{},[4022],{"type":57,"value":216},{"type":51,"tag":144,"props":4024,"children":4025},{"class":146,"line":192},[4026],{"type":51,"tag":144,"props":4027,"children":4028},{},[4029],{"type":57,"value":4030},"    store_for_inpainting=True,\n",{"type":51,"tag":144,"props":4032,"children":4033},{"class":146,"line":201},[4034],{"type":51,"tag":144,"props":4035,"children":4036},{},[4037],{"type":57,"value":225},{"type":51,"tag":144,"props":4039,"children":4040},{"class":146,"line":210},[4041],{"type":51,"tag":144,"props":4042,"children":4043},{},[4044],{"type":57,"value":4045},"song_id = result.song_id\n",{"type":51,"tag":144,"props":4047,"children":4048},{"class":146,"line":219},[4049],{"type":51,"tag":144,"props":4050,"children":4051},{"emptyLinePlaceholder":160},[4052],{"type":57,"value":163},{"type":51,"tag":144,"props":4054,"children":4055},{"class":146,"line":228},[4056],{"type":51,"tag":144,"props":4057,"children":4058},{},[4059],{"type":57,"value":4060},"# Option B: upload an existing track and extract its plan\n",{"type":51,"tag":144,"props":4062,"children":4063},{"class":146,"line":236},[4064],{"type":51,"tag":144,"props":4065,"children":4066},{},[4067],{"type":57,"value":4068},"uploaded = client.music.upload(\n",{"type":51,"tag":144,"props":4070,"children":4071},{"class":146,"line":245},[4072],{"type":51,"tag":144,"props":4073,"children":4074},{},[4075],{"type":57,"value":4076},"    file=open(\"my-song.mp3\", \"rb\"),\n",{"type":51,"tag":144,"props":4078,"children":4079},{"class":146,"line":254},[4080],{"type":51,"tag":144,"props":4081,"children":4082},{},[4083],{"type":57,"value":4084},"    extract_composition_plan=\"music_v2\",\n",{"type":51,"tag":144,"props":4086,"children":4087},{"class":146,"line":1313},[4088],{"type":51,"tag":144,"props":4089,"children":4090},{},[4091],{"type":57,"value":225},{"type":51,"tag":144,"props":4093,"children":4094},{"class":146,"line":2700},[4095],{"type":51,"tag":144,"props":4096,"children":4097},{},[4098],{"type":57,"value":4099},"song_id = uploaded.song_id\n",{"type":51,"tag":144,"props":4101,"children":4102},{"class":146,"line":2708},[4103],{"type":51,"tag":144,"props":4104,"children":4105},{},[4106],{"type":57,"value":4107},"composition_plan = uploaded.composition_plan\n",{"type":51,"tag":134,"props":4109,"children":4111},{"className":269,"code":4110,"language":263,"meta":138,"style":138},"import { createReadStream } from \"fs\";\n\n\u002F\u002F Option A: keep a generation for later editing\nconst result = await client.music.composeDetailed({\n  prompt: \"An upbeat pop song with verse and chorus\",\n  musicLengthMs: 60000,\n  modelId: \"music_v2\",\n  storeForInpainting: true,\n});\nlet songId = result.songId;\n\n\u002F\u002F Option B: upload an existing track and extract its plan\nconst uploaded = await client.music.upload({\n  file: createReadStream(\"my-song.mp3\"),\n  extractCompositionPlan: \"music_v2\",\n});\nsongId = uploaded.songId;\nconst compositionPlan = uploaded.compositionPlan;\n",[4112],{"type":51,"tag":90,"props":4113,"children":4114},{"__ignoreMap":138},[4115,4154,4161,4170,4219,4247,4266,4293,4315,4330,4365,4372,4380,4429,4470,4498,4513,4542],{"type":51,"tag":144,"props":4116,"children":4117},{"class":146,"line":147},[4118,4122,4126,4130,4134,4138,4142,4146,4150],{"type":51,"tag":144,"props":4119,"children":4120},{"style":280},[4121],{"type":57,"value":283},{"type":51,"tag":144,"props":4123,"children":4124},{"style":286},[4125],{"type":57,"value":289},{"type":51,"tag":144,"props":4127,"children":4128},{"style":292},[4129],{"type":57,"value":1385},{"type":51,"tag":144,"props":4131,"children":4132},{"style":286},[4133],{"type":57,"value":300},{"type":51,"tag":144,"props":4135,"children":4136},{"style":280},[4137],{"type":57,"value":305},{"type":51,"tag":144,"props":4139,"children":4140},{"style":286},[4141],{"type":57,"value":310},{"type":51,"tag":144,"props":4143,"children":4144},{"style":313},[4145],{"type":57,"value":359},{"type":51,"tag":144,"props":4147,"children":4148},{"style":286},[4149],{"type":57,"value":321},{"type":51,"tag":144,"props":4151,"children":4152},{"style":286},[4153],{"type":57,"value":326},{"type":51,"tag":144,"props":4155,"children":4156},{"class":146,"line":156},[4157],{"type":51,"tag":144,"props":4158,"children":4159},{"emptyLinePlaceholder":160},[4160],{"type":57,"value":163},{"type":51,"tag":144,"props":4162,"children":4163},{"class":146,"line":166},[4164],{"type":51,"tag":144,"props":4165,"children":4167},{"style":4166},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[4168],{"type":57,"value":4169},"\u002F\u002F Option A: keep a generation for later editing\n",{"type":51,"tag":144,"props":4171,"children":4172},{"class":146,"line":175},[4173,4177,4182,4186,4190,4194,4198,4202,4206,4211,4215],{"type":51,"tag":144,"props":4174,"children":4175},{"style":380},[4176],{"type":57,"value":383},{"type":51,"tag":144,"props":4178,"children":4179},{"style":292},[4180],{"type":57,"value":4181}," result ",{"type":51,"tag":144,"props":4183,"children":4184},{"style":286},[4185],{"type":57,"value":393},{"type":51,"tag":144,"props":4187,"children":4188},{"style":280},[4189],{"type":57,"value":433},{"type":51,"tag":144,"props":4191,"children":4192},{"style":292},[4193],{"type":57,"value":438},{"type":51,"tag":144,"props":4195,"children":4196},{"style":286},[4197],{"type":57,"value":443},{"type":51,"tag":144,"props":4199,"children":4200},{"style":292},[4201],{"type":57,"value":4},{"type":51,"tag":144,"props":4203,"children":4204},{"style":286},[4205],{"type":57,"value":443},{"type":51,"tag":144,"props":4207,"children":4208},{"style":401},[4209],{"type":57,"value":4210},"composeDetailed",{"type":51,"tag":144,"props":4212,"children":4213},{"style":292},[4214],{"type":57,"value":461},{"type":51,"tag":144,"props":4216,"children":4217},{"style":286},[4218],{"type":57,"value":466},{"type":51,"tag":144,"props":4220,"children":4221},{"class":146,"line":183},[4222,4226,4230,4234,4239,4243],{"type":51,"tag":144,"props":4223,"children":4224},{"style":472},[4225],{"type":57,"value":475},{"type":51,"tag":144,"props":4227,"children":4228},{"style":286},[4229],{"type":57,"value":480},{"type":51,"tag":144,"props":4231,"children":4232},{"style":286},[4233],{"type":57,"value":310},{"type":51,"tag":144,"props":4235,"children":4236},{"style":313},[4237],{"type":57,"value":4238},"An upbeat pop song with verse and chorus",{"type":51,"tag":144,"props":4240,"children":4241},{"style":286},[4242],{"type":57,"value":321},{"type":51,"tag":144,"props":4244,"children":4245},{"style":286},[4246],{"type":57,"value":498},{"type":51,"tag":144,"props":4248,"children":4249},{"class":146,"line":192},[4250,4254,4258,4262],{"type":51,"tag":144,"props":4251,"children":4252},{"style":472},[4253],{"type":57,"value":506},{"type":51,"tag":144,"props":4255,"children":4256},{"style":286},[4257],{"type":57,"value":480},{"type":51,"tag":144,"props":4259,"children":4260},{"style":513},[4261],{"type":57,"value":2339},{"type":51,"tag":144,"props":4263,"children":4264},{"style":286},[4265],{"type":57,"value":498},{"type":51,"tag":144,"props":4267,"children":4268},{"class":146,"line":201},[4269,4273,4277,4281,4285,4289],{"type":51,"tag":144,"props":4270,"children":4271},{"style":472},[4272],{"type":57,"value":528},{"type":51,"tag":144,"props":4274,"children":4275},{"style":286},[4276],{"type":57,"value":480},{"type":51,"tag":144,"props":4278,"children":4279},{"style":286},[4280],{"type":57,"value":310},{"type":51,"tag":144,"props":4282,"children":4283},{"style":313},[4284],{"type":57,"value":108},{"type":51,"tag":144,"props":4286,"children":4287},{"style":286},[4288],{"type":57,"value":321},{"type":51,"tag":144,"props":4290,"children":4291},{"style":286},[4292],{"type":57,"value":498},{"type":51,"tag":144,"props":4294,"children":4295},{"class":146,"line":210},[4296,4301,4305,4311],{"type":51,"tag":144,"props":4297,"children":4298},{"style":472},[4299],{"type":57,"value":4300},"  storeForInpainting",{"type":51,"tag":144,"props":4302,"children":4303},{"style":286},[4304],{"type":57,"value":480},{"type":51,"tag":144,"props":4306,"children":4308},{"style":4307},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[4309],{"type":57,"value":4310}," true",{"type":51,"tag":144,"props":4312,"children":4313},{"style":286},[4314],{"type":57,"value":498},{"type":51,"tag":144,"props":4316,"children":4317},{"class":146,"line":219},[4318,4322,4326],{"type":51,"tag":144,"props":4319,"children":4320},{"style":286},[4321],{"type":57,"value":556},{"type":51,"tag":144,"props":4323,"children":4324},{"style":292},[4325],{"type":57,"value":561},{"type":51,"tag":144,"props":4327,"children":4328},{"style":286},[4329],{"type":57,"value":326},{"type":51,"tag":144,"props":4331,"children":4332},{"class":146,"line":228},[4333,4338,4343,4347,4352,4356,4361],{"type":51,"tag":144,"props":4334,"children":4335},{"style":380},[4336],{"type":57,"value":4337},"let",{"type":51,"tag":144,"props":4339,"children":4340},{"style":292},[4341],{"type":57,"value":4342}," songId ",{"type":51,"tag":144,"props":4344,"children":4345},{"style":286},[4346],{"type":57,"value":393},{"type":51,"tag":144,"props":4348,"children":4349},{"style":292},[4350],{"type":57,"value":4351}," result",{"type":51,"tag":144,"props":4353,"children":4354},{"style":286},[4355],{"type":57,"value":443},{"type":51,"tag":144,"props":4357,"children":4358},{"style":292},[4359],{"type":57,"value":4360},"songId",{"type":51,"tag":144,"props":4362,"children":4363},{"style":286},[4364],{"type":57,"value":326},{"type":51,"tag":144,"props":4366,"children":4367},{"class":146,"line":236},[4368],{"type":51,"tag":144,"props":4369,"children":4370},{"emptyLinePlaceholder":160},[4371],{"type":57,"value":163},{"type":51,"tag":144,"props":4373,"children":4374},{"class":146,"line":245},[4375],{"type":51,"tag":144,"props":4376,"children":4377},{"style":4166},[4378],{"type":57,"value":4379},"\u002F\u002F Option B: upload an existing track and extract its plan\n",{"type":51,"tag":144,"props":4381,"children":4382},{"class":146,"line":254},[4383,4387,4392,4396,4400,4404,4408,4412,4416,4421,4425],{"type":51,"tag":144,"props":4384,"children":4385},{"style":380},[4386],{"type":57,"value":383},{"type":51,"tag":144,"props":4388,"children":4389},{"style":292},[4390],{"type":57,"value":4391}," uploaded ",{"type":51,"tag":144,"props":4393,"children":4394},{"style":286},[4395],{"type":57,"value":393},{"type":51,"tag":144,"props":4397,"children":4398},{"style":280},[4399],{"type":57,"value":433},{"type":51,"tag":144,"props":4401,"children":4402},{"style":292},[4403],{"type":57,"value":438},{"type":51,"tag":144,"props":4405,"children":4406},{"style":286},[4407],{"type":57,"value":443},{"type":51,"tag":144,"props":4409,"children":4410},{"style":292},[4411],{"type":57,"value":4},{"type":51,"tag":144,"props":4413,"children":4414},{"style":286},[4415],{"type":57,"value":443},{"type":51,"tag":144,"props":4417,"children":4418},{"style":401},[4419],{"type":57,"value":4420},"upload",{"type":51,"tag":144,"props":4422,"children":4423},{"style":292},[4424],{"type":57,"value":461},{"type":51,"tag":144,"props":4426,"children":4427},{"style":286},[4428],{"type":57,"value":466},{"type":51,"tag":144,"props":4430,"children":4431},{"class":146,"line":1313},[4432,4437,4441,4445,4449,4453,4458,4462,4466],{"type":51,"tag":144,"props":4433,"children":4434},{"style":472},[4435],{"type":57,"value":4436},"  file",{"type":51,"tag":144,"props":4438,"children":4439},{"style":286},[4440],{"type":57,"value":480},{"type":51,"tag":144,"props":4442,"children":4443},{"style":401},[4444],{"type":57,"value":1385},{"type":51,"tag":144,"props":4446,"children":4447},{"style":292},[4448],{"type":57,"value":461},{"type":51,"tag":144,"props":4450,"children":4451},{"style":286},[4452],{"type":57,"value":321},{"type":51,"tag":144,"props":4454,"children":4455},{"style":313},[4456],{"type":57,"value":4457},"my-song.mp3",{"type":51,"tag":144,"props":4459,"children":4460},{"style":286},[4461],{"type":57,"value":321},{"type":51,"tag":144,"props":4463,"children":4464},{"style":292},[4465],{"type":57,"value":561},{"type":51,"tag":144,"props":4467,"children":4468},{"style":286},[4469],{"type":57,"value":498},{"type":51,"tag":144,"props":4471,"children":4472},{"class":146,"line":2700},[4473,4478,4482,4486,4490,4494],{"type":51,"tag":144,"props":4474,"children":4475},{"style":472},[4476],{"type":57,"value":4477},"  extractCompositionPlan",{"type":51,"tag":144,"props":4479,"children":4480},{"style":286},[4481],{"type":57,"value":480},{"type":51,"tag":144,"props":4483,"children":4484},{"style":286},[4485],{"type":57,"value":310},{"type":51,"tag":144,"props":4487,"children":4488},{"style":313},[4489],{"type":57,"value":108},{"type":51,"tag":144,"props":4491,"children":4492},{"style":286},[4493],{"type":57,"value":321},{"type":51,"tag":144,"props":4495,"children":4496},{"style":286},[4497],{"type":57,"value":498},{"type":51,"tag":144,"props":4499,"children":4500},{"class":146,"line":2708},[4501,4505,4509],{"type":51,"tag":144,"props":4502,"children":4503},{"style":286},[4504],{"type":57,"value":556},{"type":51,"tag":144,"props":4506,"children":4507},{"style":292},[4508],{"type":57,"value":561},{"type":51,"tag":144,"props":4510,"children":4511},{"style":286},[4512],{"type":57,"value":326},{"type":51,"tag":144,"props":4514,"children":4515},{"class":146,"line":2716},[4516,4521,4525,4530,4534,4538],{"type":51,"tag":144,"props":4517,"children":4518},{"style":292},[4519],{"type":57,"value":4520},"songId ",{"type":51,"tag":144,"props":4522,"children":4523},{"style":286},[4524],{"type":57,"value":393},{"type":51,"tag":144,"props":4526,"children":4527},{"style":292},[4528],{"type":57,"value":4529}," uploaded",{"type":51,"tag":144,"props":4531,"children":4532},{"style":286},[4533],{"type":57,"value":443},{"type":51,"tag":144,"props":4535,"children":4536},{"style":292},[4537],{"type":57,"value":4360},{"type":51,"tag":144,"props":4539,"children":4540},{"style":286},[4541],{"type":57,"value":326},{"type":51,"tag":144,"props":4543,"children":4544},{"class":146,"line":2725},[4545,4549,4553,4557,4561,4565,4569],{"type":51,"tag":144,"props":4546,"children":4547},{"style":380},[4548],{"type":57,"value":383},{"type":51,"tag":144,"props":4550,"children":4551},{"style":292},[4552],{"type":57,"value":2767},{"type":51,"tag":144,"props":4554,"children":4555},{"style":286},[4556],{"type":57,"value":393},{"type":51,"tag":144,"props":4558,"children":4559},{"style":292},[4560],{"type":57,"value":4529},{"type":51,"tag":144,"props":4562,"children":4563},{"style":286},[4564],{"type":57,"value":443},{"type":51,"tag":144,"props":4566,"children":4567},{"style":292},[4568],{"type":57,"value":2278},{"type":51,"tag":144,"props":4570,"children":4571},{"style":286},[4572],{"type":57,"value":326},{"type":51,"tag":60,"props":4574,"children":4575},{},[4576],{"type":57,"value":4577},"Step 2 — compose a plan that references the stored audio and regenerates the part you want to\nchange:",{"type":51,"tag":134,"props":4579,"children":4581},{"className":136,"code":4580,"language":129,"meta":138,"style":138},"plan = {\n    \"chunks\": [\n        {\"song_id\": song_id, \"range\": {\"start_ms\": 0, \"end_ms\": 30000}},\n        {\n            \"text\": \"[Chorus]\\nWe're rising up tonight\",\n            \"duration_ms\": 30000,\n            \"positive_styles\": [\"bigger drums\", \"layered vocals\", \"anthemic\"],\n            \"negative_styles\": [\"sparse\"],\n            \"context_adherence\": \"high\",\n        },\n    ]\n}\n\naudio = client.music.compose(composition_plan=plan, model_id=\"music_v2\")\n",[4582],{"type":51,"tag":90,"props":4583,"children":4584},{"__ignoreMap":138},[4585,4593,4600,4608,4615,4623,4631,4639,4647,4654,4661,4668,4675,4682],{"type":51,"tag":144,"props":4586,"children":4587},{"class":146,"line":147},[4588],{"type":51,"tag":144,"props":4589,"children":4590},{},[4591],{"type":57,"value":4592},"plan = {\n",{"type":51,"tag":144,"props":4594,"children":4595},{"class":146,"line":156},[4596],{"type":51,"tag":144,"props":4597,"children":4598},{},[4599],{"type":57,"value":2603},{"type":51,"tag":144,"props":4601,"children":4602},{"class":146,"line":166},[4603],{"type":51,"tag":144,"props":4604,"children":4605},{},[4606],{"type":57,"value":4607},"        {\"song_id\": song_id, \"range\": {\"start_ms\": 0, \"end_ms\": 30000}},\n",{"type":51,"tag":144,"props":4609,"children":4610},{"class":146,"line":175},[4611],{"type":51,"tag":144,"props":4612,"children":4613},{},[4614],{"type":57,"value":2611},{"type":51,"tag":144,"props":4616,"children":4617},{"class":146,"line":183},[4618],{"type":51,"tag":144,"props":4619,"children":4620},{},[4621],{"type":57,"value":4622},"            \"text\": \"[Chorus]\\nWe're rising up tonight\",\n",{"type":51,"tag":144,"props":4624,"children":4625},{"class":146,"line":192},[4626],{"type":51,"tag":144,"props":4627,"children":4628},{},[4629],{"type":57,"value":4630},"            \"duration_ms\": 30000,\n",{"type":51,"tag":144,"props":4632,"children":4633},{"class":146,"line":201},[4634],{"type":51,"tag":144,"props":4635,"children":4636},{},[4637],{"type":57,"value":4638},"            \"positive_styles\": [\"bigger drums\", \"layered vocals\", \"anthemic\"],\n",{"type":51,"tag":144,"props":4640,"children":4641},{"class":146,"line":210},[4642],{"type":51,"tag":144,"props":4643,"children":4644},{},[4645],{"type":57,"value":4646},"            \"negative_styles\": [\"sparse\"],\n",{"type":51,"tag":144,"props":4648,"children":4649},{"class":146,"line":219},[4650],{"type":51,"tag":144,"props":4651,"children":4652},{},[4653],{"type":57,"value":2651},{"type":51,"tag":144,"props":4655,"children":4656},{"class":146,"line":228},[4657],{"type":51,"tag":144,"props":4658,"children":4659},{},[4660],{"type":57,"value":2659},{"type":51,"tag":144,"props":4662,"children":4663},{"class":146,"line":236},[4664],{"type":51,"tag":144,"props":4665,"children":4666},{},[4667],{"type":57,"value":2722},{"type":51,"tag":144,"props":4669,"children":4670},{"class":146,"line":245},[4671],{"type":51,"tag":144,"props":4672,"children":4673},{},[4674],{"type":57,"value":2731},{"type":51,"tag":144,"props":4676,"children":4677},{"class":146,"line":254},[4678],{"type":51,"tag":144,"props":4679,"children":4680},{"emptyLinePlaceholder":160},[4681],{"type":57,"value":163},{"type":51,"tag":144,"props":4683,"children":4684},{"class":146,"line":1313},[4685],{"type":51,"tag":144,"props":4686,"children":4687},{},[4688],{"type":57,"value":4689},"audio = client.music.compose(composition_plan=plan, model_id=\"music_v2\")\n",{"type":51,"tag":134,"props":4691,"children":4693},{"className":269,"code":4692,"language":263,"meta":138,"style":138},"const plan = {\n  chunks: [\n    { songId, range: { startMs: 0, endMs: 30000 } },\n    {\n      text: \"[Chorus]\\nWe're rising up tonight\",\n      durationMs: 30000,\n      positiveStyles: [\"bigger drums\", \"layered vocals\", \"anthemic\"],\n      negativeStyles: [\"sparse\"],\n      contextAdherence: \"high\",\n    },\n  ],\n};\n\nconst audio = await client.music.compose({\n  compositionPlan: plan,\n  modelId: \"music_v2\",\n});\n",[4694],{"type":51,"tag":90,"props":4695,"children":4696},{"__ignoreMap":138},[4697,4716,4731,4801,4808,4844,4863,4933,4969,4996,5003,5014,5021,5028,5075,5094,5121],{"type":51,"tag":144,"props":4698,"children":4699},{"class":146,"line":147},[4700,4704,4708,4712],{"type":51,"tag":144,"props":4701,"children":4702},{"style":380},[4703],{"type":57,"value":383},{"type":51,"tag":144,"props":4705,"children":4706},{"style":292},[4707],{"type":57,"value":2249},{"type":51,"tag":144,"props":4709,"children":4710},{"style":286},[4711],{"type":57,"value":393},{"type":51,"tag":144,"props":4713,"children":4714},{"style":286},[4715],{"type":57,"value":2776},{"type":51,"tag":144,"props":4717,"children":4718},{"class":146,"line":156},[4719,4723,4727],{"type":51,"tag":144,"props":4720,"children":4721},{"style":472},[4722],{"type":57,"value":2784},{"type":51,"tag":144,"props":4724,"children":4725},{"style":286},[4726],{"type":57,"value":480},{"type":51,"tag":144,"props":4728,"children":4729},{"style":292},[4730],{"type":57,"value":2793},{"type":51,"tag":144,"props":4732,"children":4733},{"class":146,"line":166},[4734,4739,4744,4748,4753,4757,4761,4766,4770,4775,4779,4784,4788,4792,4796],{"type":51,"tag":144,"props":4735,"children":4736},{"style":286},[4737],{"type":57,"value":4738},"    {",{"type":51,"tag":144,"props":4740,"children":4741},{"style":292},[4742],{"type":57,"value":4743}," songId",{"type":51,"tag":144,"props":4745,"children":4746},{"style":286},[4747],{"type":57,"value":1390},{"type":51,"tag":144,"props":4749,"children":4750},{"style":472},[4751],{"type":57,"value":4752}," range",{"type":51,"tag":144,"props":4754,"children":4755},{"style":286},[4756],{"type":57,"value":480},{"type":51,"tag":144,"props":4758,"children":4759},{"style":286},[4760],{"type":57,"value":289},{"type":51,"tag":144,"props":4762,"children":4763},{"style":472},[4764],{"type":57,"value":4765}," startMs",{"type":51,"tag":144,"props":4767,"children":4768},{"style":286},[4769],{"type":57,"value":480},{"type":51,"tag":144,"props":4771,"children":4772},{"style":513},[4773],{"type":57,"value":4774}," 0",{"type":51,"tag":144,"props":4776,"children":4777},{"style":286},[4778],{"type":57,"value":1390},{"type":51,"tag":144,"props":4780,"children":4781},{"style":472},[4782],{"type":57,"value":4783}," endMs",{"type":51,"tag":144,"props":4785,"children":4786},{"style":286},[4787],{"type":57,"value":480},{"type":51,"tag":144,"props":4789,"children":4790},{"style":513},[4791],{"type":57,"value":516},{"type":51,"tag":144,"props":4793,"children":4794},{"style":286},[4795],{"type":57,"value":300},{"type":51,"tag":144,"props":4797,"children":4798},{"style":286},[4799],{"type":57,"value":4800}," },\n",{"type":51,"tag":144,"props":4802,"children":4803},{"class":146,"line":175},[4804],{"type":51,"tag":144,"props":4805,"children":4806},{"style":286},[4807],{"type":57,"value":2801},{"type":51,"tag":144,"props":4809,"children":4810},{"class":146,"line":183},[4811,4815,4819,4823,4827,4831,4836,4840],{"type":51,"tag":144,"props":4812,"children":4813},{"style":472},[4814],{"type":57,"value":2809},{"type":51,"tag":144,"props":4816,"children":4817},{"style":286},[4818],{"type":57,"value":480},{"type":51,"tag":144,"props":4820,"children":4821},{"style":286},[4822],{"type":57,"value":310},{"type":51,"tag":144,"props":4824,"children":4825},{"style":313},[4826],{"type":57,"value":3064},{"type":51,"tag":144,"props":4828,"children":4829},{"style":292},[4830],{"type":57,"value":2445},{"type":51,"tag":144,"props":4832,"children":4833},{"style":313},[4834],{"type":57,"value":4835},"We're rising up tonight",{"type":51,"tag":144,"props":4837,"children":4838},{"style":286},[4839],{"type":57,"value":321},{"type":51,"tag":144,"props":4841,"children":4842},{"style":286},[4843],{"type":57,"value":498},{"type":51,"tag":144,"props":4845,"children":4846},{"class":146,"line":192},[4847,4851,4855,4859],{"type":51,"tag":144,"props":4848,"children":4849},{"style":472},[4850],{"type":57,"value":2847},{"type":51,"tag":144,"props":4852,"children":4853},{"style":286},[4854],{"type":57,"value":480},{"type":51,"tag":144,"props":4856,"children":4857},{"style":513},[4858],{"type":57,"value":516},{"type":51,"tag":144,"props":4860,"children":4861},{"style":286},[4862],{"type":57,"value":498},{"type":51,"tag":144,"props":4864,"children":4865},{"class":146,"line":201},[4866,4870,4874,4878,4882,4887,4891,4895,4899,4904,4908,4912,4916,4921,4925,4929],{"type":51,"tag":144,"props":4867,"children":4868},{"style":472},[4869],{"type":57,"value":2868},{"type":51,"tag":144,"props":4871,"children":4872},{"style":286},[4873],{"type":57,"value":480},{"type":51,"tag":144,"props":4875,"children":4876},{"style":292},[4877],{"type":57,"value":1528},{"type":51,"tag":144,"props":4879,"children":4880},{"style":286},[4881],{"type":57,"value":321},{"type":51,"tag":144,"props":4883,"children":4884},{"style":313},[4885],{"type":57,"value":4886},"bigger drums",{"type":51,"tag":144,"props":4888,"children":4889},{"style":286},[4890],{"type":57,"value":321},{"type":51,"tag":144,"props":4892,"children":4893},{"style":286},[4894],{"type":57,"value":1390},{"type":51,"tag":144,"props":4896,"children":4897},{"style":286},[4898],{"type":57,"value":310},{"type":51,"tag":144,"props":4900,"children":4901},{"style":313},[4902],{"type":57,"value":4903},"layered vocals",{"type":51,"tag":144,"props":4905,"children":4906},{"style":286},[4907],{"type":57,"value":321},{"type":51,"tag":144,"props":4909,"children":4910},{"style":286},[4911],{"type":57,"value":1390},{"type":51,"tag":144,"props":4913,"children":4914},{"style":286},[4915],{"type":57,"value":310},{"type":51,"tag":144,"props":4917,"children":4918},{"style":313},[4919],{"type":57,"value":4920},"anthemic",{"type":51,"tag":144,"props":4922,"children":4923},{"style":286},[4924],{"type":57,"value":321},{"type":51,"tag":144,"props":4926,"children":4927},{"style":292},[4928],{"type":57,"value":1655},{"type":51,"tag":144,"props":4930,"children":4931},{"style":286},[4932],{"type":57,"value":498},{"type":51,"tag":144,"props":4934,"children":4935},{"class":146,"line":210},[4936,4940,4944,4948,4952,4957,4961,4965],{"type":51,"tag":144,"props":4937,"children":4938},{"style":472},[4939],{"type":57,"value":2955},{"type":51,"tag":144,"props":4941,"children":4942},{"style":286},[4943],{"type":57,"value":480},{"type":51,"tag":144,"props":4945,"children":4946},{"style":292},[4947],{"type":57,"value":1528},{"type":51,"tag":144,"props":4949,"children":4950},{"style":286},[4951],{"type":57,"value":321},{"type":51,"tag":144,"props":4953,"children":4954},{"style":313},[4955],{"type":57,"value":4956},"sparse",{"type":51,"tag":144,"props":4958,"children":4959},{"style":286},[4960],{"type":57,"value":321},{"type":51,"tag":144,"props":4962,"children":4963},{"style":292},[4964],{"type":57,"value":1655},{"type":51,"tag":144,"props":4966,"children":4967},{"style":286},[4968],{"type":57,"value":498},{"type":51,"tag":144,"props":4970,"children":4971},{"class":146,"line":219},[4972,4976,4980,4984,4988,4992],{"type":51,"tag":144,"props":4973,"children":4974},{"style":472},[4975],{"type":57,"value":3009},{"type":51,"tag":144,"props":4977,"children":4978},{"style":286},[4979],{"type":57,"value":480},{"type":51,"tag":144,"props":4981,"children":4982},{"style":286},[4983],{"type":57,"value":310},{"type":51,"tag":144,"props":4985,"children":4986},{"style":313},[4987],{"type":57,"value":2112},{"type":51,"tag":144,"props":4989,"children":4990},{"style":286},[4991],{"type":57,"value":321},{"type":51,"tag":144,"props":4993,"children":4994},{"style":286},[4995],{"type":57,"value":498},{"type":51,"tag":144,"props":4997,"children":4998},{"class":146,"line":228},[4999],{"type":51,"tag":144,"props":5000,"children":5001},{"style":286},[5002],{"type":57,"value":3037},{"type":51,"tag":144,"props":5004,"children":5005},{"class":146,"line":236},[5006,5010],{"type":51,"tag":144,"props":5007,"children":5008},{"style":292},[5009],{"type":57,"value":3215},{"type":51,"tag":144,"props":5011,"children":5012},{"style":286},[5013],{"type":57,"value":498},{"type":51,"tag":144,"props":5015,"children":5016},{"class":146,"line":245},[5017],{"type":51,"tag":144,"props":5018,"children":5019},{"style":286},[5020],{"type":57,"value":3227},{"type":51,"tag":144,"props":5022,"children":5023},{"class":146,"line":254},[5024],{"type":51,"tag":144,"props":5025,"children":5026},{"emptyLinePlaceholder":160},[5027],{"type":57,"value":163},{"type":51,"tag":144,"props":5029,"children":5030},{"class":146,"line":1313},[5031,5035,5039,5043,5047,5051,5055,5059,5063,5067,5071],{"type":51,"tag":144,"props":5032,"children":5033},{"style":380},[5034],{"type":57,"value":383},{"type":51,"tag":144,"props":5036,"children":5037},{"style":292},[5038],{"type":57,"value":424},{"type":51,"tag":144,"props":5040,"children":5041},{"style":286},[5042],{"type":57,"value":393},{"type":51,"tag":144,"props":5044,"children":5045},{"style":280},[5046],{"type":57,"value":433},{"type":51,"tag":144,"props":5048,"children":5049},{"style":292},[5050],{"type":57,"value":438},{"type":51,"tag":144,"props":5052,"children":5053},{"style":286},[5054],{"type":57,"value":443},{"type":51,"tag":144,"props":5056,"children":5057},{"style":292},[5058],{"type":57,"value":4},{"type":51,"tag":144,"props":5060,"children":5061},{"style":286},[5062],{"type":57,"value":443},{"type":51,"tag":144,"props":5064,"children":5065},{"style":401},[5066],{"type":57,"value":456},{"type":51,"tag":144,"props":5068,"children":5069},{"style":292},[5070],{"type":57,"value":461},{"type":51,"tag":144,"props":5072,"children":5073},{"style":286},[5074],{"type":57,"value":466},{"type":51,"tag":144,"props":5076,"children":5077},{"class":146,"line":2700},[5078,5082,5086,5090],{"type":51,"tag":144,"props":5079,"children":5080},{"style":472},[5081],{"type":57,"value":2520},{"type":51,"tag":144,"props":5083,"children":5084},{"style":286},[5085],{"type":57,"value":480},{"type":51,"tag":144,"props":5087,"children":5088},{"style":292},[5089],{"type":57,"value":2529},{"type":51,"tag":144,"props":5091,"children":5092},{"style":286},[5093],{"type":57,"value":498},{"type":51,"tag":144,"props":5095,"children":5096},{"class":146,"line":2708},[5097,5101,5105,5109,5113,5117],{"type":51,"tag":144,"props":5098,"children":5099},{"style":472},[5100],{"type":57,"value":528},{"type":51,"tag":144,"props":5102,"children":5103},{"style":286},[5104],{"type":57,"value":480},{"type":51,"tag":144,"props":5106,"children":5107},{"style":286},[5108],{"type":57,"value":310},{"type":51,"tag":144,"props":5110,"children":5111},{"style":313},[5112],{"type":57,"value":108},{"type":51,"tag":144,"props":5114,"children":5115},{"style":286},[5116],{"type":57,"value":321},{"type":51,"tag":144,"props":5118,"children":5119},{"style":286},[5120],{"type":57,"value":498},{"type":51,"tag":144,"props":5122,"children":5123},{"class":146,"line":2716},[5124,5128,5132],{"type":51,"tag":144,"props":5125,"children":5126},{"style":286},[5127],{"type":57,"value":556},{"type":51,"tag":144,"props":5129,"children":5130},{"style":292},[5131],{"type":57,"value":561},{"type":51,"tag":144,"props":5133,"children":5134},{"style":286},[5135],{"type":57,"value":326},{"type":51,"tag":60,"props":5137,"children":5138},{},[5139,5141,5147,5149,5155,5157,5162,5163,5168,5169,5174,5175,5181],{"type":57,"value":5140},"To match the feel of a stored slice without copying it, attach a ",{"type":51,"tag":90,"props":5142,"children":5144},{"className":5143},[],[5145],{"type":57,"value":5146},"conditioning_ref",{"type":57,"value":5148}," (up to\n30,000 ms) plus a ",{"type":51,"tag":90,"props":5150,"children":5152},{"className":5151},[],[5153],{"type":57,"value":5154},"condition_strength",{"type":57,"value":5156}," of ",{"type":51,"tag":90,"props":5158,"children":5160},{"className":5159},[],[5161],{"type":57,"value":2097},{"type":57,"value":2069},{"type":51,"tag":90,"props":5164,"children":5166},{"className":5165},[],[5167],{"type":57,"value":2104},{"type":57,"value":2069},{"type":51,"tag":90,"props":5170,"children":5172},{"className":5171},[],[5173],{"type":57,"value":2112},{"type":57,"value":2106},{"type":51,"tag":90,"props":5176,"children":5178},{"className":5177},[],[5179],{"type":57,"value":5180},"xhigh",{"type":57,"value":5182}," to a generation\nchunk. Conditioning placed on the first chunk influences every later chunk.",{"type":51,"tag":60,"props":5184,"children":5185},{},[5186,5187,5191],{"type":57,"value":1006},{"type":51,"tag":81,"props":5188,"children":5189},{"href":1009},[5190],{"type":57,"value":1012},{"type":57,"value":5192}," for the full inpainting parameter list.",{"type":51,"tag":120,"props":5194,"children":5196},{"id":5195},"content-restrictions",[5197],{"type":57,"value":5198},"Content Restrictions",{"type":51,"tag":1991,"props":5200,"children":5201},{},[5202,5207,5226],{"type":51,"tag":1995,"props":5203,"children":5204},{},[5205],{"type":57,"value":5206},"Cannot reference specific artists, bands, or copyrighted lyrics",{"type":51,"tag":1995,"props":5208,"children":5209},{},[5210,5216,5218,5224],{"type":51,"tag":90,"props":5211,"children":5213},{"className":5212},[],[5214],{"type":57,"value":5215},"bad_prompt",{"type":57,"value":5217}," errors include a ",{"type":51,"tag":90,"props":5219,"children":5221},{"className":5220},[],[5222],{"type":57,"value":5223},"prompt_suggestion",{"type":57,"value":5225}," with alternative phrasing",{"type":51,"tag":1995,"props":5227,"children":5228},{},[5229,5235,5236],{"type":51,"tag":90,"props":5230,"children":5232},{"className":5231},[],[5233],{"type":57,"value":5234},"bad_composition_plan",{"type":57,"value":5217},{"type":51,"tag":90,"props":5237,"children":5239},{"className":5238},[],[5240],{"type":57,"value":5241},"composition_plan_suggestion",{"type":51,"tag":120,"props":5243,"children":5245},{"id":5244},"error-handling",[5246],{"type":57,"value":5247},"Error Handling",{"type":51,"tag":134,"props":5249,"children":5251},{"className":136,"code":5250,"language":129,"meta":138,"style":138},"try:\n    audio = client.music.compose(prompt=\"...\", music_length_ms=30000)\nexcept Exception as e:\n    print(f\"API error: {e}\")\n",[5252],{"type":51,"tag":90,"props":5253,"children":5254},{"__ignoreMap":138},[5255,5263,5271,5279],{"type":51,"tag":144,"props":5256,"children":5257},{"class":146,"line":147},[5258],{"type":51,"tag":144,"props":5259,"children":5260},{},[5261],{"type":57,"value":5262},"try:\n",{"type":51,"tag":144,"props":5264,"children":5265},{"class":146,"line":156},[5266],{"type":51,"tag":144,"props":5267,"children":5268},{},[5269],{"type":57,"value":5270},"    audio = client.music.compose(prompt=\"...\", music_length_ms=30000)\n",{"type":51,"tag":144,"props":5272,"children":5273},{"class":146,"line":166},[5274],{"type":51,"tag":144,"props":5275,"children":5276},{},[5277],{"type":57,"value":5278},"except Exception as e:\n",{"type":51,"tag":144,"props":5280,"children":5281},{"class":146,"line":175},[5282],{"type":51,"tag":144,"props":5283,"children":5284},{},[5285],{"type":57,"value":5286},"    print(f\"API error: {e}\")\n",{"type":51,"tag":134,"props":5288,"children":5290},{"className":269,"code":5289,"language":263,"meta":138,"style":138},"try {\n  const audio = await client.music.compose({\n    prompt: \"...\",\n    musicLengthMs: 30000,\n  });\n} catch (err) {\n  console.error(\"API error:\", err);\n}\n",[5291],{"type":51,"tag":90,"props":5292,"children":5293},{"__ignoreMap":138},[5294,5306,5356,5385,5405,5421,5442,5493],{"type":51,"tag":144,"props":5295,"children":5296},{"class":146,"line":147},[5297,5302],{"type":51,"tag":144,"props":5298,"children":5299},{"style":280},[5300],{"type":57,"value":5301},"try",{"type":51,"tag":144,"props":5303,"children":5304},{"style":286},[5305],{"type":57,"value":2776},{"type":51,"tag":144,"props":5307,"children":5308},{"class":146,"line":156},[5309,5314,5319,5324,5328,5332,5336,5340,5344,5348,5352],{"type":51,"tag":144,"props":5310,"children":5311},{"style":380},[5312],{"type":57,"value":5313},"  const",{"type":51,"tag":144,"props":5315,"children":5316},{"style":292},[5317],{"type":57,"value":5318}," audio",{"type":51,"tag":144,"props":5320,"children":5321},{"style":286},[5322],{"type":57,"value":5323}," =",{"type":51,"tag":144,"props":5325,"children":5326},{"style":280},[5327],{"type":57,"value":433},{"type":51,"tag":144,"props":5329,"children":5330},{"style":292},[5331],{"type":57,"value":438},{"type":51,"tag":144,"props":5333,"children":5334},{"style":286},[5335],{"type":57,"value":443},{"type":51,"tag":144,"props":5337,"children":5338},{"style":292},[5339],{"type":57,"value":4},{"type":51,"tag":144,"props":5341,"children":5342},{"style":286},[5343],{"type":57,"value":443},{"type":51,"tag":144,"props":5345,"children":5346},{"style":401},[5347],{"type":57,"value":456},{"type":51,"tag":144,"props":5349,"children":5350},{"style":472},[5351],{"type":57,"value":461},{"type":51,"tag":144,"props":5353,"children":5354},{"style":286},[5355],{"type":57,"value":466},{"type":51,"tag":144,"props":5357,"children":5358},{"class":146,"line":166},[5359,5364,5368,5372,5377,5381],{"type":51,"tag":144,"props":5360,"children":5361},{"style":472},[5362],{"type":57,"value":5363},"    prompt",{"type":51,"tag":144,"props":5365,"children":5366},{"style":286},[5367],{"type":57,"value":480},{"type":51,"tag":144,"props":5369,"children":5370},{"style":286},[5371],{"type":57,"value":310},{"type":51,"tag":144,"props":5373,"children":5374},{"style":313},[5375],{"type":57,"value":5376},"...",{"type":51,"tag":144,"props":5378,"children":5379},{"style":286},[5380],{"type":57,"value":321},{"type":51,"tag":144,"props":5382,"children":5383},{"style":286},[5384],{"type":57,"value":498},{"type":51,"tag":144,"props":5386,"children":5387},{"class":146,"line":175},[5388,5393,5397,5401],{"type":51,"tag":144,"props":5389,"children":5390},{"style":472},[5391],{"type":57,"value":5392},"    musicLengthMs",{"type":51,"tag":144,"props":5394,"children":5395},{"style":286},[5396],{"type":57,"value":480},{"type":51,"tag":144,"props":5398,"children":5399},{"style":513},[5400],{"type":57,"value":516},{"type":51,"tag":144,"props":5402,"children":5403},{"style":286},[5404],{"type":57,"value":498},{"type":51,"tag":144,"props":5406,"children":5407},{"class":146,"line":183},[5408,5413,5417],{"type":51,"tag":144,"props":5409,"children":5410},{"style":286},[5411],{"type":57,"value":5412},"  }",{"type":51,"tag":144,"props":5414,"children":5415},{"style":472},[5416],{"type":57,"value":561},{"type":51,"tag":144,"props":5418,"children":5419},{"style":286},[5420],{"type":57,"value":326},{"type":51,"tag":144,"props":5422,"children":5423},{"class":146,"line":192},[5424,5428,5433,5438],{"type":51,"tag":144,"props":5425,"children":5426},{"style":286},[5427],{"type":57,"value":556},{"type":51,"tag":144,"props":5429,"children":5430},{"style":280},[5431],{"type":57,"value":5432}," catch",{"type":51,"tag":144,"props":5434,"children":5435},{"style":292},[5436],{"type":57,"value":5437}," (err) ",{"type":51,"tag":144,"props":5439,"children":5440},{"style":286},[5441],{"type":57,"value":466},{"type":51,"tag":144,"props":5443,"children":5444},{"class":146,"line":201},[5445,5450,5454,5459,5463,5467,5472,5476,5480,5485,5489],{"type":51,"tag":144,"props":5446,"children":5447},{"style":292},[5448],{"type":57,"value":5449},"  console",{"type":51,"tag":144,"props":5451,"children":5452},{"style":286},[5453],{"type":57,"value":443},{"type":51,"tag":144,"props":5455,"children":5456},{"style":401},[5457],{"type":57,"value":5458},"error",{"type":51,"tag":144,"props":5460,"children":5461},{"style":472},[5462],{"type":57,"value":461},{"type":51,"tag":144,"props":5464,"children":5465},{"style":286},[5466],{"type":57,"value":321},{"type":51,"tag":144,"props":5468,"children":5469},{"style":313},[5470],{"type":57,"value":5471},"API error:",{"type":51,"tag":144,"props":5473,"children":5474},{"style":286},[5475],{"type":57,"value":321},{"type":51,"tag":144,"props":5477,"children":5478},{"style":286},[5479],{"type":57,"value":1390},{"type":51,"tag":144,"props":5481,"children":5482},{"style":292},[5483],{"type":57,"value":5484}," err",{"type":51,"tag":144,"props":5486,"children":5487},{"style":472},[5488],{"type":57,"value":561},{"type":51,"tag":144,"props":5490,"children":5491},{"style":286},[5492],{"type":57,"value":326},{"type":51,"tag":144,"props":5494,"children":5495},{"class":146,"line":210},[5496],{"type":51,"tag":144,"props":5497,"children":5498},{"style":286},[5499],{"type":57,"value":2731},{"type":51,"tag":60,"props":5501,"children":5502},{},[5503],{"type":57,"value":5504},"Common errors: 401 (invalid key), 422 (invalid params), 429 (rate limit).",{"type":51,"tag":120,"props":5506,"children":5508},{"id":5507},"references",[5509],{"type":57,"value":5510},"References",{"type":51,"tag":1991,"props":5512,"children":5513},{},[5514,5521],{"type":51,"tag":1995,"props":5515,"children":5516},{},[5517],{"type":51,"tag":81,"props":5518,"children":5519},{"href":83},[5520],{"type":57,"value":86},{"type":51,"tag":1995,"props":5522,"children":5523},{},[5524],{"type":51,"tag":81,"props":5525,"children":5526},{"href":1009},[5527],{"type":57,"value":1012},{"type":51,"tag":5529,"props":5530,"children":5531},"style",{},[5532],{"type":57,"value":5533},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5535,"total":219},[5536,5550,5557,5568,5580,5596,5609,5621,5632],{"slug":5537,"name":5537,"fn":5538,"description":5539,"org":5540,"tags":5541,"stars":23,"repoUrl":24,"updatedAt":5549},"agents","build ElevenLabs voice agents","Build voice AI agents with ElevenLabs. Use when creating voice assistants, customer service bots, interactive voice characters, or any real-time voice conversation experience.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5542,5544,5545,5546],{"name":5543,"slug":5537,"type":15},"Agents",{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5547,"slug":5548,"type":15},"Speech","speech","2026-07-24T05:40:07.822247",{"slug":4,"name":4,"fn":5,"description":6,"org":5551,"tags":5552,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5553,5554,5555,5556],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":5558,"name":5558,"fn":5559,"description":5560,"org":5561,"tags":5562,"stars":23,"repoUrl":24,"updatedAt":5567},"setup-api-key","set up ElevenLabs API key","Guides users through setting up an ElevenLabs API key for ElevenLabs MCP tools. Use when the user needs to configure an ElevenLabs API key, when ElevenLabs tools fail due to missing API key, or when the user mentions needing access to ElevenLabs. First checks whether ELEVENLABS_API_KEY is already configured and valid, and only runs full setup when needed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5563,5564],{"name":9,"slug":8,"type":15},{"name":5565,"slug":5566,"type":15},"Environment Variables","environment-variables","2026-04-06T18:09:34.705989",{"slug":5569,"name":5569,"fn":5570,"description":5571,"org":5572,"tags":5573,"stars":23,"repoUrl":24,"updatedAt":5579},"sound-effects","generate sound effects with ElevenLabs","Generate sound effects from text descriptions using ElevenLabs. Use when creating sound effects, generating audio textures, producing ambient sounds, cinematic impacts, UI sounds, or any audio that isn't speech. Supports looping, duration control, and prompt influence tuning.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5574,5575,5576,5577],{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":5578,"slug":5569,"type":15},"Sound Effects","2026-04-06T18:09:39.77459",{"slug":5581,"name":5581,"fn":5582,"description":5583,"org":5584,"tags":5585,"stars":23,"repoUrl":24,"updatedAt":5595},"speech-engine","implement real-time voice conversations","Add real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine. Use when building Speech Engine servers, WebSocket handlers, WebRTC browser clients, conversation token endpoints, interruption-aware streaming responses, or voice-enabled chat agents that connect developer-owned server logic to ElevenLabs speech-to-text and text-to-speech.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5586,5587,5588,5591,5594],{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5589,"slug":5590,"type":15},"LLM","llm",{"name":5592,"slug":5593,"type":15},"Real-time","real-time",{"name":5547,"slug":5548,"type":15},"2026-05-15T06:13:51.199332",{"slug":5597,"name":5597,"fn":5598,"description":5599,"org":5600,"tags":5601,"stars":23,"repoUrl":24,"updatedAt":5608},"speech-to-text","transcribe audio with ElevenLabs","Transcribe audio to text using ElevenLabs Scribe v2. Use when converting audio\u002Fvideo to text, generating subtitles, transcribing meetings, or processing spoken content.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5602,5603,5604,5605],{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5547,"slug":5548,"type":15},{"name":5606,"slug":5607,"type":15},"Transcription","transcription","2026-07-24T05:40:06.834756",{"slug":5610,"name":5610,"fn":5611,"description":5612,"org":5613,"tags":5614,"stars":23,"repoUrl":24,"updatedAt":5620},"text-to-speech","convert text to speech with ElevenLabs","Convert text to speech using ElevenLabs voice AI. Use when generating audio from text, creating voiceovers, building voice apps, or synthesizing speech in 70+ languages.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5615,5616,5617,5618],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5619,"slug":5610,"type":15},"Text-to-Speech","2026-04-06T18:09:38.521103",{"slug":5622,"name":5622,"fn":5623,"description":5624,"org":5625,"tags":5626,"stars":23,"repoUrl":24,"updatedAt":5631},"voice-changer","transform audio recordings with voice conversion","Transform the voice in an audio recording into a different target voice while preserving emotion, timing, and delivery using the ElevenLabs Voice Changer (speech-to-speech) API. Use when converting one voice to another, changing the speaker\u002Fnarrator of an existing recording, dubbing a voice-over in a different voice, creating character voices from a scratch performance, anonymizing a speaker, or any \"voice conversion \u002F voice transfer \u002F speech-to-speech\" task. Make sure to use this skill whenever the user mentions voice changing, voice conversion, speech-to-speech, swapping a voice in audio, re-voicing a clip, or applying a different voice to an existing recording — even if they don't explicitly say \"voice changer\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5627,5628,5629,5630],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-05-02T05:22:50.99428",{"slug":5633,"name":5633,"fn":5634,"description":5635,"org":5636,"tags":5637,"stars":23,"repoUrl":24,"updatedAt":5641},"voice-isolator","isolate voices and remove background noise","Remove background noise and isolate vocals\u002Fspeech from audio using ElevenLabs Voice Isolator (audio isolation) API. Use when cleaning up noisy recordings, removing music or background ambience from dialogue, isolating speech from field recordings, preparing audio for transcription, extracting vocals, or any \"denoise \u002F clean up \u002F isolate voice\" task.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5638,5639,5640],{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-04-23T05:01:58.01956",{"items":5643,"total":219},[5644,5651,5658,5663,5670,5678,5685],{"slug":5537,"name":5537,"fn":5538,"description":5539,"org":5645,"tags":5646,"stars":23,"repoUrl":24,"updatedAt":5549},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5647,5648,5649,5650],{"name":5543,"slug":5537,"type":15},{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5547,"slug":5548,"type":15},{"slug":4,"name":4,"fn":5,"description":6,"org":5652,"tags":5653,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5654,5655,5656,5657],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":5558,"name":5558,"fn":5559,"description":5560,"org":5659,"tags":5660,"stars":23,"repoUrl":24,"updatedAt":5567},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5661,5662],{"name":9,"slug":8,"type":15},{"name":5565,"slug":5566,"type":15},{"slug":5569,"name":5569,"fn":5570,"description":5571,"org":5664,"tags":5665,"stars":23,"repoUrl":24,"updatedAt":5579},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5666,5667,5668,5669],{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":5578,"slug":5569,"type":15},{"slug":5581,"name":5581,"fn":5582,"description":5583,"org":5671,"tags":5672,"stars":23,"repoUrl":24,"updatedAt":5595},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5673,5674,5675,5676,5677],{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5589,"slug":5590,"type":15},{"name":5592,"slug":5593,"type":15},{"name":5547,"slug":5548,"type":15},{"slug":5597,"name":5597,"fn":5598,"description":5599,"org":5679,"tags":5680,"stars":23,"repoUrl":24,"updatedAt":5608},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5681,5682,5683,5684],{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5547,"slug":5548,"type":15},{"name":5606,"slug":5607,"type":15},{"slug":5610,"name":5610,"fn":5611,"description":5612,"org":5686,"tags":5687,"stars":23,"repoUrl":24,"updatedAt":5620},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[5688,5689,5690,5691],{"name":17,"slug":18,"type":15},{"name":20,"slug":21,"type":15},{"name":9,"slug":8,"type":15},{"name":5619,"slug":5610,"type":15}]