Create api.md

Put API doc in separate file.