Recommended Free Tools
Gemini API limits belong to a Google Cloud project, not to individual API keys. On an ESP32, protect the credential, validate the API server’s TLS certificate, and check the selected model’s live limits in AI Studio before deciding how often the device can send requests.
Choose where the Gemini API key lives
The right setup depends on whether the ESP32 is a private prototype or firmware that will reach other people. A key placed on a device should be treated as extractable if someone can access the hardware or its flash.
As an Amazon Associate I earn from qualifying purchases.
| Pattern | Secret exposure | Operational trade-off | Device-level control |
|---|---|---|---|
| Key provisioned directly to an ESP32 | The reusable Google credential is present on the device; extracting or reusing it is a risk, especially with distributed firmware. | Simpler to build, but each device needs secure provisioning and key replacement or revocation. | Controls must be implemented in the device and Google project; a shared key does not create separate per-device quotas. |
| ESP32 calls your backend, which calls Gemini | The Google credential stays on the backend rather than in distributed firmware. | Adds server operations and makes the device dependent on that service and its network connection. | The backend can authenticate devices and apply per-device controls before making upstream requests. |
The backend pattern is an engineering recommendation based on the risks of distributing a reusable credential; Google’s key guidance does not prescribe a particular ESP32 proxy design. For a privately used prototype, direct provisioning may be a reasonable trade-off if you accept the exposure and can replace the key. Do not embed a reusable secret in public source control or firmware distributed to other people.
Use and migrate keys safely
Google distinguishes standard API keys, which associate requests with a Google Cloud project for billing and quota purposes, from authorization keys bound to a Google Cloud service account. Google says authorization keys provide a service-account identity and default to restriction to the Generative Language API. Its key documentation says new AI Studio keys have been authorization keys since May 28, 2026, unrestricted standard keys are rejected, and dormant unrestricted keys have been blocked since May 7, 2026. These rules can change; check the live Gemini API key documentation and AI Studio before migrating.
#1 Best Overall
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Support LWIP protocol, Freertos
- SupportThree Modes: AP, STA, and AP+STA
- Ultra-Low power consumption, Compatible with Arduino IDE
- ESP32 is a safe, reliable, and scalable to a variety of applications
- Review the current credential. In AI Studio, inspect the key and project. If you are keeping an existing standard key, follow Google’s current instructions to restrict it to the Gemini API or apply other restrictions in Cloud Console as appropriate.
- Create or select a suitable restricted credential. Use the key type and restrictions supported for your project and application.
- Update the device or backend configuration. Keep the credential out of source control, screenshots, serial logs, and public firmware. For a product, configure it on the backend, not in code shipped to users.
- Test a request, then revoke the old key. Confirm that the new credential works before deleting or revoking the previous one. Do not leave an old exposed key active as a fallback.
Understand the limits and where to check them
Google applies rate limits per project, not per API key. Creating another key in the same project therefore does not provide another quota bucket. The documented dimensions include requests per minute (RPM), input tokens per minute (TPM), and requests per day (RPD). Limits vary by model and usage tier, are not guaranteed, and daily request quota resets at midnight Pacific time.
Open the project’s Rate Limits view in AI Studio and select the exact model your application will call. Use those live values to set device request frequency and capacity expectations; a sample limit from another project or model is not a reliable substitute.
Rank #2
- Dual-Core Performance Up to 240 MHz: Run sensor processing, wireless communication, automation logic and connected-device tasks on a 32-bit dual-core ESP32 platform designed for responsive embedded and IoT projects
- Built-in Wi-Fi and Bluetooth 4.2: Connect to 2.4 GHz Wi-Fi networks or use Bluetooth Classic and BLE for wireless sensors, smart devices, remote controls, home automation and other connected projects
- Flexible Power-Saving Modes: ESP32 power-management features support dynamic clock scaling and low-power operating modes, helping developers reduce energy use in compatible sensing, monitoring and connected-device applications, suitable for battery-powered Internet of Things (IoT) devices.
- USB-C Programming with CP2102: Connect through USB-C for power, sketch uploads and serial monitoring, while GPIO, UART, SPI and I2C interfaces support sensors, displays, motor drivers and other modules (USB-C cable not included)
- Over-the-Air Update Support: Configure OTA functionality through a compatible ESP-32 software framework to update deployed firmware over Wi-Fi without reconnecting the board by USB for every revision
Some tiers may also have spend-based rate limits over a rolling ten-minute window. The current Google rate limits page lists Free as N/A and examples of $10 for Tier 1, $50 for Tier 2, and $200 for Tier 3. The page associates Tier 2 with $100 in cumulative Cloud spend and three days from the first successful payment, and Tier 3 with $1,000 and 30 days. These are current-page policy figures, not durable guarantees; applicability depends on billing history and usage tier, so check the project’s live limits.
Handle 429 RESOURCE_EXHAUSTED without a retry loop
A 429 response can mean a rate or spend limit has been reached. Google’s guidance includes waiting and retrying after a short period, reducing expensive request rates (for example, by sending less context or requesting shorter output), and requesting an increase when normal usage consistently reaches a limit.
Rank #3
- Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
- Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
- Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
- Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
- Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.
On an ESP32, make retries bounded: use an increasing delay between attempts, cap the number of retries, and enforce a conservative request schedule. The precise retry algorithm is an implementation choice, not a Google-prescribed ESP32 policy.
- Do not retry continuously or immediately after every 429; that can worsen the traffic burst.
- Reduce how often the device sends requests and review prompt size and requested output length.
- Expose a useful error state to the application or user when the retry budget is exhausted.
- If ordinary, expected traffic still hits a limit, review the project’s model and tier limits and request an increase where available.
Keep HTTPS server verification enabled
Using HTTPS alone is not enough if the ESP32 does not verify the server it is connecting to. Espressif explains that trusted CA certificates validate the remote endpoint; omitting certificate configuration skips server validation. Its ESP-TLS documentation describes skipped verification as an insecure testing option. See Espressif’s ESP32 security considerations and ESP-TLS documentation.
Rank #4
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
- SupportThree Modes: AP, STA, and AP+STA
- Ultra-Low power consumption, Compatible with Arduino IDE
- 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters
Configure CA certificate validation or an appropriate certificate bundle in the HTTP/TLS client for the API host. Do not resolve production certificate errors by disabling verification. The exact setup differs between Arduino and ESP-IDF versions and between chip targets, so follow the documentation for the framework and board you actually use.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsCan you store the key in ESP32 Preferences?
Yes, Preferences provides persistent key-value access through namespaces on the ESP32’s NVS partition, but persistence is not the same as encryption. The Arduino Preferences documentation describes the API; it does not establish that calling Preferences.putString() encrypts a value.
Best Value
- 2.4GHz Dual Mode WiFi + Bluetooth Development Board
- Ultra-Low power consumption, works perfectly with the Arduino IDE
- Support LWIP protocol, Freertos
- SupportThree Modes: AP, STA, and AP+STA
- ESP32 is a safe, reliable, and scalable to a variety of applications
ESP-IDF documents NVS encryption separately. Configuration can require flash encryption or supported HMAC-based key protection, depending on the chip target and security setup. See NVS Encryption for ESP32. Production provisioning, key protection, recovery, and physical access all affect whether a stored device secret can be protected. Even with encryption configured, treat a credential on a device as having a physical-access risk rather than as an unconditionally safe secret.
Quick Recap
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.




