  We perform two-dimensional particle-in-cell simulations of magnetic
reconnection in electron-ion plasmas subject to strong Compton cooling and
calculate the X-ray spectra produced by this process. The simulations are
performed for trans-relativistic reconnection with magnetization $1\leq
\sigma\leq 3$ (defined as the ratio of magnetic tension to plasma rest-mass
density), which is expected in the coronae of accretion disks around black
holes. We find that magnetic dissipation proceeds with inefficient energy
exchange between the heated ions and the Compton-cooled electrons. As a result,
most electrons are kept at a low temperature in Compton equilibrium with
radiation, and so thermal Comptonization cannot reach photon energies $\sim
100$ keV observed from accreting black holes. Nevertheless, magnetic
reconnection efficiently generates $\sim 100$ keV photons because of mildly
relativistic bulk motions of the plasmoid chain formed in the reconnection
layer. Comptonization by the plasmoid motions dominates the radiative output
and controls the peak of the radiation spectrum $E_{\rm pk}$. We find $E_{\rm
pk}\sim 40$ keV for $\sigma=1$ and $E_{\rm pk}\sim100$ keV for $\sigma=3$. In
addition to the X-ray peak around 100 keV, the simulations show a non-thermal
MeV tail emitted by a non-thermal electron population generated near X-points
of the reconnection layer. The results are consistent with the typical hard
state of accreting black holes. In particular, we find that the spectrum of
Cygnus~X-1 is well explained by electron-ion reconnection with $\sigma\sim 3$.
