Antihydrogen, a positron bound to an antiproton, is the simplest antiatom. Its counterpart—hydrogen—is one of the most precisely investigated and best understood systems in physics research. High-resolution comparisons of both systems provide sensitive tests of CPT symmetry, which is the most fundamental symmetry in the Standard Model of elementary particle physics. Any measured difference would point to CPT violation and thus to new physics. Here we report the development of an antihydrogen source using a cusp trap for in-flight spectroscopy. A total of 80 antihydrogen atoms are unambiguously detected 2.7 m downstream of the production region, where perturbing residual magnetic fields are small. This is a major step towards precision spectroscopy of the ground-state hyperfine splitting of antihydrogen using Rabi-like beam spectroscopy.