Beta-cyclopiazonate dehydrogenase involved in the synthesis of the fungal neurotoxin alpha-cyclopiazonic acid (CPA). CpaO carries out the dehydrogenation of beta-CPA to yield an unstable enimine product, which is captured by intramolecular cyclization to create the pentacyclic fused scaffold of alpha-cyclopiazonate. A + beta-cyclopiazonate = AH2 + alpha-cyclopiazonate Belongs to the beta-cyclopiazonate dehydrogenase family.