Create api.md

Very rough sketch of API