Generic wrapper for APIs