When harvested from the field, soybeans and products derived thereof may contain significant amounts of trypsin inhibitors. In order to reduce these substances in livestock feeding different processes (e. g. heat treatment) may be used. However, exposing the soybean to an excessive over treatment could result in glycosylation of amino acids (especially lysine) which impairs feed protein utilization. The goal of the present project was to optimize the treatment of soybeans in decentral processing plants by implementing a near infrared calibration system. Therefore, two different batches of soybeans where processed into partly de-oiled soy cake using four different approaches. To receive a robust near infrared calibration, each way of processing was adapted in order to produce over treatment, under treatment and optimal treatment of soybeans. The feed quality of the soy cake variants was assessed using laboratory analyses. The near infrared spectra, recorded along with the processing of soybeans into partly de-oiled soy cake, were combined with the laboratory analyses to be able to establish a near infrared spectroscopy (NIRS) calibration for the trypsin inhibitor activity (TIA) in soy cake. Therefore, for a sample size of 50 samples, 200 spectra were recorded and analyzed. After pre-treatment of the spectra and partial least square (PLS) regression analysis the calibration was automatically tested with a leave-one-out validation. The result showed that the method of NIRS combined with pre-treatment and PLS offered a good accuracy (R2 = 74.48 %) and allowed fast detection of TIA in processed soy cake.