Preheat your air fryer for 5 minutes at 400 degrees.
Spray the bottom of your preheated air fryer basket with cooking spray.
Lay your pickles out on plates lined with paper towels. This will soak up the extra juice. You should also dab the top of them with paper towels to absorb more of the juice. (If you don't do this, your pickles well end up soggier and not crispy!)
In a small bowl, mix together the flour, garlic powder, onion powder, pepper, salt, paprika and chili powder. Stir them so they are well blended.
Begin to put pickles, in small batches, in the flour mixture. Coat each one in the flour mixture, making sure to cover the whole pickle.
Shake off any excess flour on each pickle and then place the pickles into the air fryer baskets. You don't want them to be touching each other. How many you can fit will depend on the size of your air fryer.
Spray the tops of the pickles in the basket with cooking spray., then air fry them for 7 minutes.
Open the air fryer and flip the pickles over, either with a fork or tongs, being careful not to touch the sides of the air fryer with your hands.
Now that they are all reversed, spray the new tops of the pickles with cooking spray, then cook another 7 minutes, or until golden brown. (Add more time if you want them even crispier).
Repeat this process with the remaining pickles you have.
Serve immediately and with ranch, if desired.