We have elaborated, fabricated, and tested a terahertz source based on the Josephson flux-flow oscillator (FFO) integrated with a transmitting lens antenna. The oscillator was coupled to the on-chip double-slot antenna via microstrip lines, and the chip was mounted on the silicon lens providing the continuous terahertz emission output. The oscillator samples were made of superconductor–insulator–superconductor (SIS) trilayers based on Nb/AlN/NbN, with a gap voltage of about 3.6 mV. The output emission was studied using two independent techniques: a THz spectrometer based on the SIS receiver with a high spectral resolution (better than 0.1 MHz) and an Si bolometer. An operating range of the oscillator of 400–580 GHz and a ratio of detected signal to background signal at the receiver output of up to 55 dB are obtained. In addition, a design for the oscillator with an integrated harmonic mixer for FFO locking is developed and fabricated using Nb/AlO x /Nb trilayers, which is better for FFO operation than Nb/AlN/NbN trilayers at some frequencies due to lower surface losses and hence better spectral properties. The pumping of the mixer by the FFO output power was measured and found to be sufficient for phase locking.