Monitoring the solar ultraviolet index (UVI) is of great significance to protect human health. The monitoring of UVI faces several challenges: the accuracy is difficult to control, the complexity of the filter, the increase in volume and price, the decrease in response sensitivity, and the low accuracy of measurement. Considering the limitations and insufficiencies in the current technology, this paper proposes a miniature gallium nitride (GaN)-based erythema response detector. The detector utilizes a double-diode integrated chip for accurate detection of the erythema response, enabling it to closely match the spectral response of the erythema spectrum curve determined by the World Health Organization. This ensures precise correspondence between the output current and ultraviolet index. The measurement error of each UV detector is determined by analyzing eight sets of UV radiation spectra. The experimental findings demonstrate that the proposed detector exhibits a measurement error below 0.4 for each group of UV index measurements. The experimental results show that the measurement accuracy of the detector on the ultraviolet index is at the advanced level compared to the current mainstream commercial ultraviolet detector.