Our study found that the correlation of AIP with IR and T2D was different on different sides of the inflection point when fully adjusted for potential confounders, with the risk of T2D increasing with increasing AIP levels when he AIP was greater than − 0.47, and the risk of IR increasing with increasing AIP levels when the AIP was below 0.45. Here, AIP is linked to autoimmune pancreatitis.