Entendi, a solução era usar $ request_filename; em vez de $ document_root $ fastcgi_script_name;
location /api/ {
alias /var/www/api/;
try_files $uri $uri/ /api/index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass backend;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}