A class of thermoplastic side-chain polyimides was described which have exceptional thermal stabilities without significant sacrifice of optical nonlinearity. Also, a quite general approach to the synthesis of thermally stable electrooptic polymers with high optical nonlinearities was demonstrated. The nonlinearity is optimized by choice of the chromophore from which the diamine monomer is synthesized, while physical properties such as the glass transition temperature and processability can be optimized by careful choice of the dianhydride portion of the polyimide.