We study the statistical mechanics of the self-gravitating gas at thermal equilibrium with two kinds of particles . We start from the partition function in the canonical ensemble which we express as a functional integral over the densities of the two kinds of particles for a large number of particles . The system is shown to possess an infinite volume limit when ( N _ { 1 } ,N _ { 2 } ,V ) \to \infty , keeping N _ { 1 } / V ^ { \frac { 1 } { 3 } } and N _ { 2 } / V ^ { \frac { 1 } { 3 } } fixed . The saddle point approximation becomes here exact for ( N _ { 1 } ,N _ { 2 } ,V ) \to \infty . It provides a nonlinear differential equation on the densities of each kind of particles . For the spherically symmetric case , we compute the densities as functions of two dimensionless physical parameters : \eta _ { 1 } = \frac { Gm _ { 1 } ^ { 2 } N _ { 1 } } { V ^ { \frac { 1 } { 3 } } T } and \eta _ { 2 } = \frac { Gm _ { 2 } ^ { 2 } N _ { 2 } } { V ^ { \frac { 1 } { 3 } } T } ( where G is Newton ’ s constant , m _ { 1 } and m _ { 2 } the masses of the two kinds of particles and T the temperature ) . According to the values of \eta _ { 1 } and \eta _ { 2 } the system can be either in a gaseous phase or in a highly condensed phase . The gaseous phase is stable for \eta _ { 1 } and \eta _ { 2 } between the origin and their collapse values . We have thus generalized the well-known isothermal sphere for two kinds of particles . The gas is inhomogeneous and the mass M ( R ) inside a sphere of radius R scales with R as M ( R ) \propto R ^ { d } suggesting a fractal structure . The value of d depends in general on \eta _ { 1 } and \eta _ { 2 } except on the critical line for the canonical ensemble in the ( \eta _ { 1 } , \eta _ { 2 } ) plane where it takes the universal value d \simeq 1.6 for all values of N _ { 1 } / N _ { 2 } . The equation of state is computed . It is found to be locally a perfect gas equation of state . The thermodynamic functions ( free energy , energy , entropy ) are expressed and plotted as functions of \eta _ { 1 } and \eta _ { 2 } . They exhibit a square root Riemann sheet with the branch points on the critical canonical line . The behaviour of the energy and the specific heat at the critical line is computed . This treatment is further generalized to the self-gravitating gas with n -types of particles .