I just add my card to gooogle cloud then create a paid api key in Ai studio.
...1886
Gemini API
...2xlY
Oct 5, 2024
Paid
Go to billing
View usage data
But python code cannot use this key.
raise ResumableUploadError(resp, content)
googleapiclient.errors.ResumableUploadError: <HttpError 400 when requesting None returned "API key expired. Please renew the API key.". Details: "[{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'API_KEY_INVALID', 'domain': 'googleapis.com', 'metadata': {'service': 'generativelanguage.googleapis.com'}}]">