The taxi was parked near the intersection of Geary Boulevard and Scott Street at about 4 a.m. when a suspect approached the driver's side window, took out a handgun, and demanded the driver's cash, according to police.
The driver, a 39-year-old man, handed over cash and the suspect then fled in a black two-door Lexus, police said.
The taxi driver was uninjured in the robbery.
No arrests have been made in the case, according to police.
Anyone with information about the robbery is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.