ESPHome API server ip address

Does anyone know how to set the ESPHome API server ip address in home assistant to something other than what is automatically generated? I would like to be able to talk to my api outside of my home network using my external ip address and port forwarding.

The ESP device is the API server. Set it to whatever you like.

Your question is apples and oranges. If you don’t like the IP address that the router’s DHCP server assigns, then you can set a fixed IP.
But that has nothing to do with port forwarding.

Why don’t you just use DuckDuck Go and log into your Home Assistant from anywhere.

Use static lease on the DHCP service or use the manual_ip option under the WiFi section in your YAML file.