如要瞭解啟用 Cloud 帳單後資料的處理方式,請參閱條款 (請參閱「付費服務」下的「Google 如何使用您的資料」)。請注意,只要至少有 1 個 API 專案啟用帳單功能,Google AI Studio 提示就會適用相同的「付費服務」條款。如要確認,請前往 Gemini API 金鑰頁面,查看「方案」下方是否有任何專案標示為「付費」。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-22 (世界標準時間)。"],[],[],null,["# Billing\n\nThis guide provides an overview of different Gemini API billing options,\nexplains how to enable billing and monitor usage, and provides answers to\nfrequently asked questions (FAQs) about billing. \n[Upgrade to the Gemini API paid tier](https://aistudio.google.com/apikey)\n\nAbout billing\n-------------\n\nBilling for the Gemini API is based on two pricing tiers: *free of charge*\n(or *free* ) and *pay-as-you-go* (or *paid* ). Pricing and rate limits differ\nbetween these tiers and also vary by model. You can check out the [rate limits](/gemini-api/docs/rate-limits)\nand [pricing](/gemini-api/docs/pricing) pages for more into. For a model-by-model\nbreakdown of capabilities, see the [Gemini models page](/gemini-api/docs/models/gemini).\n\n#### How to request an upgrade\n\nTo transition from the free tier to the pay-as-you-go plan, you need to\nenable billing for your Google Cloud project. The button you see in\nGoogle AI Studio depends on your project's current plan.\n\n- If you're on the free tier, you'll see a **Set up Billing** button for your project.\n- If you're already on the paid tier and meet the criteria for a plan change, you might see an **Upgrade** button.\n\nTo start the process, follow these steps:\n\n1. Go to the [AI Studio API keys page](https://aistudio.google.com/app/apikey).\n2. Find the project you want to move to the paid plan and click either **Set up Billing** or **Upgrade**, depending on the button displayed.\n3. The next step depends on the button you clicked:\n - **If you clicked Set up Billing:** You'll be redirected to the Google Cloud console to link a billing account to your project. Follow the on-screen instructions to complete the process.\n - **If you clicked Upgrade:** The system will automatically verify your project's eligibility. If your project meets all the requirements, it will be instantly upgraded to the next tier.\n\n### Why use the paid tier?\n\nWhen you enable billing and use the paid tier, you benefit from [higher rate limits](/gemini-api/docs/rate-limits),\nand your prompts and responses aren't used to improve Google products.\nFor more information on data use for paid services, see the\n[terms of service](/gemini-api/terms#data-use-paid).\n\n### Cloud Billing\n\nThe Gemini API uses\n[Cloud Billing](https://cloud.google.com/billing/docs/concepts)\nfor billing services. To use the paid tier, you must set up Cloud Billing on\nyour cloud project. After you've enabled Cloud Billing, you can use Cloud\nBilling tools to track spending, understand costs, make payments, and access\nCloud Billing support.\n\nEnable billing\n--------------\n\nYou can enable Cloud Billing starting from Google AI Studio:\n\n1. Open [Google AI Studio](https://aistudio.google.com/).\n\n2. In the bottom of the left sidebar, select **Settings** \\\u003e\n **Plan information**.\n\n3. Click **Set up Billing** for your chosen project to enable Cloud Billing.\n\nMonitor usage\n-------------\n\nAfter you enable Cloud Billing, you can monitor your usage of the Gemini API in\nthe\n[Google Cloud console](https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com).\nThe service name for the API is `generativelanguage.googleapis.com`, and in the\nconsole the Gemini API is also referred to as the **Generative Language API**.\n\nTo learn more, see the Google Cloud documentation on\n[monitoring API usage](https://cloud.google.com/apis/docs/monitoring).\n\nFrequently asked questions\n--------------------------\n\nThis section provides answers to frequently asked questions.\n\n### What am I billed for?\n\nGemini API pricing is based on the following:\n\n- Input token count\n- Output token count\n- Cached token count\n- Cached token storage duration\n\nFor pricing information, see the [pricing page](/pricing).\n\n### Where can I view my quota?\n\nYou can view your quota and system limits in the\n[Google Cloud console](https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com/quotas).\n\n### How do I request more quota?\n\nTo request more quota, follow the instructions at\n[How to request an upgrade](#request-an-upgrade).\n\n### Can I use the Gemini API for free in EEA (including EU), the UK, and CH?\n\nYes, we make the free tier and paid tier available in\n[many regions](/gemini-api/docs/available-regions).\n\n### If I set up billing with the Gemini API, will I be charged for my Google AI Studio usage?\n\nNo, Google AI Studio usage remains free of charge regardless of if you set up\nbilling across all supported regions.\n\n### Can I use 1M tokens in the free tier?\n\nThe free tier for Gemini API differs based on the model selected. For now, you\ncan try the 1M token context window in the following ways:\n\n- In Google AI Studio\n- With pay-as-you-go plans\n- With free-of-charge plans for select models\n\nSee the latest free-of-charge rate limits per model on [rate limits page](/gemini-api/docs/rate-limits).\n\n### How can I calculate the number of tokens I'm using?\n\nUse the\n[`GenerativeModel.count_tokens`](/api/python/google/generativeai/GenerativeModel#count_tokens)\nmethod to count the number of tokens. Refer to the\n[Tokens guide](/gemini-api/docs/tokens) to learn more about tokens.\n\n### Can I use my Google Cloud credits with the Gemini API?\n\nYes, Google Cloud credits can be used towards Gemini API usage.\n\n### How is billing handled?\n\nBilling for the Gemini API is handled by the\n[Cloud Billing](https://cloud.google.com/billing/docs/concepts) system.\n\n### Am I charged for failed requests?\n\nIf your request fails with a 400 or 500 error, you won't be charged for the\ntokens used. However, the request will still count against your quota.\n\n### Is there a charge for fine-tuning the models?\n\n[Model tuning](/gemini-api/docs/model-tuning) is free, but inference on tuned\nmodels is charged at the same rate as the base models.\n\n### Is GetTokens billed?\n\nRequests to the GetTokens API are not billed, and they don't count against\ninference quota.\n\n### How is my Google AI Studio data handled if I have a paid API account?\n\nRefer to the [terms](/gemini-api/terms#paid-services) for details on how data is\nhandled when Cloud billing is enabled (see \"How Google Uses Your Data\" under\n\"Paid Services\"). Note that your Google AI Studio prompts are treated under the\nsame \"Paid Services\" terms so long as at least 1 API project has billing enabled,\nwhich you can validate on the [Gemini API Key page](https://aistudio.google.com/apikey)\nif you see any projects marked as \"Paid\" under \"Plan\".\n\n### Where can I get help with billing?\n\nTo get help with billing, see\n[Get Cloud Billing support](https://cloud.google.com/support/billing)."]]