iTranslated by AI
Introduction to Getting Started with Gemini API for Free: Asking Python How to Cook Delicious Takoyaki
Introduction
Google Gemini API has a free tier available. Naturally, there are limits on the number of daily accesses, but these settings are quite generous and sufficient for trying out the API.
Since we have the opportunity, let's get an API key and try out text generation. Obtaining an API key might seem tedious at first glance, but it's easy as long as you have a Google account. I highly recommend everyone give it a try!
🥗 What you need: A Google account and a bit of passion
Text Generation Models Available for Free
Below is a list of Gemini text generation models available for free as of November 28, 2025, along with their limits.
Limits are set for each model based on the number of requests and tokens (approximately the number of characters) per unit of time. For example, Gemini 2.5 Flash has limits of 10 requests per minute, 250,000 tokens per minute, and 250 requests per day.
| Model | RPM | TPM | RPD | Model ID |
|---|---|---|---|---|
| Gemini 2.5 Pro | 2 | 125,000 | 50 | gemini-2.5-pro |
| Gemini 2.5 Flash | 10 | 250,000 | 250 | gemini-2.5-flash |
| Gemini 2.5 Flash Preview | 10 | 250,000 | 250 | gemini-2.5-flash-preview-09-2025 |
| Gemini 2.5 Flash-Lite | 15 | 250,000 | 1,000 | gemini-2.5-flash-lite |
| Gemini 2.5 Flash-Lite Preview | 15 | 250,000 | 1,000 | gemini-2.5-flash-lite-preview-09-2025 |
| Gemini 2.0 Flash | 15 | 1,000,000 | 200 | gemini-2.0-flash |
| Gemini 2.0 Flash-Lite | 30 | 1,000,000 | 200 | gemini-2.0-flash-lite |
RPM … Requests per minute
TPM … Tokens per minute
RPD … Requests per day
When choosing a model, it's important to select one based on your requirements for the balance between intelligence and response speed. For example, Gemini 2.5 Flash Preview is the latest model and is smarter, but it feels a bit slower in operation. If you want to have more brisk conversations, choosing Gemini 2.0 Flash-Lite would be better.
Obtaining a Google Gemini API Key
📌 Access Google AI Studio below and log in with your Google account.
📌 The terms of service will be displayed↓, so please read them carefully and click the agree button if you accept them.

Google Gemini API Terms of Service
📌 Click the Get API Key button at the top of the screen.

Google AI Studio Main Screen
📌 Click the Create API key button.

API Key Management Screen

Display after API key creation is complete
The list of API keys is at the bottom of the screen, where you can delete any API keys you no longer need.

API Key List
Let's Use It
Once you have obtained your API key, let's actually use it. Here, we'll provide a Python example as a sample.
📌 First, install google-genai.
pip install google-genai
📌 Next, we'll write and run a sample program.
- Replace
YOUR API KEYwith the API key you obtained. - Depending on the question, it may take some time to respond (about 1 minute). Please wait patiently.
- Using a more lightweight model (like Gemini 2.5 Flash-Lite) will reduce the response time.
from google import genai
client = genai.Client(api_key="YOUR API KEY")
response = client.models.generate_content(
model="gemini-2.5-pro",
contents="たこ焼きの美味しい焼き方を教えて。"
)
print(response.text)
📌 Output Sample (Gemini 2.5 Pro)
Yes, I'd be happy to help!
To grill takoyaki to the ideal state of "crispy on the outside, creamy on the inside," I'll introduce the tips in detail, from preparation to grilling and finishing.
### Golden Rules for Delicious Takoyaki
The three most important things in making takoyaki are **"Batter," "High Heat," and "Oil."** Just by keeping these in mind, you can get much closer to a professional shop taste.
---
### 1. Ingredients (for about 30–40 pieces)
#### 【Batter】
* **Takoyaki flour**: 200g (All-purpose flour is okay if you don't have it)
* **Eggs**: 2
* **Water (or Dashi)**: 700ml–800ml
* **Tip**: Using dashi (kombu and bonito) adds depth to the batter and makes it significantly tastier. Using slightly more water than the amount written on the flour bag will result in a creamier texture.
* **Soy sauce**: 1 tablespoon
* **Mirin**: 1 teaspoon (optional; adds a bit of sweetness)
#### 【Fillings】
* **Boiled octopus**: around 150g (cut into 1cm cubes)
* **Tenkasu (Tempura scraps)**: plenty (5 tablespoons or more)
* **Pickled red ginger**: 3–4 tablespoons (minced)
* **Green onions**: 1/2 bunch (finely chopped)
#### 【Other】
* **Vegetable oil**: as needed
* **Takoyaki sauce**
* **Mayonnaise**
* **Aonori (Dried green seaweed)**
* **Bonito flakes**
---
### 2. Necessary Tools
* Takoyaki maker (plate)
* Bowl
* Whisk
* Oil brush (a rolled-up paper towel held with chopsticks is also fine)
* Takoyaki pick (an ice pick or bamboo skewer is also okay)
* Pitcher for pouring the batter (a measuring cup or a bowl with a spout is also fine)
---
### 3. Steps for Grilling Deliciously
#### Step 1: Preparation
1. **Make the batter**: Crack the eggs into a bowl and whisk well, then add water (or dashi), soy sauce, and mirin and mix. Add the takoyaki flour in several batches and whisk thoroughly until there are no lumps.
* **【Super Important Tip】** Let the batter **rest in the refrigerator for 30 minutes to 1 hour**. This allows the flour to integrate well with the moisture, resulting in a smoother and tastier batter.
2. **Prepare the fillings**: Cut the octopus and chop the green onions and red ginger. Have the tenkasu ready to use immediately.
#### Step 2: Start Grilling
1. **Heat the plate thoroughly**: Heat the takoyaki maker on **high heat**. The secret to getting it crispy is to preheat it thoroughly until you can see a faint bit of smoke.
2. **Apply plenty of oil**: Apply plenty of oil into the holes of the heated plate and also on the flat areas around the holes. Skimping on oil here will cause sticking and prevent it from becoming crispy.
3. **Pour in the batter**: Use a pitcher or similar to pour in the batter. At this time, be bold and pour in **enough that it overflows from the holes and the entire plate is flooded**. This is the secret to making beautiful round balls.
4. **Add the fillings**: Immediately after pouring the batter, put one piece of octopus into each hole and scatter tenkasu, red ginger, and green onions evenly over everything.
#### Step 3: Turning (This is the main event!)
1. **Divide the edges of the batter**: Once the edges of the batter have set and cooked (about 2–3 minutes), use a pick to make grid-like cuts in the batter between the holes.
2. **The first 90-degree turn**: While gathering the overflowing batter into the holes, use the pick to **trace the edge of the hole** and rotate the batter 90 degrees. At this point, it's fine if the inside is still a gooey liquid. Imagine pushing the overflowing batter inside as you turn it.
3. **Shape while rotating**: After you've turned all the holes once, rotate them another 90 degrees at a time to form a round shape. Even if the shape is irregular at first, it will become a beautiful sphere as you keep rotating it.
* **Tip**: Keep the heat consistently at high to medium. If the heat is too low, it won't get crispy.
4. **Final grilling**: Once they have become beautiful spheres, rotate them occasionally until the surface reaches your desired golden-brown color. At the very end, you can turn up the heat slightly to evaporate surface moisture, or drizzle a small amount of sesame oil to grill them for an even crispier texture.
#### Step 4: Serving
Remove to a plate and finish with sauce, mayonnaise, aonori, and bonito flakes as you like!
---
### Summary of "Golden Tips" for Delicious Grilling
1. **Use dashi in the batter and let it rest!**
* It adds depth to the flavor, and the batter settles for a better creamy texture.
2. **Heat the plate until it smokes!**
* Grilling all at once at high heat creates that "crispy exterior."
3. **Use "more than you think" oil!**
* Think of it like deep-frying. It helps both prevent sticking and create a crispy texture.
4. **Pour enough batter to overflow the holes!**
* This is the biggest secret to creating beautiful round balls.
5. **Don't skimp on the "Tenkasu"!**
* The oil from the tenkasu adds richness and crispiness to the batter, highlighting the creamy interior.
6. **Don't be afraid, just keep rotating!**
* It's okay if it looks messy at first. By rotating repeatedly, it will become a beautiful round ball and cook evenly.
If you follow these steps and tips, you should be able to grill top-tier takoyaki even at home. Please enjoy making them!
Summary
In this article, we introduced the steps to try out Google's Gemini API within the free tier.
From how to obtain an API key and how to choose an available model, to a simple execution example in Python, you should now have a good grasp of the overall flow.
Gemini is highly capable even in the free tier and is a perfect tool for small ideas or prototyping. As seen in the takoyaki example, it's quite interesting how AI can return surprisingly deep answers just by asking simple things.
By applying this, you can create fun apps that collaborate with AI.
I hope everyone tries playing around with Gemini.
Until next time. Happy Coding!
Discussion