In this work, we carry out spectroelectrochemical studies of films of interpolymer complexes of polyaniline (PANI) prepared via the chemical and electrochemical template polymerization of aniline in the presence of polyamide sulfonic acids with different structures. It is shown that their spectroelectrochemical behavior in the near infrared region depends on the rigidity of the chain of the polymer sulfonic acid matrix. Electrodeposited films of PANI complexes with a rigid chain polyacid exhibit a more intense absorption in the near infrared region (1000-2200 nm) and a less intense absorption in the absorption region of localized polarons (around 750 nm) in comparison with complexes with a flexible chain polyacid. The comparison of the dependence of absorption in the near infrared region on potential with the cyclic voltammetry curves sug gests that the chromophores responsible for this absorption are radical cations in nature. In the spectra of the films of chemically synthesized PANI complexes with a flexible chain polyacid, during a long term cycling in the region of potentials of the first redox stage of PANI, the absorption in the near infrared region which corresponds to delocalized polarons is also formed. This is apparently attributed to the intensification of the intermolecular interactions under the conformational fluctuations that accompany the change in the degree of oxidation of the film during cyclic voltammetry.