The energy stored in the part of the Earth's magnetic field above the surface is about the same as the yield of a 100 megaton nuclear bomb. This is about 4e17 J, or about 13 gigawatt-years.
Mars is smaller, and so the volume of the magnetic field would be smaller, and a lower field is probably enough. Since stored energy goes as B^2, maybe this energy could be reduced by two orders of magnitude.
[1] https://www.omnicalculator.com/physics/emc2