Somewhat common on those. Try this:
Pull the intake boot off to get access to the throttle plate. Clean it as well as you can, with the ignition off.
Once it's clean, use your finger to hold the throttle blade closed while a helper turns on the ignition (DO NOT CRANK THE ENGINE!). Once the ignition is turned on, release pressure from throttle plate. You may feel some pressure from the throttle plate when the ignition is turned on, that's normal.
Leave the ignition on, and reinstall the intake boot and airbox. Turn ignition off for 10 seconds.
Start the car, and let it idle until the cooling fans come on. AC off, all loads off. That should relearn the idle air value.
I run into this all the time at work. Toyota electronic throttle's are very sensitive to changes in learned air flow. Just disconnecting the battery can throw them off.