Updated constructor for API object.