You harness your transmutation magic to create a duplicate of a key or create a new key by analyzing the lock.
Duplicate Key. Choose a key to duplicate. The spell creates an exact copy of the key using the brass piece as a medium. The copy is indistinguishable from the original key and can be used to open the same lock.
Create Key. If you don't have a key to duplicate, but you have access to the lock, you can create a new key by analyzing its mechanism. Spend 1 minute examining the lock to gather enough information to create a working key. After analyzing the lock, spend an additional 1 minute to create the key.
When analyzing a lock and when creating a key, make a your spellcasting ability check. Use pins DC of the lock, to determine the DC of the check. On a fail, the spell ends, and your key is ruined.