Chatgpt-4o model is giving error in API while answering correct in chat window!

working on a small api project that sends a table with less than 20 columns and asks for several columns back, calculatefd usoing only multiplication, addition and division

all the table calculations is done properly in chat (in a plus account)

using the same prompt and data set in API is making calculation errors

tried to tune the prompt, but still same result. Some times the error size is even 100%, most pof the times is smaller, but still…

Any idea what should I consider to pass this roadblock ?

Tx

tried with temperature 0.3, then 0.2, then 0.1,
with no significant improvements