Unexpected HTTP code: 400 The response is {"message":"Problem is too big. Use async POST request instead.","status":"finished"}

As the error message suggests, you need to switch to the async endpoint as documented here: Documentation - GraphHopper Directions API

As a rule of thumb I can recommend you to solve Traveling Salesman problems (1 vehicle, x stops) with the synchronous endpoint and everything else with the asynchronous one.