it depends on if you want CA for your spare. The absolute cheapest is to get a key with no CA features. (on my '12) I contacted BMW of Fairfax
https://bmwoffairfaxparts.com/ non-CA keys costs like $250. You can program it yourself.
They will require you to scan info that proves you own the car and they'll mail you the key upon payment.
Non-CA keys can be used for remote lock/unlock and driving the car. That's it.
I would also email them for a quote on a CA key. CA keys are more expensive, they'll mail it to your local dealership, and will require programming. Expect a $400+ bill when all said and done.