We prove a bosonic formula for the generating function of level-restricted paths for the infinite families of affine Kac-Moody algebras. In affine type A this yields an expression for the level-restricted generalized Kostka polynomials.