Preheat the air fryer to 400°F (200°C) for about 5 minutes.
In a large bowl, combine the sweet potato cubes, olive oil, garlic powder, paprika, salt, black pepper, and cayenne pepper (if using). Toss until the sweet potatoes are evenly coated.
Place the sweet potato cubes in the air fryer basket in a single layer. You may need to cook them in batches depending on the size of your air fryer.
Cook for 15-20 minutes, shaking the basket halfway through to ensure even cooking, until the sweet potatoes are golden brown and crispy on the outside.
Once done, remove from the air fryer and let them cool for a few minutes before serving.