In thyroidectomy and parathyroidectomy procedures, diagnostic dilemmas related to whether an index tissue is of parathyroid or nonparathyroid origin frequently arise. Current options of frozen section and parathyroid aspiration are time-consuming. Parathyroid glands appear brighter than surrounding tissues on near-infrared autofluorescence imaging. The aim of this study was to develop an artificial intelligence model differentiating parathyroid tissue on surgical specimens based on near-infrared autofluorescence. With institutional review board approval, an image library of exvivo specimens obtained in thyroidectomy and parathyroidectomy procedures was created between November 2019 and April 2023 at a single academic center. Exvivo autofluorescence images of surgically removed parathyroid glands, thyroid glands, lymph nodes, and thymic tissue were uploaded into an artificial intelligence platform. Two different models were trained, with the first model using autofluorescence images from all specimens, including thyroid, and the second model excluding thyroid, to prevent the effect of specimen size on the results. Deep-learning models were trained to detect autofluorescence signals specific to parathyroid glands. Randomly chosen 80% of data were used for training, 10% for validation, and 10% for testing. Recall, precision, and area under the curve of models were calculated. Surgical procedures included 377 parathyroidectomies, 239 total thyroidectomies, 97 thyroid lobectomies, and 32 central neck dissections. For the development of the model, 1151 images from a total of 678 procedures were used. The dataset comprised 648 parathyroid, 379 thyroid, 104 lymph node, and 20 thymic tissue images. The overall precision, recall, and area under the curve of the model to detect parathyroid tissue were 96.5%, 96.5%, and 0.985, respectively. False negatives were related to dark and large parathyroid glands. The visual deep-learning model developed to identify parathyroid tissue in exvivo specimens during thyroidectomy and parathyroidectomy demonstrated a high sensitivity and positive predictive value. This suggests potential utility of near-infrared autofluorescence imaging to improve intraoperative efficiency by reducing the need for frozen sections and parathyroid hormone aspirations to confirm parathyroid tissue.