Pat the pork dry. Use paper towels to remove surface moisture.
Dry meat browns better and builds flavor.
Preheat the air fryer to 360°F (182°C). Give it 3–5 minutes so the basket is hot when the pork goes in.
Mix the rub. In a small bowl, combine salt, pepper, garlic powder, onion powder, smoked paprika, thyme, and cayenne if using.
Oil and season. Rub the pork loin all over with olive oil, then coat evenly with the spice mixture. Press it in so it sticks.
Air fry, fat side up. Place the pork in the basket or on the tray, leaving space around it for airflow. Cook for 25 minutes at 360°F.
Flip and continue. Turn the pork and cook another 10–20 minutes, depending on thickness and your air fryer.
Start checking the internal temperature at the 35-minute mark.
Check doneness. Use an instant-read thermometer in the center. You want 140–145°F (60–63°C). The temperature will rise a few degrees as it rests.
Rest the roast. Transfer to a cutting board and tent loosely with foil.
Let it rest for 10 minutes. This lets the juices redistribute and keeps it moist.
Slice and serve. Cut into 1/2-inch slices against the grain. Finish with a squeeze of lemon or a sprinkle of parsley if you like.