Fixed usage of ->api() method in docs