Understand pricing

Click your Gemini API provider to view provider-specific content and code on this page.


Using Firebase AI Logic is free-of-charge. However, the costs for your Gemini API usage and whether your Firebase project needs to be on the pay-as-you-go Blaze pricing plan depends on your chosen Gemini API provider and the features of Firebase AI Logic that you use.

For the Gemini Developer API:

  • Pricing is largely based on the model and features that you use.

  • Using some models (especially preview models and image-generating models) might require billing.

The section below provides a high-level overview of billing account requirements, but for details about pricing, see the Gemini Developer API pricing and billing FAQ.

Billing account requirements for your chosen API provider

The Gemini Developer API offers different tiers for its pricing. The following sections provide a high-level overview of these tiers, but make sure to review the details about the tiers in the documentation about Gemini Developer API pricing.

Gemini Developer API "free tier"

The Gemini Developer API "free tier" lets you get started without having to provide a payment method. It gives you limited access to certain models and access to many basic features.

This "free tier" requires that your project is not linked to a Cloud Billing account. This means your Firebase project is on the no-cost Spark pricing plan.

Gemini Developer API "paid tiers"

The Gemini Developer API "paid tiers" are available when you require higher volumes or want access to more models or advanced features.

These "paid tiers" require that your project is linked to a Cloud Billing account. This means your Firebase project is on the pay-as-you-go Blaze pricing plan.

In addition to upgrading to the Blaze pricing plan, the Gemini Developer API might require that some projects provide a prepayment to start using paid services (especially for projects with a new Cloud Billing account). You'll need to "import" your Firebase project into Google AI Studio (from the API Keys page) to see information about your project's additional requirements for billing setup. Learn more about billing setup and payments in the Gemini Developer API billing documentation.

After you link a Cloud Billing account, the Gemini Developer API offers spending caps that are specific to capping the usage of the Gemini Developer API only.

Other considerations for costs

If you're on the Blaze pricing plan, you might incur costs when you use other products in conjunction with Firebase AI Logic:

  • Other Firebase products may incur costs. For details, see the Firebase pricing page.

    • Using some of the attestation providers supported by Firebase App Check.
    • Using Firebase Authentication beyond the no-cost usage levels.

    • Using any of Firebase's database products beyond their no-cost usage levels.

  • AI monitoring in the Firebase console may incur costs.
    While AI monitoring in the Firebase console is free-of-charge itself, you may incur costs if you go beyond the no-cost usage levels of the underlying Google Cloud Observability Suite products. Learn more in the Google Cloud Observability Suite pricing documentation.

Recommendations to manage costs

We recommend doing the following to help manage your costs: