Xanax, medically known as the drug alprazolam , is a scheduled drug belonging to the class of benzodiazepines . It's primarily given to treat anxiety , including panic disorder and generalized worry . Additionally , it can be sometimes given for the short-term relief of intense insomnia or other related conditions . Due to its potential for misuse