api client class