“Routing https://api.foobarbaz.app to https://foobarbaz.app/api and moving over the JavaScript clients using the api. subdomain will cut your network traffic in half.”
The api. subdomain looks tidy. It also makes every request cross-origin, so the browser fires an OPTIONS preflight before the real call. Put the API under a path on the same host and the extra round trip disappears. Somebody chose the pretty URL, and your users pay for it in latency.