We used the activities provided by the OpenAI connector to interact with OpenAI instead of "Call REST Service", https://marketplace.mendix.com/link/component/220472, maybe give this connector a try?
Hi,
error 400 mean that you probably did something wrong in the body of the request, it may be a " missing or something else like the double "{{".
Maybe you can try to put all the content of the body in a string variable and put it in the {1} index.