King Apep has 12,000,000 HP. The battle has different phases which depend on Apep's HP. Its movepool will change accordingly. Regardless of the Phase, Apep will always cast Reflect on itself every turn. It can act up to 7 times per turn.
In Phase 1 (100% - 80%) it goes through a procedural check to see what its remaining 6 actions will be for the rest of the turn. With Spitfire (Magic Damage x1.8 and decreases Fire Resistance by 60% for 3 turns to all units) at 40% chance, Venom Spit (Physical Damage x2.5 to all units and inflict poison) at 40% chance, and Auto-attack.
At Phase 2 (79% - 60%) it updates its movepool now using Serpent Glare (Magic Damage x2.8 and Petrify to all units) once, and its sequential check is now updated to Spitfire -> Venom Spit -> Fire Scarabs (Fire Physical Damage x2.6 to one unit) -> Normal Attacks.
At Phase 3 (59% - 50%) the sequential check is updated to Spitfire -> Venom Spit -> Fire Scarabs -> Bite Trial (Magic Attack with Physical Damage x3.2 and Paralysis to one unit) -> Normal Attacks.
At Phase 4 (49% - 40%) the sequential check is updated to Spitfire -> Venom Spit -> Fire Scarabs -> Bite Trial -> Embers (Fire Magic Damage x2.5 and Confuse to one unit) -> Normal Attacks. Phase 5 (39% - 30%) plays out the same as this one.
Finally at Phase 6 (29% - 0%) it adds Rest, which heals Apep for 1,000,000 and will use it once every turn.
King Apep is resistant to Fire/Dark (50%) and weak to Light (-30%). Immune to all status ailments and vulnerable to ATK/MAG Breaks.
King Apep is not too difficult provided the player has enough defensive layers. With ATK/MAG Breaks of around 45% and Fire Resistance (through equip and buffs) should be enough to make most of its damage quite minimal. Most of King Apep's attacks are Magic, so a Magic Tank like Mystea or Basch will render the damage even more negligible.
By far the largest threat of the battle are the status ailments which all have 100% of success. The player should equip immunity or bring units with immunity buffs. Marie and Mystea are solid choices, the former also has Barfiraga, the latter is also a Magic Tank.
Poison and Stone are not as much of a threat provided the player has a healer immune to petrify that can restore these conditions. Luka and Rem are adept at this while also restoring the party's HP.
Damage options vary. Physical Damage is by far the most effective method due to several sources for Beast Killer materia which will very easily escalate the damage against King Apep, especially through chains. However if the player seeks to defeat King Apep with Magic as part of the Missions they should be wary of Reflect. The player can either remove its Reflect with Dispel (or abilities similar to Fingersnap) and then follow with a Magic. Alternatively the player can use Magic that is not affected by Reflect like Ultima, Meteor or Alterna (this one requiring the Ring of the Lucii). As a reminder, the Magic attack doesn't have to kill Apep, Overkill damage also counts. The Esper Ramuh at its most basic provides both Dispel and Thunder, so an effective way of using them would be to Doublecast Dispel and Thunder on top of a Chain and time them so it manages to Overkill Apep with Thunder.