The solution for these problem is to use the Example cURL command from this documentation: https://learn.microsoft.com/en-us/azure/ai-services/openai/use-your-data-quickstart?tabs=command-line&pivots=rest-api
I use Node 18 with Axios. Works perfectly.
Additional explanation: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/use-your-data#system-message
Basically this way you can create an API response in similar quality the https://oai.azure.com/ web app deploy creates, but use with your custom frontend.
Use this basic deployment to validate your assistant answers.