In this paper, an inverse analysis is used to find an appropriate heat flux distribution over the heater surface of radiant enclosures, filled with nongray media at radiative equilibrium from the knowledge of desired (prespecified) temperature and heat flux distributions over the given design surface. Regular and irregular 2D enclosures filled with nongray combustive gas products are considered. Radiation is considered the dominant mode of heat transfer and the medium temperature is obtained from the energy equation. To evaluate the nongray behavior of the participating gases properly, the spectral‐line weighted‐sum‐of‐gray‐gases (SLW) model with updated correlations is used. The dependence of absorption coefficients and the weights of the SLW model on the temperature of the medium makes the inverse problem nonlinear and difficult to handle. Here, the inverse problem is formulated as an optimization problem and the Levenberg‐Marquardt method has been used to solve it. The finite volume method is exploited for the discretization of the energy equation and the spatial discretization of the radiative transfer equation (RTE). The discrete ordinates method (TN quadrature) is used for the angular discretization of RTE. Five test cases, including homogeneous and inhomogeneous media, are investigated to prove the ability of the present methodology for achieving the desired conditions.