IDO functions as a heme-containing enzyme that introduces molecular oxygen into the indole ring of tryptophan, leading to the formation of N-formylkynurenine. The reaction mechanism involves the activation of molecular oxygen and its insertion into the substrate. This oxidation process is crucial for the subsequent steps in the metabolic pathway and allows the enzyme to play a role in maintaining homeostasis within the immune system.