01 - Preheat your air fryer to 320°F (160°C) for 5 minutes.
02 - Grease and line a 7-inch (18 cm) round cake pan that fits your air fryer basket.
03 - In a large bowl, whisk together the flour, sugar, cocoa powder, baking soda, and salt.
04 - In another bowl, combine Guinness, buttermilk, melted butter, eggs, and vanilla extract. Mix well.
05 - Pour the wet ingredients into the dry ingredients and stir until just combined. Do not overmix.
06 - Pour the batter into the prepared cake pan and smooth the top.
07 - Place the pan into the preheated air fryer basket. Cook for 23–27 minutes, or until a toothpick inserted in the center comes out with a few moist crumbs.
08 - Remove the cake from the air fryer and let it cool in the pan for 10 minutes, then transfer to a wire rack to cool completely.
09 - Dust with powdered sugar before serving, or top with whipped cream or chocolate ganache if desired.