Is there a reason why we return the global `api` here instead of `self.api`?