  Controlling the formation and stoichiometric content of desired phases of
materials has become a central interest for the study of a variety of fields,
notably high temperature superconductivity under extreme pressures. The further
possibility of accessing metastable states by initiating reactions by x-ray
triggered mechanisms over ultra-short timescales is enabled with the
development of x-ray free electron lasers (XFEL). Utilizing the exceptionally
high brilliance x-ray pulses from the EuXFEL, we report the synthesis of a
previously unobserved yttrium hydride under high pressure, along with
non-stoichiometric changes in hydrogen content as probed at a repetition rate
of 4.5\,MHz using time-resolved x-ray diffraction. Exploiting non-equilibrium
pathways we synthesize and characterize a hydride with yttrium cations in an
\textit{A}15 structure type at 125\,GPa, predicted using crystal structure
searches, with a hydrogen content between 4.0--5.75 hydrogens per cation, that
is enthalpically metastable on the convex hull. We demonstrate a tailored
approach to changing hydrogen content using changes in x-ray fluence that is
not accessible using conventional synthesis methods, and reveals a new paradigm
in metastable chemical physics.
