An in situ spectroscopic ellipsometry study has been performed to investigate LaNiO 3−x phase transition associated with oxygenation and/or reduction reversible treatments. Epitaxial thin films of LaNiO 3 were deposited onto SrTiO 3 ͑001͒ substrates by pulsed laser deposition. Reduction of oxygen stoichiometry of these films under high vacuum, which leads to compound with the formula LaNiO 3−x , is realized in the deposition chamber and studied in situ by spectroscopic ellipsometry. Phases belonging to the series LaNiO 3−x with 0 ഛ x ഛ 1 appear at high temperatures and lead to modifications of the optical properties, such as the refractive index and the extinction coefficient, which can be monitored by spectroscopic in situ ellipsometry. These phase changes are associated with a metal-insulator transition. Specifically, modifications occur in the nickel environment, in particular, part of the Ni-polyhedron change from an octahedral symmetry ͑with Ni 3+ ͒ to partial squared plane symmetry ͑with Ni 2+ ͒. The reversible oxygenation process is observed by in situ ellipsometry in the temperature range from 473 to 573 K. The thermal variation of the refractive index exhibits a "first-orderlike" transition whose amplitude depends on the oxygen pressure. The sensitivity of the oxygen deficient LaNiO 3−x to the reoxygenation can be demonstrated not only through electrical properties, as commonly shown, but also through optical properties with a noncontact measurement. Ex situ x-ray photoelectron spectroscopy exhibits the presence of hydroxide, both La-OH and Ni-OH, at the surface, confirming the hygroscopic behavior of the lanthanum compound. In spite of this dominant surface reaction, a modification in the photoemission spectra can be observed for the oxygen deficient LaNiO 3−x samples. This seems to indicate a loss of oxygen atoms in the LaO plane, leading to a modified perovskite structure. Furthermore, a too long reduction process drives to the irreversible creation of the highly insulating La 2 NiO 4 phase with a segregation of NiO.