There were 13 breaks, including seven in favor of Keys. Eighth seeded, it now has a record of 1-3 against Stephens.
Her next rival will be American Danielle Collins or Puerto Rican Monica Puig, who face each other on Friday night.
Denmark’s Caroline Wozniacki, fifth seeded, defeated Greece’s Maria Sakkari 6-2, 6-2.
In the semifinals, she will compete with Croatia’s Petra Martic, the winner of Switzerland’s Belinda Bencic, 6-3, 6-4.