The use of artificial intelligence (AI) technology in the healthcare sector has provided various conveniences in supporting diagnosis, patient condition monitoring, and medical decision-making processes. However, the use of AI-based medical devices also raises legal issues, particularly concerning legal certainty, patient safety, and liability in cases of errors or losses arising from medical services. This study aims to analyze the legal framework in Indonesia concerning the use of AI-based medical devices in medical services and to examine the legal liability of hospitals for their use. This study employs a normative legal research method using a statutory approach and a conceptual approach. The legal materials consist of laws and regulations, books, scientific journals, and other relevant legal materials concerning the use of AI technology in healthcare services. The analysis is conducted qualitatively by examining the relationship between legal norms governing medical devices, healthcare services, hospitals, medical and healthcare professionals, and the protection of patients' rights. The results indicate that the use of AI-based medical devices in medical services must comply with healthcare laws, safety, quality, and patient safety standards, as well as applicable regulations governing medical devices. Hospital liability may arise when the use of AI technology in medical services causes harm due to errors, negligence, or failure to fulfill the hospital's legal obligations. Therefore, hospitals remain legally responsible for ensuring that AI is used safely, appropriately, professionally, and in accordance with applicable laws and regulations