  We develop a new physical model for the broadband spectral energy
distribution (SED) of X-ray illuminated accretion discs, that takes into
account the mutual interaction of the accretion disc and the X-ray corona,
including all relativistic effects. We assume a Keplerian, optically thick and
geometrically thin accretion disc and an X-ray source in the lamp-post geometry
that emits an isotropic power-law spectrum with a high-energy cut-off. We
assume that all the energy that would be released by thermal radiation in the
standard disc model in its innermost part, is transported to the corona,
effectively cooling the disc in this region. We include the disc heating due to
thermalisation of the absorbed part of the disc illumination by X-ray corona.
The X-ray reflection from the disc is also included. We compute the X-ray
luminosity and the low-energy X-ray cut-off through an iterative process,
taking full account of the interplay between the X-ray illumination of the disc
and the resulting accretion disc spectrum which enters the corona so that the
energy balance is preserved. The corona radius is also computed from the
conservation of the photon's number during Comptonization.
  We discuss the model SEDs and their dependence on system parameters. The
disc-corona interaction has profound effects - it constrains the X-ray
luminosity and changes the shape and normalisation of the UV/optical blue bump.
We use the new code to fit the broad-band SED of a typical Seyfert 1 galaxy,
NGC 5548. We infer a high black-hole spin, an intermediate system inclination,
and an accretion rate below 10% of Eddington. The X-ray luminosity in this
source could be supported by 45-70% of the accretion energy dissipated in the
disc. The new model, named KYNSED, is publicly available to be used for fitting
AGN SEDs inside the XSPEC spectral analysis tool.
