Gemini File Search: importFile (file-ID path) fails with 401 using API key

,

When using a Gemini API key (x-goog-api-key), the fileSearchStores.importFile method consistently returns:

{ "error": { "code": 401, "message": "The request does not have valid authentication credentials.", "status": "UNAUTHENTICATED" } }

Every other File Search method accepts the exact same API key in the same session - files.upload, fileSearchStores.create, uploadToFileSearchStore, and delete all return 200. Only importFile rejects the key.

Hi @GoogleGoogle team, can anyone look into this?

seem like it is only working on key with prefix AIz not for AQ

I also have the same problem. Google, any solution?

Again, can someone please check?

I have the same problem.