We present a model of active galactic nuclei (AGNs) based on accretion disks around 10(8) M. black holes, which incorporates a strong (B approximately 10(4) G) magnetic field in the disk, with loops above the disk in which B approximately 10(2) G. The mapetic energy in the loops dissipates, accelerating electrons to relativistic energies. The electrons emit synchrotron and inverse-Compton radiation, much of which is reflected or scattered by gas in the disk. We calculate the emitted spectrum from infrared to gamma rays. Of the total emission, 23% goes into a v-1 power law and 77% into thermal radiation at 24,000 K (due to the disk, which is heated by nonthermal radiation and energetic ions). The model accounts quantitatively for the X-ray and gamma-ray backgrounds, and it accounts qualitatively for certain features observed in individual AGNs: a far-infrared cutoff, a minimum at a few microns, the ultraviolet bump, the Compton reflection bump at approximately 30 keV, and a gamma-ray tail.