Hi,
I’m trying the “File Search” APIs .
Everything seems to be working fine (create, upload, delete, etc.).
However, when I try to make a simple request (you can see a simple example below) I have a weird problem:
• With an old API KEY (created in 2025, before Google AI Studio) everything works fine.
• With all API KEYs created in recent weeks (in Google AI Studio) however it doesn’t work
The problem is that a “generateContent” call remains in “pending” state, while all other CRUD operations work.
When i switch to the old ( 2025) key it works fine ![]()
Of course I have already compared the keys in the Cloud Console and they are configured in the same way. I also tried API keys with no restrictions or adding some restrictins.
No recent API KEYs can get this call to work (while they work with any other Gemini API so I’m sure it’s valid).
await ai.models.generateContent({
model: "gemini-3-pro-preview",
contents: 'Prompt here...',
config: {
tools: [
{
fileSearch: {
fileSearchStoreNames: [
'fileSearchStores/xyz',
],
}
}
],
}
})
Thank you