In a bowl, combine the buttermilk and hot sauce (if using). Add the shrimp and let them marinate for 30 minutes.
In a separate shallow dish, mix together the flour, garlic powder, onion powder, paprika, salt, and black pepper.
In another shallow dish, place the breadcrumbs.
Remove the shrimp from the buttermilk, allowing excess to drip off. Dredge each shrimp in the flour mixture, then dip back into the buttermilk, and finally coat with breadcrumbs, pressing gently to adhere.
Preheat the air fryer to 400°F. Lightly spray the air fryer basket with cooking spray.
Arrange the breaded shrimp in a single layer in the air fryer basket. Spray the tops lightly with cooking spray.
Cook for 8-10 minutes, flipping halfway through, until the shrimp are golden brown and crispy.
Serve immediately with your favorite dipping sauce.