Preheat the oven or air fryer to 180°C. Line a small square baking tin with baking parchment or prepare a silicone mould that fits your air fryer.
Mash the bananas with the vanilla extract and cinnamon until smooth.
Stir in the oats, chopped apricots and pistachios until well combined.
Leave the mixture to rest for 5–10 minutes so the oats can absorb some of the moisture.
Spoon the mixture into the prepared tin or mould and spread it out evenly.
Bake in the oven for about 20–25 minutes, or until lightly golden and set.
Alternatively, bake in the air fryer for 15–18 minutes, until firm and lightly coloured.
Leave to cool in the tin before transferring to a wire rack.
Once completely cool, cut into slices or squares and serve.