Significance: Shear wave optical coherence elastography is an emerging technique for characterizing tissue biomechanics that relies on the generation of elastic waves to obtain the mechanical contrast. Various techniques, such as contact, acoustic, and pneumatic methods, have been used to induce elastic waves. However, the lack of higher-frequency components within the elastic wave restricts their use in thin samples. The methods also require moving parts and/or tubing, which therefore limits the extent to which they can be miniaturized. Aim: To overcome these limitations, we propose an all-optical approach using photothermal excitation. Depending on the absorption coefficient of the sample and the laser pulse energy, elastic waves are generated either through a thermoelastic or an ablative process. Our study aimed to experimentally determine the boundary between the thermoelastic and the ablative regimes for safe all-optical elastography applications. Approach: Tissue-mimicking graphite-doped phantoms and chicken liver samples were used to investigate the boundary between thermoelastic and ablative regimes. A pulsed laser at 532 nm was used to induce elastic waves in the samples. Laser-induced elastic waves were detected using a line field low coherence holography instrument. The shape of the elastic wave amplitude was analyzed and used to determine the transition point between thermoelastic and ablative regimes. Results: The transition from the thermoelastic to the ablative regime is accompanied by the nonlinear increase in surface wave amplitude as well as the transformation of the wave shape. Correlation between the absorption coefficient and the transition point energy was experimentally determined using graphite-doped phantoms and applied to biological samples ex vivo. Conclusions: Our study described a methodology for determining the boundary region between thermoelastic and ablative regimes of elastic wave generation. These can be used for the development of a safe method for completely noncontact, all-optical microscale assessment of tissue biomechanics using laser-induced elastic waves.