This just happened to me. I got a new phone and needed a key card to drive the car. After realizing I had lost both key cards, I scheduled a service appointment to have a new key programmed.
This does not cost a lot!. The invoice was $23.60.
Tesla: "Hello, this is James from Tesla Service preparing your request for service. The cost to reprogram a key card is $23.60. I've generated and sent a quote over to the email we have on file as well for review. Please let me know if you would like to proceed. Reply STOP to unsubscribe."
Me: "I don't have either key by the way. It's still $23.60?"
Tesla: "yeah, that included the labor to program the key card. Reply STOP to unsubscribe."