Preheat the Air Fryer – Set your air fryer to 320°F and grease a 6-inch cake pan.
Mix Dry Ingredients – In a bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
Mix Wet Ingredients – In another bowl, whisk together eggs, brown sugar, white sugar, vegetable oil, and vanilla.
Combine – Gently fold the dry ingredients into the wet mixture, then stir in grated carrots, nuts, and raisins if using.
Bake – Pour batter into the greased pan and place in the air fryer. Bake at 320°F for 30-35 minutes, checking with a toothpick at the 30-minute mark.
Cool the Cake – Let it cool completely before frosting.
Make the Frosting – Beat together cream cheese, butter, powdered sugar, and vanilla until smooth.
Frost & Serve – Spread frosting over the cooled cake, slice, and enjoy!