Every API response includes a Server-Timing header
The header, Server-Timing: app;dur=12.3, gives the time in milliseconds from when the API received the request until its response headers were ready. Subtract it from the time your client measured to get the network's share of each call (the API).