Abstract The complete nonperturbative expressions for the high-temperature expansion of the one-loop effective action induced by the charged scalar and the charged Dirac particles both at zero and finite temperatures are derived with account of possible nontrivial boundary conditions. The background electromagnetic field is assumed to be stationary and such that the corresponding Klein–Gordon operator or the Dirac Hamiltonian is self-adjoint. The contributions of particles and antiparticles are obtained separately. The explicit expressions for the C-symmetric and the non-C-symmetric vacuum energies of the Dirac fermions are derived. The leading corrections to the high-temperature expansion due to the nontrivial boundary conditions are expli...