Background: Recently, internet hospitals have been emerging in China, saving patients time and money during the COVID-19 pandemic. In addition, pharmacy services that link doctors and patients are becoming essential in improving patient satisfaction. However, the existing internet hospital pharmacy service mode relies primarily on manual operations, making it cumbersome, inefficient, and high-risk. Objective: To establish an internet hospital pharmacy service mode based on artificial intelligence (AI) and provide new insights into pharmacy services in internet hospitals during the COVID-19 pandemic. Methods: An AI-based internet hospital pharmacy service mode was established. Initially, prescription rules were formulated and embedded into the internet hospital system to review the prescriptions using AI. Then, the "medicine pick-up code," which is a Quick Response (QR) code that represents a specific offline self-pick-up order, was created. Patients or volunteers could pick up medications at an offline hospital or drugstore by scanning the QR code through the window and wait for the dispensing machine or pharmacist to dispense the drugs. Moreover, the medication consultation function was also operational. Results: The established internet pharmacy service mode had four major functional segments: online drug catalog search, prescription preview by AI, drug dispensing and distribution, and AI-based medication consultation response. The qualified rate of AI preview was 83.65%. Among the 16.35% inappropriate prescriptions, 49% were accepted and modified by physicians proactively and 51.00% were passed after pharmacists intervened. The "offline self-pick-up" mode was preferred by 86% of the patients for collecting their medication in the internet hospital, which made the QR code to be fully applied. A total of 426 medication consultants were served, and 48.83% of them consulted outside working hours. The most frequently asked questions during consultations were about the internet hospital dispensing process, followed by disease diagnosis, and patient education. Therefore, an AI-based medication consultation was proposed to respond immediately when pharmacists were unavailable. Conclusion: The established AI-based internet hospital pharmacy service mode could provide references for pharmacy departments during the COVID-19 pandemic. The significance of this study lies in ensuring safe/rational use of medicines and raising pharmacists' working efficiency.