Metabolic dysfunction-associated steatotic liver disease (MASLD) is common in individuals with obesity. Sexual dimorphism is present in MASLD. A noninvasive test to diagnose the severity of the disease, in particular the presence of Metabolic dysfunction-associated steatohepatitis (MASH), is lacking. This European multicenter prospective study uses a blood test based on mid-infrared (MIR) metabolic fingerprinting of individuals with severe or morbid obesity to diagnose MASH. Three hundred eighty-two individuals with severe or morbid obesity undergoing bariatric surgery were enrolled prospectively. Liver biopsies were obtained during surgery and assessed centrally. An algorithm was defined to calculate a score from the recorded MIR spectrum and to establish a diagnostic threshold to classify patients with MASH. Among the women (n = 217), MASH was diagnosed in 14.3% of cases. For women, the performance in terms of AUC were 0.83 and 0.82 in the calibration and validation groups, respectively. For a threshold of 0.1817, sensitivities were 86% and 70%, specificities were 81% and 75%, PPV were 43% and 32%, NPV were 97% and 94% and ACC were 82% and 74% for the calibration and validation groups, respectively. For men (n = 78; MASH: 33.3%), the performance of the spectral model was poor. The metabolic fingerprint obtained by MIR spectroscopy can rule out MASH in women with severe or morbid obesity. Its value in men needs new studies.Trial registration: ClinicalTrials.gov identifier: ClinicalTrials.gov identifier: NCT03978247 (04/06/2019)