Bring a large pot of salted water to a boil. Add the peeled whole potatoes and boil for 6 to 8 minutes. The potatoes should be just barely fork tender on the outside but still firm in the center. Drain and let them cool for 10 minutes.
Using the large holes of a box grater, shred the parcooked potatoes into a large bowl. Add the garlic powder, onion powder, salt, black pepper, and flour. Gently toss everything together until the seasonings and flour are evenly distributed.
Take about 1 tablespoon of the potato mixture and press it firmly together in your hands, shaping it into a small cylinder or barrel shape. Pack it tightly so it holds together. Repeat with the remaining mixture to make about 30 to 35 tots.
Preheat the air fryer to 400°F for 2 minutes.
Spray the air fryer basket with cooking spray. Place the tater tots in a single layer with a little space between each one. Spray the tops generously with cooking spray.
Air fry for 12 to 15 minutes, shaking the basket gently every 5 minutes, until the tater tots are golden brown and crispy on all sides.
Serve the tater tots hot with ketchup, ranch dressing, or your favorite dipping sauce.