allapi: add example usage to SafeApiPtr