The electronic properties of anatase titanium dioxide (TiO2) thin films epitaxially grown on LaAlO3 substrates are investigated by synchrotron-x-ray spectroscopy [x-ray absorption spectroscopy (XAS), x-ray photoemission spectroscopy (XPS), and angle-resolved photoemission spectroscopy (ARPES)] and infrared spectroscopy. The Ti3+ fraction in TiO2−x is varied either by changing the oxygen pressure during deposition or by postgrowth annealing in ultrahigh vacuum (UHV). Structural investigation of the TiO2 thin films provides evidence of highly uniform crystallographic order in both as-grown and in situ UHV-annealed samples. The increased amount of Ti3+ as a consequence of UHV annealing is calibrated by in situ XPS and XAS analysis. The as-grown TiO2 samples, with a low Ti3+ concentration, show distinct electronic properties with respect to the annealed films, namely, absorption in the midinfrared (MIR) region correlated with polaron formation, and another peak in the visible range at 1.6 eV correlated with the presence of localized defect states (DSs). With the increasing level of Ti3+ induced by the postannealing process, the MIR peak disappears, while the DS peak is redshifted to the near-infrared region at about 1.0 eV. These results indicate the possibility of tailoring the optical absorption of anatase TiO2 films from the visible to the near-infrared region.