Using a brand new Google account to apply for Gemini API free service, but getting immediate 429 quota exceeded errors when calling image generation endpoints, even with very low request frequency.
Environment
Brand new Google account with fresh API key
Using free tier service
Very low call frequency (1-2 requests per minute)
Code Sample
import aiohttp
import json
async def call_gemini_api(api_key, prompt):
url = “https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent”
headers = {
'Content-Type': 'application/json',
'x-goog-api-key': api_key
}
request_data = {
"contents": [{
"parts": [{
"text": f"Create and generate an image: {prompt}. Return the generated image."
}]
}],
"generationConfig": {
"temperature": 0.3,
"maxOutputTokens": 8192
}
}
async with aiohttp.ClientSession() as session:
async with session.post(url, headers=headers, json=request_data, timeout=60) as response:
response_text = await response.text()
print(f"Status: {response.status}")
print(f"Response: {response_text}")
if response.status == 429:
print("❌ Quota exceeded error")
return None
Error Response
Status: 429
Response: {
“error”: {
“code”: 429,
“message”: “Quota exceeded for aiplatform.googleapis.com/generate_requests”,
“status”: “RESOURCE_EXHAUSTED”
}
}
Free quota: What should be the free quota for new accounts? Why does the first call return 429?
Quota reset: How often does the free quota reset?
Solutions: Has anyone encountered similar issues? How did you solve it?
Tried multiple new API keys and all have the same problem. Feels like account or IP-level restrictions.