Exchange and crystal field interactions in SM2Fe17N3-delta have been studied based on a first-principles model in which the three lowest J-multiplets for the Sm3+ ion were included. A value of (300 +/- 5)mu-0 for the exchange coefficient n(SmFe) was deduced from the measured Curie temperature. The K1Fe(T) data were determined for Y2Fe17N3-delta from magnetic measurements over the temperature range of 4.2-400 K, and the value of K1Fe at 4.2 K is -1.3 MJ/m3. A set of the leading crystal field coefficients A20, A40 and A60 has been determined from the best fit to the experimental temperature dependence of the anisotropy field in Sm2Fe17N3-delta. We find that A20 = -(160 +/- 5) K a0(-2), A40 = +(8.0 +/- 1.0) K a0(-4) and A60 = -(3.0 +/- 1.0) K a0(-6).