Preheat an air fryer to 390°F
Spray corn with olive oil and season with salt and pepper.
Place the corn in the basket. Cook in the air fryer at 390°F for 15 minutes. Turn over halfway through.
Microwave butter and garlic for 30 seconds. Brush mixture over corn. Sprinkle with chili powder and cilantro.