ESP8266 API connection closed

What is your Wifi and network configuration ? sorry if I missed it but what platform HA/ESPHome is running on ? PI4 ? wired or wireless ?