Getting consistent HTTP 403s when calling `generate_content` & 400s when calling `client.files.list()`

I am using gemini 2.0 flash and gemini 2.5 pro as a fallback when 2.0 fails to transcribe audio

All of a sudden my app started getting HTTP 403 responses saying I do not have permission to access an uploaded file or that file does not exist

I attempted to look at the files on gemini’s servers to see if they really don’t exist with

gemini_client = GeminiClient(api_key=os.environ["GEMINI_API_KEY"])


print('My files:')
for f in gemini_client.files.list():
    print(' ', f.name)

and I got the following error:

ClientError: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Failed to read files', 'status': 'INVALID_ARGUMENT'}}

I believe there may be an issue on Gemini’s end. I checked our billing account and there are no messages saying it is invalid, we had the last payment go through without any issues. I also tried using the keys for the free tier and the paid tier and got the same error when trying to view files

Any help would be appreciated

1 Like

Hi @Pedram_Namiranian,

Welcome to the Google AI Forum! :confetti_ball: :confetti_ball:

The team is aware of the 400 issue and is currently working on it. It will be resolved soon.

Thank you very much for your patience.

Hi @Pedram_Namiranian,

Just wanted to follow up if you are still facing this issue?

Thanks