Hey jingnan - yes, this can be done from the DepthAI API as well. Device Manager uses the same bootloader config API internally.
Minimal Python flow:
import depthai as dai
found, info = dai.DeviceBootloader.getFirstAvailableDevice()
if found:
with dai.DeviceBootloader(info) as bl:
conf = bl.readConfig()
conf.setStaticIPv4("192.168.1.200", "255.255.255.0", "192.168.1.1")
success, error = bl.flashConfig(conf)
print("OK" if success else error)
flashConfig() writes the bootloader configuration area; it does not overwrite calibration/EEPROM. Please double-check the IP, subnet mask, and gateway before flashing, since incorrect network settings can make the PoE device unreachable until reset.
Best,
Oskar