Add api

[What it looks like](https://gist.github.com/zeeman/27ae04fe9b95c3d74c8f)