Camera-guided instruments, such as endoscopes, have become an essential component of contemporary medicine. The 15–20 million endoscopies performed every year in the United States alone demonstrate the tremendous impact of this technology. However, doctors heavily rely on the visual feedback provided by the endoscope camera, which is routinely compromised when body fluids and fogging occlude the lens, requiring lengthy cleaning procedures that include irrigation, tissue rubbing, suction, and even temporary removal of the endoscope for external cleaning. Bronchoscopies are especially affected because they are performed on delicate tissue, in high-humidity environments with exposure to extremely adhesive biological fluids such as mucus and blood. Here, we present a repellent, liquid-infused coating on an endoscope lens capable of preventing vision loss after repeated submersions in blood and mucus. The material properties of the coating, including conformability, mechanical adhesion, transparency, oil type, and biocompatibility, were optimized in comprehensive in vitro and ex vivo studies. Extensive bronchoscopy procedures performed in vivo on porcine lungs showed significantly reduced fouling, resulting in either unnecessary or ∼10–15 times shorter and less intensive lens clearing procedures compared with an untreated endoscope. We believe that the material developed in this study opens up opportunities in the design of next-generation endoscopes that will improve visual field, display unprecedented antibacterial and antifouling properties, reduce the duration of the procedure, and enable visualization of currently unreachable parts of the body, thus offering enormous potential for disease diagnosis and treatment.