We have performed a high resolution 4-13 ${mu}m$ spectral survey of the hot molecular gas associated with the massive protostars AFGL 2591 and AFGL 2136, utilising the Echelon-Cross-Echelle-Spectrograph (EXES) on-board the Stratospheric Observatory for Infrared Astronomy (SOFIA), and the iSHELL instrument and Texas Echelon Cross Echelle Spectrograph (TEXES) on the NASA Infrared Telescope Facility (IRTF). Here we present results of this survey with analysis of CO, HCN, C$_2$H$_2$, NH$_3$ and CS, deriving the physical conditions for each species. Also from the IRTF, iSHELL data at 3 ${mu}m$ for AFGL 2591 are presented that show HCN and C$_2$H$_2$ in emission. In the EXES and TEXES data, all species are detected in absorption, and temperatures and abundances are found to be high (600 K and 10$^{-6}$, respectively). Differences of up to an order of magnitude in the abundances of transitions that trace the same ground state level are measured for HCN and C$_2$H$_2$. The mid-infrared continuum is known to originate in a disk, hence we attribute the infrared absorption to arise in the photosphere of the disk. As absorption lines require an outwardly decreasing temperature gradient, we conclude that the disk is heated in the mid-plane by viscous heating due to accretion. We attribute the near-IR emission lines to scattering by molecules in the upper layers of the disk photosphere. The absorption lines trace the disk properties at 50 AU where a high temperature gas-phase chemistry is taking place. Abundances are consistent with chemical models of the inner disk of Herbig disks.