API for artificial neural networks