I lost the key to my 2011 Camry. I called a locksmith recommended by my insurance company. My car didn't have a pushbutton fob, doors had to be opened manually. I had the locksmith make me a key with a pushbutton fob.
He hooked up a laptop computer to some connector under the dash, ran some software, and made a key that allowed me to open the doors with the push of a button, and which also worked the ignition while maintaining the security function. It would have cost me $250.00 for a regular key, and it set me back $325.00 for the key with the electronic fob. I also got a valet key in the deal.
I have no idea what it would have cost at a dealer, or how they'd have made a key without having one to copy or get the embedded info from. Probably from the serial number. You can drive your car to the dealership, I couldn't, so a locksmith that showed up at my place was perfect.
Before spending $$$, if that's your plan, check with both a dealer and a competent locksmith.