Room-temperature optoelectronic devices that operate at shortwave and midwave infrared wavelengths (1-8 μm) can be used for numerous applications 1-5 . To achieve the operating wavelength range needed for a given application, a combination of materials with different bandgaps (e.g. superlattice/heterostructure) 6,7 or the variation of semiconductor alloy composition during growth 8,9 is used; however, these approaches involve fabrication complexity and the operating range is fixed post-fabrication. Although wide-range, active, and reversible tunability of the operating wavelengths in optoelectronic devices after fabrication is a highly desirable feature, no such platform has been yet developed. Here, we demonstrate high-performance room-temperature infrared optoelectronics with actively variable spectra by presenting black phosphorus (bP) as an ideal candidate. Enabled by the * � � 𝐸𝐸 𝑔𝑔 𝑘𝑘 𝐵𝐵 𝑇𝑇 �� (2)where 𝑚𝑚 𝑒𝑒 * and 𝑚𝑚 ℎ * are the effective masses of electrons and holes, respectively, 𝑘𝑘 𝐵𝐵 is Boltzmann's constant, and 𝑇𝑇 is temperature 36,37 . Since 𝑚𝑚 𝑒𝑒 * and 𝑚𝑚 ℎ * in bP have similar values, the effective mass ratio (𝑚𝑚 𝑒𝑒 * /𝑚𝑚 ℎ * ) is much higher than that of other small bandgap semiconductors.According to equation (2), this results in suppressed Auger recombination (longer Auger lifetime), which leads to bP's theoretical QY limit being much higher than that of other small bandgap semiconductors in the high injection regime.