Support different base api

Fixes #7