  Observations indicate that the peak of gamma-ray burst spectrum forms in the
opaque region of an ultra-relativistic jet. Recent radiative transfer
calculations support this picture and show that the spectral peak is inherited
from initially thermal radiation, which is changed by heating into a broad
photon distribution with a high-energy tail. We discuss the processes that
regulate the observed position of the spectral peak E_pk. The opaque jet has
three radial zones: (1) Planck zone r<R_P where a blackbody spectrum is
enforced; this zone ends where Thomson optical depth decreases to tau~10^5. (2)
Wien zone R_P<r<R_W with Kompaneets parameter y>>1 where radiation has a
Bose-Einstein spectrum, and (3) Comptonization zone r>R_W where the radiation
spectrum develops the high-energy tail. Besides the initial jet temperature, an
important factor regulating E_pk is internal dissipation (of bulk motions and
magnetic energy) at large distances from the central engine. Dissipation in the
Planck zone reduces E_pk, and dissipation in the Wien zone increases E_pk. In
jets with sub-dominant magnetic fields, the predicted E_pk varies around 1 MeV
up to a maximum value of about 10 MeV. If the jet carries an energetically
important magnetic field, E_pk can be additionally increased by dissipation of
magnetic energy. This increase is hinted by observations, which show E_pk up to
about 20 MeV. We also consider magnetically dominated jets; then a simple model
of magnetic dissipation gives E_pk~30 Gamma_W keV where Gamma_W is the jet
Lorentz factor at the Wien radius R_W.
