Clean the green beans under cold running water. Dry them with a towel.
Cut the stems off the bottom and top of the green beans, about ¼ inch on each side.
Add the green beans to a mixing bowl. Spritz the green beans with two sprays of avocado oil (or one to two teaspoons of avocado oil) and mix with tongs.
Sprinkle on the garlic powder, onion powder, salt, and pepper. Mix again with tongs.
Fresh green beans: Preheat the air fryer to 370 °F. Add the green beans in a single layer without crowding. Cook in multiple batches if necessary. Cook for six minutes, mixing halfway.
Frozen green beans: Preheat the air fryer to 400 °F. Place the green beans in a single layer in the air fryer basket so they aren’t crowding. Cook in multiple baskets if necessary. Cook for eight minutes, mixing halfway.
Transfer to a serving platter and sprinkle on optional toppings like parmesan cheese, red pepper flakes, or lemon.