We describe a numerical model constructed for the study of the emission of
radiation from relativistic plasma under conditions characteristic, e.g., to
gamma-ray bursts (GRB's) and active galactic nuclei (AGN's). The model solves
self consistently the kinetic equations for e^\pm and photons, describing
cyclo-synchrotron emission, direct Compton and inverse Compton scattering, pair
production and annihilation, including the evolution of high energy
electromagnetic cascades. The code allows calculations over a wide range of
particle energies, spanning more than 15 orders of magnitude in energy and time
scales. Our unique algorithm, which enables to follow the particle
distributions over a wide energy range, allows to accurately derive spectra at
high energies, >100 \TeV. We present the kinetic equations that are being
solved, detailed description of the equations describing the various physical
processes, the solution method, and several examples of numerical results.
Excellent agreement with analytical results of the synchrotron-SSC model is
found for parameter space regions in which this approximation is valid, and
several examples are presented of calculations for parameter space regions
where analytic results are not available.Comment: Minor changes; References added, discussion on observational status
added. Accepted for publication in Ap.