The energy source powering the X-ray emission from anomalous X-ray pulsars
(AXPs) and soft gamma -ray repeaters (SGRs) is still uncertain. In one scen
ario, the presence of an ultramagnetized neutron star, or "magnetar," with
B similar or equal to 10(14)-10(15) G is invoked. To investigate this hypot
hesis, we have analyzed archival ASCA data for several known AXPs and SGRs
and fitted them with a model in which all or part of the X-ray flux origina
tes as thermal emission from a magnetar. Our magnetar spectral model includ
es the effects of the anisotropy of the heat flow through an ultramagnetize
d neutron star envelope, reprocessing by a light-element atmosphere, and ge
neral relativistic corrections to the observed spectrum. We obtain good fit
s to the data with radii for the emitting areas that are generally consiste
nt with those expected for neutron stars, in contrast to blackbody (BB) fit
s, which imply much smaller radii. Furthermore, the inclusion of atmospheri
c effects results in inferred temperatures lower than those implied by BB f
its, but still too high to be accounted for by thermal cooling alone. An ex
tra source of heating (possibly resulting from magnetic field decay) is nee
ded. Despite the harder tail in the spectrum produced by reprocessing of th
e outgoing flux through the atmosphere, spectral fits still require a consi
derable fraction of the flux to be in a power-law component, probably produ
ced in the magnetosphere of the star.