Hopefully you purchased it from a larger dealership, and one that is associated with a Toyota dealer. From my experience and research(it has been a few years). You cannot program a new master key/transponder key without another one to enable the ecu to go into programming mode. Like I said, I might be wrong.
Luckily when I purchased my 2000, the dealership was also part of a company that owned the Toyota dealership a block away. You will have to do some research, but there is a TSB for a once in the life of a vehicle replacement of the ECU from Toyota if your 100 series is a 98-02 model I think...... It was a security measure/design flaw on the first generation of the 100 series.
Not sure what year yours is. But I bought my 2000 knowing that it had one key, happened to be the valet key also. Did some research on here about trying to have another key made, long story short I was able to talk them into eating the cost of a factory transponder key, and installing the $1600.00+ factory ecu for free. As part of the TSB they will install the ecu for free, and should program you a master key also as I'm sure they actually bill Toyota for the parts and labor anyway. If I remember correctly on the early 100 series the ecu only is allowed to program 4 different transponder keys ever. If you have a later model, I probably just wasted the last 10 minutes typing this out, but I don't know anything about them or the key situation.
The keys the dealer did get work, but weren't the exact correct one I'm pretty sure as I've never been able to get them programmed to utilize the lock/unlock/panic button.
If you did purchase one of the early models that is affected by the fascist security measures and are able to find the TSB I was talking about I'm almost 100% positive even if you bought used private party for example they will remedy the situation for you.