This is semi intentional. The API link builder produces URLs which expect friendly URLs enabled. The API does work regardless (with index.php) so it's all a little confusing. Using index.php?api
here would be inconsistent with other API URLs generated in the software.