#Can I update the labels of voices via API? ( "labels": { "accent": "American", "age": "mid
1 messages · Page 1 of 1 (latest)
AI-generated Answer for harry018485
Yes. You can update a voice’s labels via the Edit Voice API:
- Endpoint: POST /v1/voices/{voice_id}/edit (multipart/form-data). The labels field must be a JSON-serialized string, and you must include name even when only changing labels. Only voices you created can be edited. (elevenlabs.io)
Example cURL
-F name is required; -F labels is a JSON string.
curl -X POST https://api.elevenlabs.io/v1/voices/VOICE_ID/edit
-H "xi-api-key: YOUR_API_KEY"
-H "Content-Type: multipart/form-data"
-F 'name=My Voice'
-F 'labels={"accent":"American","age":"middle-aged","description":"expressive","gender":"female","use_case":"social media"}'
(elevenlabs.io)
Notes
- You can also set labels when creating a new voice via POST /v1/voices/add using the labels field. (elevenlabs.io)
- To verify, GET /v1/voices/{voice_id} returns the labels map for the voice. (elevenlabs.io)
Sources:
Edit voice | ElevenLabs Documentation
Edit voice | ElevenLabs Documentation
Create IVC voice | ElevenLabs Documentation
Get voice | ElevenLabs Documentation
Hoe do I do this via Python?