File Search Store API returns 503 for all file sizes (files.upload works fine)

Summary

I’m encountering persistent 503 Service Unavailable errors when uploading files to File Search Stores via both the SDK and REST API. The files.upload() (Files API) works perfectly — only the File Search Store operations fail.

This affects all file sizes tested (100KB to 7MB), well within the documented 100MB per-file limit.

Environment

  • SDK: @google/genai (Node.js)
  • API methods tested: fileSearchStores.importFile(), uploadToFileSearchStore(), and direct REST API calls
  • File types tested: .xlsx (7MB), .csv (100KB - 1MB)
  • Date: February 5-6, 2026
  • Region: US

Steps to Reproduce

Method 1: Two-step (files.upload + importFile)

import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });

// Step 1: Upload file — WORKS
const uploadedFile = await ai.files.upload({
  file: blob,
  config: { mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', displayName: 'test.xlsx' },
});
console.log('Upload success:', uploadedFile.name);

// Step 2: Import into File Search Store — FAILS with 503
const store = await ai.fileSearchStores.create({ displayName: 'test-store' });
const operation = await ai.fileSearchStores.importFile({
  fileSearchStoreName: store.name,
  fileName: uploadedFile.name,
}); // 503 Service Unavailable

Method 2: Single-step uploadToFileSearchStore

const result = await ai.fileSearchStores.uploadToFileSearchStore({
  fileSearchStoreName: store.name,
  file: blob,
  config: { mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' },
}); // 503 Service Unavailable

Method 3: Direct REST API

curl -X POST \
  "https://generativelanguage.googleapis.com/v1beta/fileSearchStores/STORE_NAME:importFile?key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "files/FILE_ID"}'
# 503 Service Unavailable

What Works vs. What Doesn’t

Operation Status
files.upload() Works (1.8s for 7MB)
fileSearchStores.create() Works
fileSearchStores.importFile() 503
uploadToFileSearchStore() 503
REST API importFile 503

What I’ve Tried

  • Different file sizes: 100KB, 500KB, 1MB, 3MB, 5MB, 7MB — all 503
  • Different file types: .xlsx, .csv — all 503
  • Fresh File Search Stores (newly created) — still 503
  • Different API keys — still 503
  • SDK vs REST API — both 503
  • Local machine vs cloud server (Railway) — both 503
  • Retry logic with exponential backoff (3 retries, 2s/4s/8s delays) — all retries fail

Expected Behavior

Per the File Search documentation, files up to 100MB should be uploadable to File Search Stores. A 7MB .xlsx file should upload successfully.

Actual Behavior

All File Search Store upload/import operations return 503 Service Unavailable after ~80 seconds, regardless of file size. The Files API (files.upload) works normally, suggesting the issue is specifically in the File Search Store indexing/import backend.

Impact

This is a complete blocker for any application relying on File Search for document retrieval. We’re unable to upload any files to File Search Stores, making the feature unusable.

Is anyone else experiencing this issue? Is there a known outage or degradation affecting File Search Stores?

6 Likes

Experiencing a similar issue, consistent long wait leading to 503 response on file import, retries with backoff don’t help. Using typescript with @google/genai.

@Logan_Kilpatrick bumping this up for you. i think it defeats the purposes of using file search in the first place. thx!

I believe the cause of the error is hitting the TPM limits of the Gemini Embedding Model during tokenization via the file_search API. Since Tier 1 of the paid plan is capped at 100M tokens per minute, even data as small as a few dozen kilobytes seems to be triggering the overflow.