Feature/api trainer