Spectroscopy information is widely used to identify different matter and has a lot of applications, such as sensors[1,2], multispectral detection[3–6], and remote sensing[7,8]. For conventional multispectral detection systems[9,10], their wavelength division device and detector are separated and require mechanical or electrical scanning to obtain different spectral information. Most of the commercialized detectors have no ability to obtain spectral information by themselves. Wavelength division devices, such as a grating, prism, and Michelson interferometer, enable the detection system to identify the light wavelength precisely. However, the spectrum acquisition systems based on them are complex with large footprint and lead to heavy load and looseness[11,12]. They are unsuitable for on-site or portable application areas. To minimize the volume of spectrum acquisition systems, a multi-color detector has been developed by integrating different waveband detection structures vertically to get two or more broadband spectral signals simultaneously[13,14]. However, the multi-color detector is a longitudinal laminated structure with a certain degree of optical and electronic crosstalk. The spectral resolution is too low due to its broadband response. In addition, some filter-free detectors with a tunable narrowband response spectrum have been developed, such as organic photodetectors[15–17]. These filter-free strategies have a small footprint, but it is not easy to increase the number of spectral channels to tens or even hundreds. Therefore, a miniature wavelength division device integratable with detectors is the key to reducing the footprint of multispectral and hyperspectral detection systems. To this end, ultra-compact wavelength division devices based on nanophotonic principles, such as metasurface, photonic crystal, and plasmonic structure, have been widely investigated[18–25]. For example, researchers bond the photonic crystal slab on the charge-coupled device (CCD) or complementary metal oxide semiconductor (CMOS) detector to form a chip-level spectrometer [26–31] in the visible. It remarkably reduces the footprint of the spectrum acquisition system. However, the minimum size of metasurface structure is less than 1 µm. It needs highly precise and high-cost fabrication processes like e-beam lithography, which increases the fabrication difficulty and cost enormously. Additionally, no pixel-level wavelength division devices monolithically integrated with a detector in the short-wave infrared (SWIR) have been reported, to the best of our knowledge. Only a dual-waveband SWIR InGaAs focal plane array (FPA) with broad bands of 46 nm and 54 nm has been developed by integrating two filters .