We present a library of near-infrared (1.1-2.45 microns) medium-resolution (R~1500-2000) integral field spectra of 15 young M6-L0 dwarfs, composed of companions with known ages and of isolated objects. We use it to (re)derive the NIR spectral types, luminosities and physical parameters of the targets, and to test (BT-SETTL, DRIFT-PHOENIX) atmospheric models. We derive infrared spectral types L0+-1, L0+-1, M9.5+-0.5, M9.5+-0.5, M9.25+-0.25, M8+0.5-0.75, and M8.5+-0.5 for AB Pic b, Cha J110913-773444, USco CTIO 108B, GSC 08047-00232 B, DH Tau B, CT Cha b, and HR7329B, respectively. BT-SETTL and DRIFT-PHOENIX models yield close Teff and log g estimates for each sources. The models seem to evidence a 600-300+600 K drop of the effective temperature at the M-L transition. Assuming the former temperatures are correct, we derive new mass estimates which confirm that DH Tau B, USco CTIO 108B, AB Pic b, KPNO Tau 4, OTS 44, and Cha1109 lay inside or at the boundary of the planetary mass range. We combine the empirical luminosities of the M9.5-L0 sources to the Teff to derive semi-empirical radii estimates that do not match hot-start evolutionary models predictions at 1-3 Myr. We use complementary data to demonstrate that atmospheric models are able to reproduce the combined optical and infrared spectral energy distribution, together with the near-infrared spectra of these sources simultaneously. But the models still fail to represent the dominant features in the optical. This issue casts doubts on the ability of these models to predict correct effective temperatures from near-infrared spectra alone. We advocate the use of photometric and spectroscopic data covering a broad range of wavelengths to study the properties of very low mass young companions to be detected with the planet imagers (Subaru/SCExAO, LBT/LMIRCam, Gemini/GPI, VLT/SPHERE).