This has only really been tested on Media Temple (gs) servers.
<FilesMatch "^.*?api.*?$"> SetHandler php5-script </FilesMatch>
In that above example, any file that includes the string “api” will be processed as PHP. Feel free to alter that RegEx.