Spectral response model for heterojunction phototransistors (HPTs) is developed from resolution of continuity equations that govern the excess optically generated minoritycarrier variation in the active layers of the HPT taking into account the related physical parameters. Realistic boundary conditions have been considered for efficient device operation, and a detailed optical-power absorption profile is constructed for accurate device modeling. The analysis is performed for GaAs-based HPTs, and the measured results at 635, 780, and 850 nm show a good agreement with theoretical calculations.