moved api from model to model.api