There are four broad classes of opioids:
endogenous opioid peptides, produced in the body; opium alkaloids, such as morphine (the prototypical opioid) and codeine; semi-synthetic opioids such as heroin and oxycodone; and fully synthetic opioids such as pethidine and methadone that have structures unrelated to the opium alkaloids.