1Lightly grease the baking pan and, if desired, line the bottom with parchment paper.
2In a bowl, beat the eggs with the sugar until frothy and light in color. Add the oil and mix well.
3Sift the flour, baking powder, cinnamon, ginger and salt over the wet mixture. Mix until a smooth batter forms.
4Fold in the grated carrot and walnuts (if using) with a spatula.
5Pour the batter into the prepared pan and smooth the surface.
6Preheat the air fryer to 160°C (320°F).
7Place the pan in the air fryer and bake for 30 minutes, until the cake is cooked through. Check with a toothpick – it should come out clean from the center.
8Let the cake cool in the pan for 10 minutes, then turn out onto a wire rack to cool completely.