The invention discloses a key and an endoscope. An operating part of the endoscope is fixedly provided with a metal opening. A metal opening clamping part of the metal opening is detachably provided with a key of a processing tool which comprises a key body and a key mounting hook. Each key mounting hook is clamped with the metal opening clamping part, and the key is disposed at the metal opening. When the key is detached from the metal opening, the detaching tool is inserted in an inserting hole of the key. The key mounting hook is pressed by means of the detaching tool, and a clamping claw is moved to an installation removing position, and thereby the clamping of the key and the metal opening is disconnected. Meanwhile, the clamping claw is clamped with the clamping claw tool, and the detaching tool cannot be pulled out of the processing tool. The inserting hole of the key is blocked by the detaching tool, and thereby reutilization of the key can be prohibited.