To make a perfect hard-boiled egg in the air fryer, cook them for 14 minutes to 16 minutes.