New AQ. API Keys Failing to upload to file search store

Using google.golang.org/genai v1.49.0 client with a new AQ. prefixed api key the call to upload a file to file search store consistently fails.

client, err := genai.NewClient(ctx, &genai.ClientConfig{

    APIKey:  os.Getenv("GEMINI_API_KEY"),

    Backend: genai.BackendGeminiAPI,

  })

store, err := client.FileSearchStores.Create(ctx,
  &genai.CreateFileSearchStoreConfig{DisplayName: "My File Search Store"})

  op, err := client.FileSearchStores.UploadToFileSearchStoreFromPath(ctx, "~/path/to/file.pdf", store.Name, nil)

With this error: response body is invalid for chunk at offset 0: Error 500, Message: Internal error encountered., Status: INTERNAL, Details: []

I’ve switched to a free tier api key on a different project and the same upload code works as expected.

You need to create or just ask Gemini at the url gemini.google.com and input that value in place of the key.
Sorry for the confusion.

Hi

We are working on address the issue with AQ. prefix keys, You can create a new key(Non AQ.prefix) via AI Studio to unblock to your workflow.