Abstract: <!-- *** Custom HTML *** --> We prove a bosonic formula for the generating function of levelrestricted paths for the nonexceptional affine Kac–Moody algebras. In affine type A this yields an expression for the level-restricted generalized Kostka polynomials.