Terraria item ID 3091. Terraria 1.4.5.7.
The Key of Night is a craftable item that spawns a Corrupt Mimic or a Crimson Mimic when placed in any slot of any empty Chest, depending on whether the world generated with The Corruption or The Crimson, respectively. The world must be in Hardmode and the only item inside the Chest must be a single Key of Night. The Corrupt/Crimson Mimic is spawned as soon as the Chest is closed, consuming both the Key of Night and the Chest.
Crafted at Work Bench. Ingredients:
Description from the Terraria Wiki.