If there is one medical test that everyone in the world undergoes, it is a chest X-ray. Doctors can use X-ray images to determine if someone has tuberculosis, lung cancer, or other diseases, but they cannot use them to assess whether the lungs are functioning well. In results published in The Lancet Digital Health, a research team developed a generative AI model that can accurately estimate lung function from chest X-ray images. Traditionally, lung function is measured using a spirometer, which requires patient cooperation, as they are given specific instructions on how to inhale and exhale into the device. Accurate assessment of the measurements can be challenging if the patient struggles to follow the instructions, which can occur in infants, individuals with dementia, or people prone to lung function issues. The research group trained, validated, and tested the generative AI model using more than 140,000 chest X-ray images over nearly 20 years. They compared actual spirometry data with the generative AI model's estimates to enhance its performance. The results showed a remarkably high agreement rate, with a Pearson correlation coefficient (r) of over 0.90, indicating that the method is promising enough for practical use. The model developed in this study has the potential to expand lung function assessment options for patients who have difficulty undergoing spirometry.