In this paper we address the problem of the non-LTE (NLTE) inversion of lin
e profiles by means of a nonlinear least-squares minimization procedure com
bined with very efficient multilevel transfer methods. Our approach is base
d on the concept of response functions, which measure the first-order respo
nse of the emergent profiles to changes in the atmospheric conditions. We i
ntroduce the fixed departure coefficients (FDC) approximation in order to c
ompute these response functions in a fast and straightforward manner. The a
ccuracy of this approximation is checked comparing FDC response functions w
ith those obtained from full NLTE computations. An NLTE inversion code base
d on these response functions has been developed and extensively tested. Re
ference synthetic profiles, similar to those expected from real observation
s, are given as input to the inversion algorithm and the recovered models a
re shown to be compatible with the reference models within the error bars.
Our NLTE inversion code thus provides a new tool for the investigation of t
he chromospheres of the Sun and other stars.