[BUG/ISSUE] 400 Bad Request: Incorrect structure f...
# support
f
Dear VAPI Support Team, I am experiencing an issue when attempting to use the experimentalControls to set the voice emotion in the assistantOverrides of a call request. The API consistently returns a 400 Bad Request error. 1. Error Message The response I receive is: JSON { "message": [ "assistantOverrides.voice.experimentalControls.Only one emotion intensity level per emotion type is allowed" ], "error": "Bad Request", "statusCode": 400 } 2. Request Payload Examples A. Payload from the cURL Request (as seen in the screenshot): JSON ... "experimentalControls": { "emotion": "positivity:highest" } ... B. Payload from my internal JSON structure: JSON ... "experimentalControls": { "emotion": "surprise:high" } ... 3. Issue Description I believe the API endpoint is expecting a different structure for the emotion key within experimentalControls. I have tried to pass the emotion and intensity as a string (e.g., "positivity:highest"), which seems to be the cause of the error. Could you please confirm the correct and expected JSON structure for setting the voice emotion and its intensity in the assistantOverrides.voice.experimentalControls object? For example, is the correct structure: JSON "experimentalControls": { "emotion": { "positivity": "highest" } } or something else? Thank you for your assistance in clarifying the correct payload format. Best regards, https://cdn.discordapp.com/attachments/1433052156809969664/1433052157090730126/Snimka_obrazovky_2025-10-29_o_12.17.31.png?ex=69034953&is=6901f7d3&hm=d0f59975ea7bb8b3354c53e246f3f303618fea2490e0df5b1a59362c26efc673&
v
To resolve the 400 Bad Request error, you should set the
emotion
field in
experimentalControls
as an array of strings, each in the format
"emotion:intensity"
, not as a single string or object. Here’s the correct structure:
Copy code
json
"experimentalControls": {
  "emotion": ["positivity:highest"]
}
Only one intensity per emotion type is allowed in the array. For more details, see the [official changelog example](https://docs.vapi.ai/changelog/2025/2/25). Source: - [Changelog: February 25, 2025 – Voice Model Enhancements](https://docs.vapi.ai/changelog/2025/2/25)
v
Message marked as helpful by @Fanfantulipan! 🎉
c
Hi Fanfantulipan, Could you please specify the issue or question you have? I'm here to help you with any voice-related concerns or configurations.
2 Views