An endoscope realized as either a borescope or a fiberscope including one or more fluid filled lenses is described. In an embodiment, the optical power of the fluid filled lenses may be adjusted to adjust the focal length associated with the endoscope. Thus, variable working distances are allowable while maintaining focus on an object in front of the endoscope. The endoscope may include a distance sensor, which is used to determine a distance between the endoscope and a sample. A processor may compare the measured distance to the current optical power of the one or more sealed fluid filled lenses. The processor may transmit signals to one or more actuators coupled to one or more sealed fluid filed lenses to change the optical power of the one or more sealed fluid filled lenses based on the comparison.