[BUG/ISSUE] 400 Bad Request: Incorrect structure for voice.experimentalControls.emotion
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.
{
"message": [
"assistantOverrides.voice.experimentalControls.Only one emotion intensity level per emotion type is allowed"
],
"error": "Bad Request",
"statusCode": 400
}
...
"experimentalControls": {
"emotion": "positivity:highest"
}
...
B. Payload from my internal JSON structure:
JSON
...
"experimentalControls": {
"emotion": "surprise:high"
}
...
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,
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.
- Error Message
The response I receive is:
{
"message": [
"assistantOverrides.voice.experimentalControls.Only one emotion intensity level per emotion type is allowed"
],
"error": "Bad Request",
"statusCode": 400
}
- Request Payload Examples
A. Payload from the cURL Request (as seen in the screenshot):
...
"experimentalControls": {
"emotion": "positivity:highest"
}
...
B. Payload from my internal JSON structure:
JSON
...
"experimentalControls": {
"emotion": "surprise:high"
}
...
- 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.
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,
