Chemical reactions to produce polyimide foams for application as thermal insulation and fire prevention materials are discussed. Thermal and physical properties of the polyimides are described. Methods for improving basic formulations to produce desired qualitites are included