In a microwave-safe mug, whisk together the flour, sugar, cocoa powder, baking powder, and salt.
Add the milk, vegetable oil, and vanilla extract to the mug. Mix until well combined and smooth.
If using, sprinkle chocolate chips or chopped nuts on top of the batter.
Preheat your air fryer to 320°F (160°C).
Place the mug into the air fryer basket and cook for 10-12 minutes, or until a toothpick inserted in the center comes out clean.
Remove the mug from the air fryer and let it cool for a few minutes before enjoying.