In a dense gas plasma a short laser pulse propagates in relativistic self-trapping mode, which enables effective conversion of laser energy to the accelerated electrons. This regime sustains effective loading which maximizes the total charge of the accelerating electrons, that provides a large amount of betatron radiation. The 3D particle-in-cell simulations demonstrate how such regime triggers X-ray generation with 0.1-1 MeV photon energies, low divergence, and high brightness. It is shown that a 135 TW laser can be used to produce 3 × 10 10 photons of > 10 keV energy and a 1.2 PW laser makes it possible generating about 10 12 photons in the same energy range. The laser-togammas energy conversion efficiency is up to 10 −4 for the high-energy photons, ∼ 100 keV, while the conversion efficiency to the entire keV-range x-rays is estimated to be a few tenths of a percent.