Add an API.

Not the most beautiful one, but it sort of works