Elevated AIP and TyG index levels were significantly and nonlinearly associated with an increased AF risk. Here, AIP is linked to atrial fibrillation.