Cephalexin is an antibiotic of the cephalosporin class that can be used to treat infections caused by susceptible gram-positive bacteria. Cephalexin is allergic to about 10% of people who are allergic to penicillin.