Preheat the air fryer to 400°F (200°C).
Drain the tuna in a colander and discard the oil if using tuna packed in oil.
Finely chop red onion to equal 1/4 cup.
In a mixing bowl, combine the drained tuna, chopped red onion, dill pickle relish, mayonnaise, and fresh-ground black pepper; mix until evenly combined.
Place one pita in the air fryer basket and toast for about 40 seconds, then flip and toast the other side about 40 seconds; the pita should be firm but not browned.
Spread half of the tuna mixture over the toasted pita, then sprinkle 1/4 cup grated mozzarella over the top.
Return the topped pita to the air fryer and cook until the cheese is fully melted and the filling is hot, about 1–2 minutes depending on your model.
Remove from the air fryer, repeat with the second pita, and serve immediately.