Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Mountain View desk4 min

Getting Gemini API 429 Errors in Spring Boot: Diagnose Limits and Retry Safely

A Gemini API 429 can mean different quota or account problems. Find the project-level limit, distinguish retryable errors from 402 and 403 failures, and apply bounded backoff in Spring Boot.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Gemini API 429 RESOURCE_EXHAUSTED response means a limit or account condition was reached; it does not, by itself, tell you which one or whether the request was free. Check the quota for the project and model you actually use, classify the returned error, and retry only transient failures with bounded exponential backoff and jitter.

Why Gemini returns 429

Gemini limits can apply to requests per minute (RPM), input tokens per minute (TPM), and requests per day (RPD). A short burst can exceed RPM while a lower number of very large prompts can exceed input TPM. Sustained daily use can reach RPD. Which values apply depends on the model and project tier, so there is no single request-per-minute figure that applies to every Gemini API user. Google directs developers to AI Studio to view their active limits. Google’s rate-limits documentation also says RPD quotas reset at midnight Pacific time; experimental and preview models may have tighter limits.

Some tiers or billing histories may also be subject to spend-based rate limits evaluated over a rolling ten-minute window. Treat that dimension as account-specific and check the current AI Studio limit shown for your project rather than assuming it applies to all accounts.

Find the limit or account condition behind the response

  1. Verify the project. Confirm that the API key belongs to the intended Google Cloud or AI Studio project. Quota is project-scoped: multiple keys in the same project share its usage, so rotating keys within that project does not create a fresh quota pool.
  2. Inspect the active limits and usage. In AI Studio, check the project’s limits and usage for the model your application calls. Compare RPM, input TPM, RPD, and any spend-based dimension shown for that account.
  3. Read the HTTP status and error body. Do not treat every resource-exhaustion response as the same problem. Google’s error guidance distinguishes rate-limit exhaustion from daily quota exhaustion, depleted Prepay balance, and permission errors. Preserve enough response detail in your application logs to tell these cases apart.
  4. Choose the matching remedy. Reduce request frequency for RPM, reduce input token load for TPM, or wait for the applicable daily reset or request a limit increase when the error indicates daily quota exhaustion. A depleted Prepay balance is a 402: add funds before trying again. A 403 points to permissions or configuration, which must be corrected rather than retried.

For the rate-limit error, Google’s stated remedy is: “Wait and retry with exponential backoff.” That advice is not a remedy for insufficient Prepay funds or missing access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
  • Dual band router upgrades to 1200 Mbps high speed internet (300mbps for 2.4GHz plus 900Mbps for 5GHz), reducing buffering and ideal for 4K stream
  • Full Gigabit Ports - Gigabit Router with 4 Gigabit LAN ports, ideal for any internet plan and allow you to directly connect your wired devices
  • Boosted Coverage - Four external antennas equipped with Beamforming technology extend and concentrate the Wi-Fi signals
  • MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home

Retry only transient failures

Google recommends exponential backoff for retryable 429 and 503 responses. Its troubleshooting guidance also identifies 408 and 5xx responses as transient examples, and recommends a maximum retry count. Do not retry every exception: 400, 402, and 403 errors indicate invalid input, depleted Prepay credit, or permissions/configuration issues, respectively. See Google’s troubleshooting guidance.

Add randomness to the backoff so concurrent clients do not all retry together. Google’s guidance puts it plainly: “Add random ‘jitter’ to the delay to help prevent all clients from retrying at the exact same time.” Bound both the number of attempts and the maximum delay, and ensure the total retry period fits within the caller’s deadline. Retry only an operation that is safe for your application to repeat; Google’s guidance does not establish that surrounding application side effects are idempotent.

Rank #2
Sale
TP-Link ER605, Wired Gigabit VPN Router
  • 【Five Gigabit Ports】1 Gigabit WAN Port plus 2 Gigabit WAN/LAN Ports plus 2 Gigabit LAN Port. Up to 3 WAN ports optimize bandwidth usage through one device.
  • 【One USB WAN Port】Mobile broadband via 4G/3G modem is supported for WAN backup by connecting to the USB port. For complete list of compatible 4G/3G modems, please visit TP-Link website.
  • 【Abundant Security Features】Advanced firewall policies, DoS defense, IP/MAC/URL filtering, speed test and more security functions protect your network and data.
  • 【Highly Secure VPN】Supports up to 20× LAN-to-LAN IPsec, 16× OpenVPN, 16× L2TP, and 16× PPTP VPN connections.
  • Security - SPI Firewall, VPN Pass through, FTP/H.323/PPTP/SIP/IPsec ALG, DoS Defence, Ping of Death and Local Management. Standards and Protocols IEEE 802.3, 802.3u, 802.3ab, IEEE 802.3x, IEEE 802.1q

Keep retries at the API-call boundary

In Spring, let the HTTP layer retain the response status and enough error-body information to map failures into application-level categories, then let the retry policy act on those categories. This is safer than wrapping a broad service method in a policy that retries any exception. Keep unrelated side effects outside the retry boundary, or make them idempotent, so a repeated API call does not duplicate application work.

Choose a Spring retry approach that matches your client and version

Approach When it fits What to check
RestClient Synchronous, fluent HTTP calls; configure status handling and put a bounded policy around the narrow Gemini invocation. Use status handlers to preserve and classify 4xx/5xx responses. See the Spring Framework 6.2 REST client reference and Framework 7.0 REST client reference.
WebClient Reactive, non-blocking HTTP calls; apply retry behavior in the reactive flow. Keep the flow non-blocking and filter retries by status or parsed error category. See the Spring Framework 6.2 WebClient reference.
Framework @Retryable Proxy-invoked methods where a declarative policy is convenient. Core resilience annotations are documented in Framework 7.0, not the cited 6.2 REST-client reference. Configure exception inclusion/exclusion, retry count, delay, multiplier, maximum delay, and jitter; confirm the application’s resolved Framework version and proxy behavior. See Spring Framework 7.0 resilience.
Explicit programmatic policy Cases where retryability depends on the Gemini error body, or where each request needs its own deadline. Make classification, attempt limits, delay caps, jitter, and deadline handling explicit. Apply Google’s status-specific retry guidance.

Framework 7.0 retry defaults are not a Gemini quota policy

Spring Framework 7.0 documents @Retryable defaults of at most three retry attempts after the initial invocation, with a one-second delay between attempts. If all attempts occur, that is up to four total invocations. The same documentation illustrates a configuration with four retries, an exponential multiplier of 2, a maximum delay of 1,000 ms, and 10 ms of jitter; those are example settings, not a recommended Gemini quota schedule.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
  • Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
  • Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
  • Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
  • Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks

Spring Framework 6.2 documents HTTP client status handling, while the cited core resilience feature is documented for Framework 7.0. Spring Boot’s dependency management determines which Framework version your application resolves, so check the actual dependencies before using @Retryable. Framework 7.0 also marks RestTemplate deprecated in favor of RestClient. The relevant references are the 6.2 REST client documentation and 7.0 resilience documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Does a 429 mean the request was free?

No such conclusion is established by the cited billing guidance. Google’s Gemini billing documentation says failed HTTP 400 or 500 requests are not charged for tokens, but still count against quota. It does not make the same explicit statement for 429. A 429 identifies a limit condition; it does not, on its own, establish whether a billable request occurred or what your eventual charge will be. Check AI Studio’s Usage and the billing view for the relevant project and account.

Quick Recap

Bestseller No. 1
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6)
MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
$44.99
SaleBestseller No. 2
SaleBestseller No. 3
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54)
Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
$29.99
SaleBestseller No. 4
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
VPN SERVER: Archer AX21 Supports both Open VPN Server and PPTP VPN Server
$59.98
Best Value
TP-Link Dual-Band AX3000 Wi-Fi 6 Wireless Gigabit Internet Router for Home
  • Next-Gen Gigabit Wi-Fi 6 Speeds: 2402 Mbps on 5 GHz and 574 Mbps on 2.4 GHz bands ensure smoother streaming and faster downloads; support VPN server and VPN client¹
  • A More Responsive Experience: Enjoy smooth gaming, video streaming, and live feeds simultaneously. OFDMA makes your Wi-Fi stronger by allowing multiple clients to share one band at the same time, cutting latency and jitter.²
  • Expanded Wi-Fi Coverage: 4 high-gain external antennas and Beamforming technology combine to extend strong, reliable, Wi-Fi throughout your home.
  • Improved Battery Life: Target Wake Time helps your devices to communicate efficiently while consuming less power.
  • Improved Cooling Design: No heat ups, no throttles. A larger heat sink and redefined case design cools the WiFi 6 system and enables your network to stay at top speeds in more versatile environments.
Rank #4
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5)
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.