Résumé : We adapted a recently proposed framework to characterize the optical response of interacting electrons in solids in order to expedite its computation without compromise in accuracy at the microscopic level. Our formulation is based on reliable parametrizations of Hamiltonians and Coulomb interactions, which allows economy and flexibility in obtaining response functions. It is suited to computing the optical response to fields of arbitrary temporal shape and strength, to arbitrary order in the field, and natively accounts for excitonic effects. We demonstrate the approach by computing the frequency-dependent susceptibilities of MoS2 and hexagonal BN monolayers up to the third harmonic. Grounded on a generic nonequilibrium many-body perturbation theory, this framework allows extensions to handle generic interaction models or to describe electronic processes taking place at ultrafast time scales.