When using gapi.client.request as part of a batch request it uses the global batch endpoint.
Example:
const batch = gapi.client.newBatch();
const request = gapi.client.request({
path: `drive/v3/files?q='id in parents' and trashed = false`
});
batch.add(request);
batch.then();
URL that gets called: https://content.googleapis.com/batch?key={myKey}
Expected URL: https://content.googleapis.com/batch/drive/v3?key={myKey}