Create api.php

API entry point