Model for authenticating API