Catalyzes the first and rate limiting step of the catabolism of the essential amino acid tryptophan along the kynurenine pathway (PubMed:17671174). Involved in immune regulation. May not play a significant role in tryptophan-related tumoral resistance (PubMed:25691885). L-tryptophan + O2 = N-formyl-L-kynurenine Binds 1 heme group per subunit. Activity is inhibited by D-1MT (1-methyl-D-tryptophan) and MTH-trp (methylthiohydantoin-DL-tryptophan) but not L-1MT (1-methyl-L-tryptophan). Amino-acid degradation; L-tryptophan degradation via kynurenine pathway; L-kynurenine from L-tryptophan: step 1/2. Additional isoforms exist at least in placenta and brain. Detected in liver, small intestine, spleen, placenta, thymus, lung, brain, kidney, and colon (PubMed:17671174). Also expressed at low level in testis and thyroid. Not expressed in the majority of human tumor samples (>99%) (PubMed:25691885). The variant Trp-248 (p.R248W) drastically reduces the enzymatic activity (PubMed:17671174, PubMed:18418598). The Del359-420 variant (p.Y359X) generates a truncated, enzymatically inactive protein (PubMed:17671174). The high prevalence of these polymorphic alleles results in a non-functional IDO2 enzyme in up to 50% of Caucasians (PubMed:18418598). IDO1 and IDO2 are 2 distinct enzymes which catalyze the same reaction. IDO2 affinity for tryptophan is much lower than that of IDO1. 50 % of Caucasians harbor polymorphisms which abolish IDO2 enzymatic activity. IDO2 is expressed in human tumors in an inactive form: tryptophan degradation is entirely provided by IDO1 in these cells (PubMed:18418598). IDO2 may play a role as a negative regulator of IDO1 by competing for heme-binding with IDO1 (PubMed:25394548). Low efficiency IDO2 enzymes have been conserved throughout vertebrate evolution, whereas higher efficiency IDO1 enzymes are dispensable in many lower vertebrate lineages (PubMed:25950090). IDO1 may have arisen by gene duplication of a more ancient proto-IDO gene before the divergence of marsupial and eutherian (placental) mammals. Belongs to the indoleamine 2,3-dioxygenase family.