Preheat your air fryer to 400°F (200°C) for about 5 minutes.
In a large bowl, combine the grated potatoes, chopped onion, flour, salt, black pepper, and garlic powder. Mix well until all the ingredients are evenly incorporated.
Take a handful of the potato mixture and squeeze out any excess moisture. This step is crucial to ensure your rosti cooks evenly and achieves a crispy texture.
Lightly grease the air fryer basket or tray with cooking spray or olive oil.
Take a portion of the potato mixture and shape it into a round patty, about 1/2 inch (1 cm) thick. Repeat with the remaining mixture, placing each patty in a single layer in the air fryer basket or tray. Make sure to leave some space between the patties to allow air circulation.
Place the basket or tray in the preheated air fryer and cook for 10 minutes.
After 10 minutes, carefully flip the potato rosti patties using a spatula to ensure even cooking. Cook for an additional 10-15 minutes or until the rosti is golden brown and crispy on both sides.
Once cooked, remove the air fryer potato rosti from the basket or tray and transfer to a serving plate. Repeat the cooking process with any remaining potato mixture.
Serve the air fryer potato rosti hot and enjoy the crispy exterior and tender interior.