Catalyzes the first and rate limiting step of the catabolism of the essential amino acid tryptophan along the kynurenine pathway (PubMed:17671174, PubMed:18026683). Involved in the peripheral immune tolerance, contributing to maintain homeostasis by preventing autoimmunity or immunopathology that would result from uncontrolled and overreacting immune responses (PubMed:25691885). Tryptophan shortage inhibits T lymphocytes division and accumulation of tryptophan catabolites induces T-cell apoptosis and differentiation of regulatory T-cells (PubMed:25691885). Acts as a suppressor of anti-tumor immunity (PubMed:14502282, PubMed:23103127, PubMed:25157255, PubMed:25691885). Limits the growth of intracellular pathogens by depriving tryptophan (PubMed:25691885). Protects the fetus from maternal immune rejection (PubMed:25691885). {ECO:0000269|PubMed:14502282, ECO:0000269|PubMed:17671174, ECO:0000269|PubMed:18026683, ECO:0000303|PubMed:23103127, ECO:0000303|PubMed:25157255, ECO:0000303|PubMed:25691885}. This is the function of ENSG00000131203 (IDO1, indoleamine 2,3-dioxygenase 1).