Fix api.php file