So I lost one of the two factory ignition keys to my 2007 Corolla recently. After failed attempts to find it, we went to the dealer for a replacement. $109 for a friggin' key! I couldn't believe it. They even itemized it: $59 for the key, $39 for labor [they 'graciously' removed the $5 'shop materials' charge when we questioned it].
Went home and looked around the internet for alternatives in case we ever need another one. The cheapest price I found for the key was $35. And apparently there's NO aftermarket service to program the key, so you have to visit the dealer regardless - where it will probably be 20 questions about the source of your blank key. The only alternative for programming service I found were several Chinese gray-market sites, which are selling a hardware programmer that you plug into the ODBI port. Notably, these sites do not opening disclose the selling price (call us for details), and they all had they same broken-english description of the product, which included a warning that if you make an error in the programming procedure, then "you must face the consequences".
So the lesson here is to be mindful not to lose your $109 key. Oh, and if you also happen to own a Lexus with one of those keys with the built-in fob, good luck with that.