Preheat your air fryer to 400°F (200°C) for about 5 minutes.
In a mixing bowl, combine the olive oil, garlic powder, onion powder, smoked paprika, salt, black pepper, and cayenne pepper. Mix well to create a marinade.
Pat the chicken drumsticks dry with paper towels.
Add the drumsticks to the bowl with the marinade, tossing them until they are evenly coated.
Lightly spray the air fryer basket with cooking spray or brush with a little oil to prevent sticking.
Arrange the chicken drumsticks in a single layer in the air fryer basket.
Cook the drumsticks at 400°F (200°C) for 25 minutes, flipping them halfway through.
Check the internal temperature of the chicken; it should reach at least 165°F (74°C).
Once cooked, carefully remove the drumsticks from the air fryer using tongs and let them rest for a few minutes.
Serve warm and enjoy!