We implement a local gradient-based scheme to fit Laser-Induced Break-down Spectroscopy (LIBS) spectra to the emission of a uniform, isothermal,stationary plasma in local thermal equilibrium. The gradients of the lossfunction are obtained by automatic differentiation. We demonstrate the self-consistency and robustness of our fitting scheme through systematic analysisof synthetic spectra and find that, for a wide range of plasma parameters,there only exists one minimum of the loss function, enabling reliable recoveryof the true parameters.