Write first revision of the API docs
Move api.md to API.md