Gemini API billing FAQs

This page provides answers to frequently asked questions about billing for the Gemini API. For pricing information, see the pricing page. For legal terms, see the terms of service.

How do I enable Cloud Billing?

You can enable Cloud Billing starting from Google AI Studio:

  1. Open Google AI Studio.

  2. Navigate to Settings in the bottom of the left sidebar.

  3. Under Account Settings, click Plan information.

    This lists the Google Cloud projects associated with your account.

  4. Click Set up Billing for your chosen project to enable Cloud Billing.

What am I billed for?

Gemini API pricing is based on total token count, with different prices for input tokens and output tokens. For pricing information, see the pricing page.

Where can I view my quota?

You can view your quota and system limits in the Google Cloud console.

Can I use the Gemini API for free in EEA (including EU), the UK, and CH?

There are two sets of models available through the API:

  1. Paid models which include Gemini 1.5 Flash, Gemini 1.5 Pro, and Gemini 1.0 Pro. These models will not have a free tier available in the EEA (including EU), the UK and CH. Developers will have to go through the necessary steps to set up a billing account and pay for usage.
  2. Certain models may be accessible for free in the Gemini API. (See ai.google.dev/pricing for details on which models we charge for; the other models are free). However, you will still need to set up a billing account to use these models.

If I set up billing with the Gemini API, will I be charged for my Google AI Studio usage?

No, Google AI Studio usage remains free of charge regardless of if you set up billing across all supported regions including EEA, EU, the UK, and CH.

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

See the latest free-of-charge rate limits per model on the pricing page.

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.

How is billing handled?

Billing for the Gemini API is handled by the Cloud Billing system.

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.

Is there a charge for fine-tuning the models?

Model tuning is free, but inference on tuned models is charged at the same rate as the base models.

Is GetTokens billed?

Requests to the GetTokens API are not billed, and they don't count against inference quota.

Where can I get help with billing?

To get help with billing, see Get Cloud Billing support.