Catalyzes the first and rate-limiting step in the kynurenine pathway of tryptophan catabolism. Involved in immune regulation. L-tryptophan + O2 = N-formyl-L-kynurenine 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. Ido1 and Ido2 are 2 distinct enzymes which catalyze the same reaction. Ido2 affinity for tryptophan is much lower than that of Ido1. Ido2 may play a role as a negative regulator of Ido1 by competing for heme-binding with Ido1. Low efficiency Ido2 enzymes have been conserved throughout vertebrate evolution, whereas higher efficiency Ido1 enzymes are dispensable in many lower vertebrate lineages. 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.