We have this issue after some research the conclusion was that we need a new endpoint inside edx-platform to validate a math expression, the current one we have is really linked to django views and cannot be used in other pages.
We don't need to pass an input_id or even a block_id
We just need to pass a string with the formula and get a boolean to see if is valid or not and if we want to be more specific we could add a string with the error message.