Basic API completed

Generator in api/generate.php
Docs in api/README.md