Updates a voice’s metadata. All fields are optional - only the fields present in the body are changed.
The voice must belong to the API key’s workspace, otherwise the request returns 404.
A non-nulllabels object replaces the entire label set. Omit labels to leave the existing
tags unchanged.
Authorization
string
required
Your workspace API key (flv_…). Required scope:voices:write.
Path parameters
string
required
The voice id.
Body
string
New display name.
string
New long-form description.
string
New primary language (BCP-47, e.g. en).
visibility is not accepted on the public API. Publishing a voice is admin-only, so any
visibility value sent here is silently ignored and the voice’s current visibility is left
unchanged.
object
Replacement key/value tags, e.g. { "accent": "british" }. Replaces the whole label set.
Copy this into your coding agent (Claude Code, Cursor, Codex…) to implement this endpoint.
You are implementing a typed client for one Finesse Voice API endpoint: "Update a voice".Everything you need is in this prompt. Do not invent anything that is not specified here.WHAT TO BUILD- A function updateVoice(id, patch) (name it per the project's conventions) that patches a voice's mutable metadata and returns the updated Voice.- Detect the stack first: look for package.json, tsconfig.json, pyproject.toml, requirements.txt, go.mod, Gemfile, composer.json and similar. Use the project's language, HTTP client, module layout, error-handling conventions and test runner. If there is no project yet or the stack is unclear, use TypeScript on Node 18+ with the built-in fetch and no new dependencies.- If the project already has a Finesse API client module, add this to it (reuse its auth, base URL, error type and retry helper) instead of creating a parallel one.- Keep the base URL (https://fi.production.flamapis.com) in one constant or config value.ENDPOINT- Method: PATCH- URL: https://fi.production.flamapis.com/flam-voice-svc/api/v1/public/voices/{id}- Content-Type: application/jsonPARAMETERS- id (path, string, required): the voice id, a 24-character hex string (for example "665f1a2b3c4d5e6f7a8b9c0d"). Validate it locally against /^[0-9a-f]{24}$/i and URL-encode it.- The voice must belong to the key's workspace, otherwise 404.REQUEST BODY (all fields optional; only the fields PRESENT in the body are changed)- name (string): new display name.- description (string): new long-form description.- language (string): new primary language, BCP-47 (e.g. "en").- labels (object): replacement flat string-to-string map, e.g. { "accent": "british" }. A non-null labels object REPLACES THE ENTIRE label set. Omit labels to leave existing tags alone. To add one tag, the caller must send the full desired set (existing tags from the Voice's labels array converted to an object, plus the new one); document this on the function.- Do NOT send visibility: it is not accepted on the public API and is silently ignored (publishing is admin-only). Leave it out of the patch type.- Build the JSON body only from keys the caller actually set. Never send undefined or null placeholders for unchanged fields. Reject an empty patch locally. { "name": "Documentary Narrator", "description": "Warm documentary voice" }AUTHENTICATION- Send the header X-API-Key: <workspace API key> on every request. Keys start with "flv_".- Required scope: voices:write. Keys carry one or more scopes (voices:read, voices:write, clone, tts); a key without this scope gets 403 with code "insufficient_scope". Keys created before scopes existed have all four.- Read the key from the environment variable FINESSE_API_KEY (or the project's existing secrets or config mechanism). Fail fast with a clear error if it is missing, before making any request.- Never hard-code, log or commit the key, and never ship it in browser/client-side code: call this from server-side code only. Treat it like a password.- A key is bound to one workspace. Referencing a voice or job from another workspace returns 404.- Keys can expire: an expired key returns 401 with code "key_expired". Do not retry; surface it so an operator can rotate the key.RESPONSE ENVELOPEJSON responses use one envelope. On success "error" is false and the payload is in "data": { "status": 200, "data": { "...": "endpoint payload" }, "error": false }On failure "error" is true, "data" is omitted and "message" carries the detail: { "status": 404, "error": true, "message": "Voice not found" }SUCCESS RESPONSE (200, application/json)"data" is the updated Voice: { "status": 200, "data": { "id": "665f1a2b3c4d5e6f7a8b9c0d", "name": "Documentary Narrator", "status": "ready", "primary_language": "en", "visibility": "private", "clone_method": "instant" }, "error": false }VOICE OBJECT (define a type for it; timestamps are Unix epoch MILLISECONDS)- id: string. Unique voice id, 24-character hex. Used by the synthesize endpoints.- name: string. Display name.- description: string, optional.- status: string. Only "ready" voices can synthesize. All values: "draft" (created, no audio yet), "uploading", "queued", "verifying", "processing", "training" (in progress), "ready", "failed" (creation did not succeed), "archived" and "deleted". Type it as a string union of these values but tolerate other strings (treat them as not usable).- clone_method: "instant" | "professional" | "design" | "remix" | "guided".- visibility: "private" | "org" | "public".- primary_language: string, BCP-47 (e.g. "en"). Used when a synthesis request omits language.- labels: array of { key: string, value: string }, optional. Common keys: accent, gender, age, use_case. Example: [{ "key": "accent", "value": "american" }]- settings: object, optional, present only when configured. Synthesis defaults: stability, similarity, style, speed, pitch, volume, use_speaker_boost, emotion, engine_params.- sample_audio_url: string, optional. Public URL of a short preview clip.- base_voice_id: string, optional. Present when derived from another voice (clone_method "remix").- created_at, updated_at: integers (epoch ms).Optional fields may be absent. Responses may contain extra fields: ignore them, never fail on them.Example: { "id": "665f1a2b3c4d5e6f7a8b9c0d", "name": "Studio Narrator", "description": "Warm, neutral narration voice.", "status": "ready", "clone_method": "instant", "visibility": "public", "primary_language": "en", "labels": [ { "key": "accent", "value": "american" }, { "key": "gender", "value": "female" } ], "sample_audio_url": "https://storage.googleapis.com/.../sample.wav", "created_at": 1717939200000, "updated_at": 1717939260000 }ERRORS- 400: invalid request body. Do not retry.- 401: X-API-Key missing, malformed, invalid or revoked, or code "key_expired". Do not retry.- 403 with code "insufficient_scope": the key lacks the voices:write scope. Do not retry.- 404 with code "not_found" (also returned for a malformed id): the voice does not exist or belongs to another workspace. Do not retry.- 429 with code "rate_limited" (over the plan's requests per second): wait the number of seconds in the Retry-After header, then retry with backoff. See /guides/rate-limits.- 502 with code "upstream_error": temporarily unavailable. Retry with backoff.- Surface failures as one typed error (for example FinesseApiError) carrying: HTTP status, code (when present), message (the envelope "message" or the flat "error" string), optional feature / unit / limit / used, a retryable flag, the request id (the X-Request-Id response header; error bodies also carry it as request_id), and the raw body for debugging. Log the request id with every failure.- Parse error bodies defensively: if a body is not valid JSON, keep the raw text in the error.RETRIES- Retry only 429 (rate limited; wait Retry-After first), 502/503 (upstream unavailable or busy) and network errors or timeouts, with exponential backoff plus jitter (for example about 1s, 2s, 4s; at most 3 retries), then surface the error.- Never retry 400, 401, 402, 403, 404 or 422: they fail the same way again.(Repeating the same PATCH body is harmless, which is why retries are allowed here.)ACCEPTANCE CRITERIA- The request body contains exactly the keys the caller set, never visibility.- The typed updated Voice from "data" is returned.- The labels-replace semantics are documented on the function.- 404 is a distinct not-found error. The key is never logged.TEST PLAN- Unit tests with mocked HTTP: body contains only the provided keys; labels object serialized as an object; visibility is not sendable; empty patch rejected; 200 returns Voice; 404; 502 then 200.- Smoke script: given FLAM_VOICE_ID (a voice you own), update its description to a timestamped string, print the returned description, then restore the original value.RULES- Implement only what this spec describes. Do not invent parameters, fields, headers, endpoints or error codes. If something is ambiguous, missing, or conflicts with the existing codebase, stop and ask me before guessing.- Match the project's existing style and conventions; do not refactor unrelated code.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Finesse","description":"Finesse - realtime speech in 60 languages. Clone a voice and stream it in real time across 60 languages, 22 of them Indic.","colors":{"primary":"#2547F0","light":"#4F72FF","dark":"#1E3AD0"},"logo":{"light":"https://mintcdn.com/finesse-docs/u9NNXVA8yD6Y29Xd/logo/finesse-light.png?fit=max\u0026auto=format\u0026n=u9NNXVA8yD6Y29Xd\u0026q=85\u0026s=665b8b35d46e51f6ae805dffc09b6fc1","dark":"https://mintcdn.com/finesse-docs/u9NNXVA8yD6Y29Xd/logo/finesse-dark.png?fit=max\u0026auto=format\u0026n=u9NNXVA8yD6Y29Xd\u0026q=85\u0026s=1f28d4f2a2c26f147ce021c785c0e24a","href":"/introduction"},"favicon":{"light":"https://mintcdn.com/finesse-docs/0zFrmLlrHoW1tpnK/favicon.svg?fit=max\u0026auto=format\u0026n=0zFrmLlrHoW1tpnK\u0026q=85\u0026s=8b7f46bccba82eb14857fc9cc7baba20","dark":"https://mintcdn.com/finesse-docs/0zFrmLlrHoW1tpnK/favicon-dark.svg?fit=max\u0026auto=format\u0026n=0zFrmLlrHoW1tpnK\u0026q=85\u0026s=4d0d37da9ba0022182827b3ee360664c"},"api":{"mdx":{"auth":{"method":"key","name":"X-API-Key"},"server":"https://fi.production.flamapis.com"}},"appearance":{"default":"light","strict":true},"background":{"color":{"light":"#F5F3EE","dark":"#0E0F11"}},"navbar":{"links":[{"href":"/guides/authentication","label":"Get an API key"}],"primary":{"type":"button","label":"Dashboard","href":"https://finesse.flamapp.ai/dashboard"}},"fonts":{"heading":{"family":"Bricolage Grotesque","weight":700},"body":{"family":"Instrument Sans"}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"finesse-docs","hasAudioNarration":false,"actualSubdomain":"finesse-docs","customDomains":["docs.finesse.flamapp.ai"],"gitSource":{"type":"github","owner":"homingos","repo":"fe-flam-voice","deployBranch":"production","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6afaecc7213a1421d385ef81","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"API reference","count":17},{"language":"default","tag":"SDKs","count":13},{"language":"default","tag":"Voices","count":8},{"language":"default","tag":"TypeScript SDK","count":7},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Speech","count":4},{"language":"default","tag":"Essentials","count":3},{"language":"default","tag":"Start here","count":2},{"language":"default","tag":"Integrations","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"voice-api/update-voice","slug":"/voice-api/update-voice","pageMetadata":{"title":"Update a voice","description":"Patch a voice's mutable metadata.","api":"PATCH /flam-voice-svc/api/v1/public/voices/{id}","href":"/voice-api/update-voice"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Patch a voice’s mutable metadata.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,ParamField,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Updates a voice’s metadata. All fields are optional - only the fields present in the body are changed.\nThe voice must belong to the API key’s workspace, otherwise the request returns `,_jsx(_components.code,{children:`404`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`A non-`,_jsx(_components.code,{children:`null`}),` `,_jsx(_components.code,{children:`labels`}),` object `,_jsx(_components.strong,{children:`replaces`}),` the entire label set. Omit `,_jsx(_components.code,{children:`labels`}),` to leave the existing\ntags unchanged.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`authorization`,children:`Authorization`}),`\n`,_jsx(ParamField,{header:`X-API-Key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your workspace API key (`,_jsx(_components.code,{children:`flv_…`}),`). `,_jsx(_components.strong,{children:`Required scope:`}),` `,_jsx(_components.code,{children:`voices:write`}),`.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`path-parameters`,children:`Path parameters`}),`\n`,_jsx(ParamField,{path:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`The voice id.`})}),`\n`,_jsx(Heading,{level:`4`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`New display name.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`New long-form description.`})}),`\n`,_jsx(ParamField,{body:`language`,type:`string`,id:`param-language`,children:_jsxs(_components.p,{children:[`New primary language (BCP-47, e.g. `,_jsx(_components.code,{children:`en`}),`).`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`visibility`}),` is `,_jsx(_components.strong,{children:`not accepted`}),` on the public API. Publishing a voice is admin-only, so any\n`,_jsx(_components.code,{children:`visibility`}),` value sent here is silently ignored and the voice’s current visibility is left\nunchanged.`]})}),`\n`,_jsx(ParamField,{body:`labels`,type:`object`,id:`param-labels`,children:_jsxs(_components.p,{children:[`Replacement key/value tags, e.g. `,_jsx(_components.code,{children:`{ \"accent\": \"british\" }`}),`. Replaces the whole label set.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`data`,type:`Voice`,id:`param-data`,children:_jsxs(_components.p,{children:[`The updated `,_jsx(_components.a,{href:`/voice-api/voice-object`,children:`Voice object`}),`.`]})}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://fi.production.flamapis.com/flam-voice-svc/api/v1/public/voices/665f1a2b3c4d5e6f7a8b9c0d\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$FINESSE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"name\":\"Documentary Narrator\",\"description\":\"Warm documentary voice\"}'`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"665f1a2b3c4d5e6f7a8b9c0d\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` res`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `https://fi.production.flamapis.com/flam-voice-svc/api/v1/public/voices/\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PATCH\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`FINESSE_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Documentary Narrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`description:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Warm documentary voice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`voice_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"665f1a2b3c4d5e6f7a8b9c0d\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`res `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.patch(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://fi.production.flamapis.com/flam-voice-svc/api/v1/public/voices/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`voice_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-API-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FINESSE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Documentary Narrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Warm documentary voice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(res.json()[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})]}),`\n`,_jsx(CodeBlock,{filename:`Response`,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"665f1a2b3c4d5e6f7a8b9c0d\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Documentary Narrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ready\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"primary_language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"visibility\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"private\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clone_method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"instant\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`prompt`,children:`Prompt`}),`\n`,_jsx(_components.p,{children:`Copy this into your coding agent (Claude Code, Cursor, Codex…) to implement this endpoint.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`167`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`167`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are implementing a typed client for one Finesse Voice API endpoint: \"Update a voice\".`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Everything you need is in this prompt. Do not invent anything that is not specified here.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`WHAT TO BUILD`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- A function updateVoice(id, patch) (name it per the project's conventions) that patches a voice's`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` mutable metadata and returns the updated Voice.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Detect the stack first: look for package.json, tsconfig.json, pyproject.toml,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` requirements.txt, go.mod, Gemfile, composer.json and similar. Use the project's language, HTTP`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` client, module layout, error-handling conventions and test runner. If there is no project yet or`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` the stack is unclear, use TypeScript on Node 18+ with the built-in fetch and no new dependencies.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- If the project already has a Finesse API client module, add this to it (reuse its auth, base`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` URL, error type and retry helper) instead of creating a parallel one.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Keep the base URL (https://fi.production.flamapis.com) in one constant or config value.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ENDPOINT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Method: PATCH`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- URL: https://fi.production.flamapis.com/flam-voice-svc/api/v1/public/voices/{id}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`PARAMETERS`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- id (path, string, required): the voice id, a 24-character hex string (for example`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"665f1a2b3c4d5e6f7a8b9c0d\"). Validate it locally against /^[0-9a-f]{24}$/i and URL-encode it.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The voice must belong to the key's workspace, otherwise 404.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`REQUEST BODY (all fields optional; only the fields PRESENT in the body are changed)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- name (string): new display name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- description (string): new long-form description.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- language (string): new primary language, BCP-47 (e.g. \"en\").`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- labels (object): replacement flat string-to-string map, e.g. { \"accent\": \"british\" }. A`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` non-null labels object REPLACES THE ENTIRE label set. Omit labels to leave existing tags alone.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` To add one tag, the caller must send the full desired set (existing tags from the Voice's labels`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` array converted to an object, plus the new one); document this on the function.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Do NOT send visibility: it is not accepted on the public API and is silently ignored`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (publishing is admin-only). Leave it out of the patch type.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Build the JSON body only from keys the caller actually set. Never send undefined or null`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` placeholders for unchanged fields. Reject an empty patch locally.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"Documentary Narrator\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"description\": \"Warm documentary voice\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`AUTHENTICATION`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Send the header X-API-Key: \u003cworkspace API key> on every request. Keys start with \"flv_\".`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Required scope: voices:write. Keys carry one or more scopes (voices:read, voices:write, clone,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` tts); a key without this scope gets 403 with code \"insufficient_scope\". Keys created before`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` scopes existed have all four.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Read the key from the environment variable FINESSE_API_KEY (or the project's existing secrets or`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` config mechanism). Fail fast with a clear error if it is missing, before making any request.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Never hard-code, log or commit the key, and never ship it in browser/client-side code: call this`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` from server-side code only. Treat it like a password.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- A key is bound to one workspace. Referencing a voice or job from another workspace returns 404.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Keys can expire: an expired key returns 401 with code \"key_expired\". Do not retry; surface it so`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` an operator can rotate the key.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`RESPONSE ENVELOPE`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`JSON responses use one envelope. On success \"error\" is false and the payload is in \"data\":`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"status\": 200,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"data\": { \"...\": \"endpoint payload\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"error\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`On failure \"error\" is true, \"data\" is omitted and \"message\" carries the detail:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"status\": 404,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"error\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"message\": \"Voice not found\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`SUCCESS RESPONSE (200, application/json)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\"data\" is the updated Voice:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"status\": 200,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"data\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"id\": \"665f1a2b3c4d5e6f7a8b9c0d\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"Documentary Narrator\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"status\": \"ready\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"primary_language\": \"en\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"visibility\": \"private\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"clone_method\": \"instant\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"error\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`VOICE OBJECT (define a type for it; timestamps are Unix epoch MILLISECONDS)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- id: string. Unique voice id, 24-character hex. Used by the synthesize endpoints.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- name: string. Display name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- description: string, optional.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- status: string. Only \"ready\" voices can synthesize. All values: \"draft\" (created, no audio yet),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"uploading\", \"queued\", \"verifying\", \"processing\", \"training\" (in progress), \"ready\", \"failed\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (creation did not succeed), \"archived\" and \"deleted\".`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Type it as a string union of these values but tolerate other strings (treat them as not usable).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- clone_method: \"instant\" | \"professional\" | \"design\" | \"remix\" | \"guided\".`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- visibility: \"private\" | \"org\" | \"public\".`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- primary_language: string, BCP-47 (e.g. \"en\"). Used when a synthesis request omits language.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- labels: array of { key: string, value: string }, optional. Common keys: accent, gender, age,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` use_case. Example: [{ \"key\": \"accent\", \"value\": \"american\" }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- settings: object, optional, present only when configured. Synthesis defaults: stability,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` similarity, style, speed, pitch, volume, use_speaker_boost, emotion, engine_params.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- sample_audio_url: string, optional. Public URL of a short preview clip.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- base_voice_id: string, optional. Present when derived from another voice (clone_method \"remix\").`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- created_at, updated_at: integers (epoch ms).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Optional fields may be absent. Responses may contain extra fields: ignore them, never fail on them.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Example:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"id\": \"665f1a2b3c4d5e6f7a8b9c0d\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"name\": \"Studio Narrator\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"description\": \"Warm, neutral narration voice.\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"status\": \"ready\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"clone_method\": \"instant\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"visibility\": \"public\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"primary_language\": \"en\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"labels\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` { \"key\": \"accent\", \"value\": \"american\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` { \"key\": \"gender\", \"value\": \"female\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"sample_audio_url\": \"https://storage.googleapis.com/.../sample.wav\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"created_at\": 1717939200000,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` \"updated_at\": 1717939260000`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ERRORS`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 400: invalid request body. Do not retry.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 401: X-API-Key missing, malformed, invalid or revoked, or code \"key_expired\". Do not retry.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 403 with code \"insufficient_scope\": the key lacks the voices:write scope. Do not retry.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 404 with code \"not_found\" (also returned for a malformed id): the voice does not exist or belongs to another workspace. Do not retry.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 429 with code \"rate_limited\" (over the plan's requests per second): wait the number of seconds in the Retry-After header, then retry with backoff.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` See /guides/rate-limits.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 502 with code \"upstream_error\": temporarily unavailable. Retry with backoff.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Surface failures as one typed error (for example FinesseApiError) carrying: HTTP status,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` code (when present), message`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (the envelope \"message\" or the flat \"error\" string), optional feature / unit / limit / used, a`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` retryable flag, the request id (the X-Request-Id response header; error bodies also carry it as`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` request_id), and the raw body for debugging. Log the request id with every failure.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Parse error bodies defensively: if a body is not valid JSON, keep the raw text in the error.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`RETRIES`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Retry only 429 (rate limited; wait Retry-After first), 502/503 (upstream unavailable or busy) and network errors or`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` timeouts, with exponential backoff plus jitter (for example about 1s, 2s, 4s; at most 3 retries),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` then surface the error.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Never retry 400, 401, 402, 403, 404 or 422: they fail the same way again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`(Repeating the same PATCH body is harmless, which is why retries are allowed here.)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ACCEPTANCE CRITERIA`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The request body contains exactly the keys the caller set, never visibility.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The typed updated Voice from \"data\" is returned.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- The labels-replace semantics are documented on the function.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- 404 is a distinct not-found error. The key is never logged.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`TEST PLAN`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Unit tests with mocked HTTP: body contains only the provided keys; labels object serialized as`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` an object; visibility is not sendable; empty patch rejected; 200 returns Voice; 404; 502 then 200.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Smoke script: given FLAM_VOICE_ID (a voice you own), update its description to a timestamped`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` string, print the returned description, then restore the original value.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`RULES`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Implement only what this spec describes. Do not invent parameters, fields, headers, endpoints or`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` error codes. If something is ambiguous, missing, or conflicts with the existing codebase, stop`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` and ask me before guessing.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Match the project's existing style and conventions; do not refactor unrelated code.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a voice","description":"Patch a voice's mutable metadata.","api":"PATCH /flam-voice-svc/api/v1/public/voices/{id}","href":"/voice-api/update-voice"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authorization","slug":"authorization","depth":4,"children":[]},{"title":"Path parameters","slug":"path-parameters","depth":4,"children":[]},{"title":"Body","slug":"body","depth":4,"children":[]},{"title":"Response","slug":"response","depth":4,"children":[]},{"title":"Prompt","slug":"prompt","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Update a voice","path":"/flam-voice-svc/api/v1/public/voices/{id}","servers":[{"url":"https://fi.production.flamapis.com"}],"method":"patch","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"X-API-Key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"X-API-Key":{"schema":[{"type":"string","description":"Your workspace API key ( `flv_…` ). Required scope: `voices:write` .","required":true}]}},"cookie":{},"path":{"id":{"schema":[{"type":"string","description":"The voice id.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"New display name."}],"description":[{"type":"string","description":"New long-form description."}],"language":[{"type":"string","description":"New primary language (BCP-47, e.g. `en` )."}],"labels":[{"type":"object","properties":{},"description":"Replacement key/value tags, e.g. `{ \"accent\": \"british\" }` . Replaces the whole label set."}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","description":"\u003cstring>","language":"\u003cstring>","labels":{}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"data":[{"type":"object","properties":{},"description":"The updated Voice object ."}]}}],"examples":{"example":{"value":{"data":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"finesse-docs","siteName":"Finesse","title":"Update a voice - Finesse","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T20:30:45.411Z","originalFileLocation":"voice-api/update-voice.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Patch a voice\u0026#x27;s mutable metadata.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Finesse\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a voice - Finesse\">\u003cmeta data-mint-head property=\"og:description\" content=\"Patch a voice\u0026#x27;s mutable metadata.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Finesse\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.finesse.flamapp.ai/voice-api/update-voice\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://finesse-docs.mintlify.site/_mintlify/api/og/v2?division=Voices\u0026amp;title=Update+a+voice\u0026amp;description=Patch+a+voice%27s+mutable+metadata.\u0026amp;theme=b900d03be7b2e5a1a2310fa6\u0026amp;signature=b142fafb61f5be84efbea56f6d4a40580ca38f4c0402d3f9d9995b4368348f06\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a voice - Finesse\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Patch a voice\u0026#x27;s mutable metadata.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://finesse-docs.mintlify.site/_mintlify/api/og/v2?division=Voices\u0026amp;title=Update+a+voice\u0026amp;description=Patch+a+voice%27s+mutable+metadata.\u0026amp;theme=b900d03be7b2e5a1a2310fa6\u0026amp;signature=b142fafb61f5be84efbea56f6d4a40580ca38f4c0402d3f9d9995b4368348f06\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/finesse-docs/9nsqrG5QOUT6LAm6/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Finesse\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2547F0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.finesse.flamapp.ai/voice-api/update-voice\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/voice-api/update-voice.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.finesse.flamapp.ai/#organization\",\"name\":\"Finesse\",\"url\":\"https://docs.finesse.flamapp.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/finesse-docs/u9NNXVA8yD6Y29Xd/logo/finesse-light.png?fit=max\u0026auto=format\u0026n=u9NNXVA8yD6Y29Xd\u0026q=85\u0026s=665b8b35d46e51f6ae805dffc09b6fc1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.finesse.flamapp.ai#website\",\"name\":\"Finesse\",\"url\":\"https://docs.finesse.flamapp.ai\",\"publisher\":{\"@id\":\"https://docs.finesse.flamapp.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice#webpage\",\"url\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice\",\"name\":\"Update a voice\",\"description\":\"Patch a voice's mutable metadata.\",\"dateModified\":\"2026-10-23T20:30:45.411Z\",\"isPartOf\":{\"@id\":\"https://docs.finesse.flamapp.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Voices\",\"item\":\"https://docs.finesse.flamapp.ai/voice-api/list-voices\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update a voice\",\"item\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice#apireference\",\"headline\":\"Update a voice\",\"name\":\"Update a voice\",\"description\":\"Patch a voice's mutable metadata.\",\"url\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice\",\"mainEntityOfPage\":{\"@id\":\"https://docs.finesse.flamapp.ai/voice-api/update-voice#webpage\"},\"dateModified\":\"2026-10-23T20:30:45.411Z\",\"publisher\":{\"@id\":\"https://docs.finesse.flamapp.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.finesse.flamapp.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Finesse\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Finesse\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/voice-api/update-voice.md","siteName":"Finesse","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/introduction"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"API reference","groups":[{"group":"Authentication","icon":"lock","pages":[{"title":"Create an access token","api":"POST /flam-voice-svc/api/v1/public/tokens","tag":"START HERE","href":"/voice-api/create-token"}]},{"group":"Voices","icon":"microphone","pages":[{"title":"List voices","api":"GET /flam-voice-svc/api/v1/public/voices","href":"/voice-api/list-voices"},{"title":"Get a voice","api":"GET /flam-voice-svc/api/v1/public/voices/{id}","href":"/voice-api/get-voice"},{"title":"Create a voice","api":"POST /flam-voice-svc/api/v1/public/voices","href":"/voice-api/create-voice"},{"title":"Clone a voice","api":"POST /flam-voice-svc/api/v1/public/voices/clone","href":"/voice-api/clone-voice"},{"title":"Enroll a voice","api":"POST /flam-voice-svc/api/v1/public/voices/{id}/enroll","href":"/voice-api/enroll-voice"},{"title":"Get a job","description":"Poll the status of an async clone/enroll job.","api":"GET /flam-voice-svc/api/v1/public/jobs/{id}","href":"/voice-api/get-job"},{"title":"Update a voice","api":"PATCH /flam-voice-svc/api/v1/public/voices/{id}","href":"/voice-api/update-voice"},{"title":"Delete a voice","description":"Delete a voice from your workspace.","api":"DELETE /flam-voice-svc/api/v1/public/voices/{id}","href":"/voice-api/delete-voice"}]},{"group":"Speech","icon":"waveform","pages":[{"title":"Synthesize speech","api":"POST /flam-voice-svc/api/v1/public/voices/{id}/speak","href":"/voice-api/synthesize-speech"},{"title":"Stream speech (SSE)","api":"POST /flam-voice-svc/api/v1/public/voices/{id}/stream","href":"/voice-api/stream-speech"},{"title":"Realtime (WebSocket)","href":"/voice-api/realtime-websocket"},{"title":"Create a direct realtime session","api":"POST /flam-voice-svc/api/v1/public/realtime/sessions","href":"/voice-api/realtime-sessions"}]},{"group":"Compatibility","icon":"plug","pages":[{"title":"OpenAI-compatible API","href":"/voice-api/openai-compatible"}]},{"group":"Reference","icon":"book","pages":[{"title":"The Voice object","href":"/voice-api/voice-object"},{"title":"Synthesize parameters","href":"/voice-api/synthesize-parameters"},{"title":"Errors \u0026 response envelope","href":"/voice-api/errors"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/api"}]}]},"basePath":"","title":"Update a voice - Finesse","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-B8kPdtB2.js","snippetPresets-C-p1aFQ1.js","utils-B9NnUZSZ.js","style-to-object-BY3JEAdk.js","utils-DFxl7cW2.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-bSr9h7OB.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Bw4Gcy_r.js","_Uint8Array-C68x8Gny.js","isObject-FP1Yky1u.js","ApiExamples-BXsp8PHs.js","usePlaygroundInputsStore-BlAOLmIF.js","shallow-C2F02mqa.js","isEqual-C8iG4q2G.js","CodeSnippets-45lHR04X.js","CodeSnippet-6Cemznl-.js","use-playground-group-access-Cyy8SXp5.js","Page-CeZ_ZB5X.js","api-description-markdown-DiOdv5rp.js","DynamicMarkdown-B_9ywLDq.js","SectionHeading-Cc2r-uqU.js","MethodPill-Df3Tcu4c.js","getPastedJson-B3vrV0wE.js","Check2Icon-YQhSFafd.js","axios-CsQoIw0U.js"]}