This guide provides an overview of different Gemini API billing options, explains how to enable billing and monitor usage, and provides answers to frequently asked questions (FAQs) about billing.
About billing and tiers
Billing for the Gemini API is based on your payment history.
| Usage tier | Qualification | Billing tier cap |
|---|---|---|
| Free | Signup | N/A |
| Tier 1 | Active Billing Account | $250 |
| Tier 2 | Paid $100 + 3 days from first successful payment | $2,000 |
| Tier 3 | Paid $1,000 + 30 days from first successful payment | $20,000 - $100,000+ |
New accounts begin on the Free tier, which allows access to certain models in the Gemini API and AI Studio, up to the models' rate limits.
To access higher rate limits, use advanced models, and ensure your prompts and responses are not used to improve Google products*, you can link a billing account to move to the paid tiers. You'll move through higher tiers based on cumulative spend and account age. You can always unlink individual API keys to return that key to the free AI Studio quota.
* Enterprise-grade data privacy: For more information on data use for paid services, see the Terms of Service.
Set up billing to access the Paid Tier
You can create a project and set up billing, or import an existing project to upgrade to the Paid Tier directly in Google AI Studio without switching to the Google Cloud console. You'll gain immediate billable status without any upfront costs, and pay later only for the specific resources you consume during the billing cycle (read the Cloud automated billing setup for more information).
- Go to the AI Studio API keys page (or anywhere you see "Set up billing" in AI Studio).
- New users will have a project and API key created for them by default.
- If you need a new key, click Create API key and follow the dialog to add a key-project pair to the table.
- Find the project you want to upgrade to the Paid Tier and click Set up Billing under the Quota tier column.
- If a project is already on a Paid Tier, you might see the option to Upgrade.
- Setup differs for new and existing Cloud Billing users:
New users
This workflow is for users with no existing Google billing accounts.
- Follow the steps to choose your project and API key for set up.
- Select your country to agree to the Terms of Service in the Setup your Google Cloud billing account window.
- If you have any existing payment profiles linked to your account, you'll see your Contact information and Payment method filled in the Add your billing account details window. Click Change to edit either field.
- If you don't have an existing payment profile, click the + button for both Contact information and Payment method and follow the instructions to fill out your details in their respective windows.
- Click Finish account setup.
- The next window will inform you of your billing status.
Existing users
This workflow is for users who have previously set up Google billing with their account.
- Follow the steps to choose your project and API key for set up.
- You will have several options in the Set up your Cloud Billing account window:
- If you have multiple billing accounts, click the Select billing account menu to choose the one you'd like to link to your selected project.
- If you only have one billing account, that account will be automatically selected in the menu.
- If you don't want to use any of your existing accounts, click Add new billing account under the menu. This will trigger step 3 in the New Cloud Billing users section.
- Click Finish setup.
- The next window will inform you of your billing status.
Upgrade to the next Paid Tier
If you're already on a Paid Tier and meet the criteria for a plan change, you will be automatically upgraded to the next tier.
Verify billing status
After you Set up billing for the paid tier, you'll immediately be informed whether setup was successful. You can also verify that your Google Cloud Project is linked to the Google Cloud Billing account and ready for paid usage on the API keys page. Your key's billing status in the Quota tier column might show:
- Tier 1, 2, or 3: Verifies your project is linked and immediately billable.
- Action needed: You need to take action on your account, like pay a bill, update a payment method, etc.
Monitor usage
You can monitor your usage of the Gemini API in Google AI Studio in Dashboard > Usage.
Spend caps
The Gemini API supports monthly spend caps at both the billing account tier and project levels. These controls are designed to protect both your account from unexpected overages, and the ecosystem to ensure service availability.
Project spend caps
You can set your own project-level spend caps in AI Studio. This is useful if you have multiple projects under the same billing account and want to ensure each has access to enough of the spending limit.
Accounts with the project editor, owner, or admin roles can set spend caps per project in AI Studio on the Spend page under Monthly spend cap > Edit spend cap.
If you switch a project to a different billing account, any spend cap you already set for that project will persist, but any accumulated spend will reset to $0 for the new billing cycle.
Batch mode completions may still incur overages.
Billing data processing times can be slightly delayed in AI Studio, up to around 10 minutes. You may experience overages beyond your project cap if billing data hasn't processed before more charges are accrued.
Billing Account tier spend caps
Each tier has a maximum monthly spend limit:
| Usage tier | Spend cap |
|---|---|
| Free | N/A |
| Tier 1 | $250 |
| Tier 2 | $2,000 |
| Tier 3 | $20,000 - $100,000 |
Monthly usage caps are enforced at the billing account level; they are preset and non-configurable. Total spend is aggregated across all linked projects; once the cumulative total reaches the tier limit, service is suspended for all projects under that account until the start of the next billing cycle (monthly).
Evaluate your Billing Account spend
To evaluate your historical monthly spending to determine if the new Billing Account tier spend caps will impact your ongoing projects, follow these steps:
- Go to your Billing account management page in the Cloud Console.
- The Billing account overview dashboard displays Your total cost in the current month; Click View details on Reports at the bottom of that window.
- The report defaults to "Group by Service" in the "Current month". You will see Gemini API in the Service column and total spend in the Usage cost column of the table.
- Adjust the Time range by usage date filter to your desired range to evaluate your historical spend in a period.
Cloud Billing
The Gemini API uses Cloud Billing for billing accounts, which you can set up directly in AI Studio. You can use AI Studio to track spending and understand costs. You can access the same information and make payments in your Cloud billing account.
Projects and API keys
You can create up to 10 projects under one billing account, and one project can link up to 5 API keys.
Usage tiers apply at the billing account level. All projects under a billing account inherit its quota tier and associated limits. Cumulative spend and account age across all projects tied to a billing account counts towards its tier qualifications.
API keys are credentials generated inside a project. They have no independent billing settings; they inherit the tier limits and billing status of the project. The cumulative usage from all keys within a project counts toward that project's spend cap and the billing account's total spend.
Frequently asked questions
The following sections provide answers to frequently asked questions.
What am I billed for?
Gemini API pricing is based on the following:
- Input token count
- Output token count
- Cached token count
- Cached token storage duration
For pricing information, see the Pricing page.
Where can I view my quota?
You can view your quota and system limits in AI Studio or the Google Cloud console.
How do I request more quota?
To request a paid tier rate limit increase, use this form.
Can I use the Gemini API for free in EEA (including EU), the UK, and CH?
Yes, we make the free tier and paid tier available in many regions.
If I set up billing with the Gemini API, will I be charged for my Google AI Studio usage?
AI Studio usage remains free of charge unless users link a paid API key for access to paid features. Once you link a paid API key as part of a paid project in AI Studio, you will be charged for AI Studio usage for that key. You can switch between Paid Tier projects and Free Tier projects in AI Studio as needed.
Can I use 1M tokens in the free tier?
The free tier for Gemini API differs based on the model selected. For now, you can try the 1M token context window in the following ways:
- In Google AI Studio
- With pay-as-you-go plans
- With free-of-charge plans for select models
How can I calculate the number of tokens I'm using?
Use the GenerativeModel.count_tokens
method to count the number of tokens. Refer to the Tokens guide to learn more about tokens.
Can I use my Google Cloud welcome credit with the Gemini API?
No, the Google Cloud welcome credit or free trial credit can't be used towards the Gemini API or AI Studio.
If you were granted a Google Cloud welcome credit before they became ineligible, you can spend your remaining credits on the Gemini API and AI Studio, up until the credits expire after 90 days.
How is billing handled?
Billing for the Gemini API is handled by the Cloud billing system. Learn about the automated Billing setup in the Cloud billing documentation.
Am I charged for failed requests?
If your request fails with a 400 or 500 error, you won't be charged for the tokens used. However, the request will still count against your quota.
Is GetTokens billed?
Requests to the GetTokens API are not billed, and they don't count against
inference quota.
How is my Google AI Studio data handled if I have a paid API account?
Refer to the Terms of service for details on how data is handled when Cloud billing is enabled (see "How Google Uses Your Data" under "Paid Services"). Note that your Google AI Studio prompts are treated under the same "Paid Services" terms so long as at least 1 API project has billing enabled, which you can validate on the Gemini API key page if you see any projects marked as "Paid" under "Plan".
Where can I get help with billing?
To get help with billing, see Get Cloud billing support.