صورتحساب

این راهنما مروری بر گزینه‌های مختلف پرداخت Gemini API ارائه می‌دهد، نحوه فعال‌سازی پرداخت و نظارت بر استفاده را توضیح می‌دهد و به سوالات متداول (FAQs) در مورد پرداخت پاسخ می‌دهد.

درباره صورتحساب و سطوح آن

صورتحساب برای API جمینی بر اساس سابقه پرداخت شما محاسبه می‌شود.

ردیف استفاده صلاحیت سقف ردیف صورتحساب
رایگان پروژه فعال یا دوره آزمایشی رایگان ناموجود
ردیف ۱ یک حساب صورتحساب فعال راه‌اندازی و پیوند دهید ۲۵۰ دلار
ردیف ۲ پرداخت ۱۰۰ دلار + ۳ روز پس از اولین پرداخت موفق ۲۰۰۰ دلار
ردیف ۳ پرداخت ۱۰۰۰ دلار + ۳۰ روز از اولین پرداخت موفق ۲۰،۰۰۰ تا ۱۰۰،۰۰۰ دلار +

حساب‌های جدید از سطح رایگان شروع می‌شوند که امکان دسترسی به مدل‌های خاصی را در Gemini API و AI Studio، تا سقف نرخ سطح رایگان مدل‌ها، فراهم می‌کند.

برای استقرار برنامه‌های خود مستقیماً از حالت ساخت (Build mode)، می‌توانید از Google Cloud Starter Tier استفاده کنید. این سطح به شما امکان می‌دهد تا حداکثر ۲ برنامه کامل را بدون راه‌اندازی یک پروژه Google Cloud یا حساب صورتحساب منتشر کنید. برای جزئیات بیشتر به بخش «استقرار از Google AI Studio» مراجعه کنید و برای اطلاعات بیشتر به مستندات Google Cloud Starter Tier مراجعه کنید.

برای دسترسی به محدودیت‌های نرخ بالاتر، استفاده از مدل‌های پیشرفته و اطمینان از اینکه پیام‌ها و پاسخ‌های شما برای بهبود محصولات گوگل استفاده نمی‌شوند ، می‌توانید یک حساب صورتحساب و پیش‌پرداخت را به سطوح پرداخت‌شده پیوند دهید. سپس، بر اساس مجموع هزینه‌ها و سن حساب، به سطوح بالاتر منتقل خواهید شد.

سطوح، محدودیت‌های نرخ و سقف حساب‌های صورتحساب، همگی در سطح حساب صورتحساب تعیین می‌شوند.

* حریم خصوصی داده‌ها در سطح سازمانی: برای اطلاعات بیشتر در مورد استفاده از داده‌ها برای سرویس‌های پولی، به شرایط خدمات مراجعه کنید.

برای دسترسی به ردیف پرداخت‌شده، صورتحساب تنظیم کنید

شما می‌توانید یک پروژه ایجاد کنید و صورتحساب را تنظیم کنید، یا یک پروژه موجود را وارد کنید تا به سطح پولی در Google AI Studio ارتقا دهید. ارتقا از سطح رایگان به سطح پولی به معنای پیوند دادن یک حساب صورتحساب و پیش‌پرداخت برای اضافه کردن حداقل ۵ دلار (یا معادل آن به ارزهای دیگر) اعتبار به حساب شما است.

  1. به صفحه کلیدهای API AI Studio، صفحه پروژه‌ها یا هر جایی که دکمه تنظیم صورتحساب را در AI Studio می‌بینید، بروید.
    • کاربران جدید به طور پیش‌فرض یک پروژه و کلید API برای آنها ایجاد می‌شود.
    • اگر به یک کلید جدید نیاز دارید، روی «ایجاد کلید API» کلیک کنید و کادر محاوره‌ای را دنبال کنید تا یک جفت کلید-پروژه به جدول اضافه شود.
  2. پروژه Free Tier که می‌خواهید به Paid Tier ارتقا دهید را پیدا کنید و در زیر ستون Billing Tier روی Set up billing کلیک کنید.
  3. اگر قبلاً حساب پرداخت گوگل راه‌اندازی نکرده‌اید:
    • از شما خواسته می‌شود کشور خود را برای موافقت با شرایط خدمات انتخاب کنید.
    • سپس، برای ادامه، اطلاعات تماس و روش پرداخت خود را پر یا تأیید کنید.
  4. اگر قبلاً حساب‌های پرداخت گوگل راه‌اندازی کرده‌اید:
    • از شما خواسته می‌شود از بین حساب‌های صورتحساب موجود خود، یکی را انتخاب کنید.
    • اگر نمی‌خواهید از هیچ یک از حساب‌های موجود خود استفاده کنید، روی «افزودن حساب صورتحساب جدید» کلیک کنید و اطلاعات تماس و روش پرداخت خود را برای ادامه وارد یا تأیید کنید.
  5. در مرحله بعد، شما یکی از موارد زیر خواهید بود:
    • از شما خواسته می‌شود برای تکمیل تنظیمات صورتحساب، حداقل ۵ دلار پیش‌پرداخت کنید (به این معنی که حساب شما به طور خودکار به طرح صورتحساب پیش‌پرداخت اختصاص داده شده است)،
    • با توجه به انتخاب بین طرح‌های صورتحساب Prepay و Postpay برای حساب شما.
    • برای یک دوره واسطه به یک طرح صورتحساب Postpay اختصاص داده شده است تا زمانی که سیستم جدید Prepay برای همه کاربران منتشر شود (از ۲۳ مارس ۲۰۲۶).
  6. پس از پیش‌پرداخت یا انتخاب Postpay، راه‌اندازی حساب شما کامل شده است.

به سطح پولی بعدی ارتقا دهید

اگر از قبل در یک سطح پولی هستید و معیارهای تغییر طرح را دارید، به طور خودکار به سطح بعدی ارتقا خواهید یافت (البته بسته به زمان پردازش ).

تأیید وضعیت صورتحساب

پس از اینکه یک حساب پرداخت را به پروژه خود پیوند دادید ، می‌توانید وضعیت آن را در صفحه پرداخت AI Studio مشاهده کنید. برخلاف سطح رایگان، وضعیت سطح پولی پویا است؛ در حالی که سطح استفاده شما توسط سابقه حساب شما تعیین می‌شود، API Gemini فقط در صورتی درخواست‌ها را ارائه می‌دهد که مانده اعتبار Prepay مثبتی داشته باشید.

در صفحه پروژه‌ها ، می‌توانید سطح و طرح صورتحساب پروژه خود را در زیر ستون سطح صورتحساب مشاهده کنید. هرگونه اقدام مربوط به وضعیت صورتحساب که ممکن است برای نمایش پروژه در ستون‌های سطح صورتحساب یا وضعیت لازم باشد، عبارتند از:

  • اگر پروژه حساب صورتحساب ندارد، « تنظیم صورتحساب » را انتخاب کنید.
  • « تنظیم پیش‌پرداخت » اگر پروژه حساب صورتحساب متصل دارد، اما ملزم به استفاده از یک طرح صورتحساب پیش‌پرداخت است که نیاز به تنظیم دارد.
  • اگر حساب صورتحساب برای خرید اعتبار لازم باشد اما حساب پرداخت‌های پیش‌پرداخت راه‌اندازی نشده باشد یا موجودی اعتبار موجود تمام شده باشد، « اعتباری وجود ندارد »

برای انجام اقدامات لازم، روی هر یک از پیام‌ها کلیک کنید.

نظارت بر میزان استفاده

شما می‌توانید میزان استفاده خود از رابط برنامه‌نویسی کاربردی Gemini را در Google AI Studio و در مسیر Dashboard > Usage رصد کنید.

طرح‌های صورتحساب

طرح‌های پرداخت برای Gemini API و AI Studio به دو دسته تقسیم می‌شوند که زمان پرداخت هزینه استفاده را تعیین می‌کنند: پیش‌پرداخت و پس‌پرداخت. می‌توانید طرح پرداخت اختصاص داده شده به خود را بررسی کرده و روش‌های پرداخت را در صفحه صورتحساب AI Studio مدیریت کنید.

پیش‌پرداخت

در طرح پرداخت پیش‌پرداخت (Prepay)، شما قبل از استفاده از API Gemini، اعتبارهایی را برای موجودی پیش‌پرداخت خود خریداری می‌کنید و هزینه‌های استفاده از API شما تقریباً به صورت آنی از موجودی اعتبار پیش‌پرداخت شما کسر می‌شود. می‌توانید با اضافه کردن اعتبار به حساب خود یا تنظیم شارژ مجدد خودکار ، پیش‌پرداخت را انجام دهید. پس از خرید اعتبار، اعتبارهای استفاده نشده پس از ۱۲ ماه منقضی می‌شوند و قابل استرداد نیستند ، مگر پس از تغییر به حساب Postpay .

وقتی موجودی اعتبار Prepay شما در حساب صورتحساب به 0 دلار برسد، تمام کلیدهای API در تمام پروژه‌های مرتبط با آن حساب صورتحساب به طور همزمان از کار می‌افتند. سپس درخواست‌ها با خطای HTTP 402 Payment Required تا زمانی که اعتبار اضافه نکنید، با شکست مواجه می‌شوند. اعتبارهای Prepay فقط برای هزینه‌های استفاده از API Gemini اعمال می‌شوند؛ شما نمی‌توانید از آنها برای پرداخت سایر سرویس‌های Google Cloud استفاده کنید.

کاربران جدید به طور پیش‌فرض از طرح صورتحساب Prepay استفاده می‌کنند. پروژه‌هایی که قبل از معرفی طرح‌های صورتحساب Prepay و Postpay فعالیت می‌کنند، ممکن است قبل از ادامه استفاده از API Gemini، نیاز به به‌روزرسانی جزئیات صورتحساب پروژه خود داشته باشند.

توجه داشته باشید که پیش‌پرداخت برای حساب‌های فاکتوردار (یا آفلاین) در دسترس نیست.

افزودن پیش‌پرداخت به حساب پس‌پرداخت موجود

اگر حساب Cloud Billing فعلی شما از طرح Postpay استفاده می‌کند، می‌توانید قابلیت‌های Prepay را برای خرید اعتبار از قبل اضافه کنید. این اعتبارات پیش‌پرداخت به شما امکان می‌دهند بدون ایجاد یک حساب Cloud Billing جدید، از API Gemini استفاده کنید.

در طول تنظیمات برای افزودن Prepay به یک حساب موجود، یک صفحه تأیید اجباری به شما نمایش داده می‌شود که توضیح می‌دهد حساب Cloud Billing انتخابی شما اصلاح خواهد شد.

سیستم باید قبل از ارسال پیش‌پرداخت، وضعیت حساب شما را تغییر دهد. بنابراین، لغو فرآیند پس از تأیید اصلاح اما قبل از تکمیل تنظیمات پیش‌پرداخت ممکن است منجر به اختلالات موقت در سرویس پروژه‌هایی شود که از قبل به آن حساب Cloud Billing مرتبط هستند. قبل از تأیید انتقال، مطمئن شوید که برای تکمیل فرآیند پیش‌پرداخت آماده هستید. اگر با مشکلی مواجه شدید، به بخش «خدمات پس از لغو تنظیمات پیش‌پرداخت مختل شد» مراجعه کنید.

اگر واجد شرایط باشید و به صورت دستی از چرخه پیش‌پرداخت به چرخه پس‌پرداخت تغییر دهید، هرگونه اعتبار پیش‌پرداخت باقیمانده به طور خودکار به روش پرداخت اصلی مورد استفاده برای پیش‌پرداخت بازپرداخت می‌شود. با این حال، اگر به هر دلیل دیگری حساب Cloud Billing خود را ببندید، هرگونه اعتبار پیش‌پرداخت باقیمانده از بین می‌رود و بازپرداخت نمی‌شود.

خرید اعتبار

شما می‌توانید قبل از استفاده از API Gemini، به صورت دستی اعتبار خریداری کنید تا آنها را به موجودی اعتبار حساب Prepay خود اضافه کنید.

برای خرید اعتبار، به صفحه صورتحساب AI Studio بروید و گزینه خرید اعتبار را انتخاب کنید. حداقل خرید ۵ دلار است. حداکثر مبلغ اعتباری که می‌توانید پیش‌پرداخت کنید ۵۰۰۰ دلار است.

بارگیری مجدد خودکار

شارژ مجدد خودکار یک ویژگی اختیاری است که به طور خودکار موجودی اعتبار Prepay شما را در صورت کم شدن، افزایش می‌دهد. این ویژگی برای جلوگیری از وقفه در سرویس مفید است.

می‌توانید شارژ خودکار را تنظیم کنید و وضعیت شارژ خودکار خود را در کارت اعتباری موجود در صفحه صورتحساب AI Studio مشاهده کنید. برای تنظیم روش پرداخت، مبلغ شارژ مجدد و حداقل موجودی که باعث شارژ مجدد می‌شود، روی تنظیم شارژ خودکار یا مدیریت شارژ خودکار کلیک کنید.

محدودیت شارژ خودکار ماهانه

محدودیت شارژ خودکار ماهانه برای کاربران Prepay در دسترس است و به جلوگیری از هزینه‌های غیرمنتظره ناشی از شارژ مجدد خودکار مکرر اعتبار کمک می‌کند. از این ویژگی برای تعیین حداکثر محدودیت برای شارژ مجدد خودکار اعتبار در یک چرخه صورتحساب استفاده کنید. هنگامی که کل مبلغ شارژ مجدد خودکار در یک چرخه صورتحساب به این حد برسد، سیستم شارژ مجدد خودکار را تا شروع ماه بعد غیرفعال می‌کند. پرداخت‌های یک‌باره‌ای که به صورت دستی انجام می‌دهید، جزو این محدودیت محسوب نمی‌شوند.

برای تنظیم محدودیت شارژ خودکار ماهانه هنگام فعال بودن شارژ مجدد خودکار:

  1. به صفحه صورتحساب استودیوی هوش مصنوعی بروید.
  2. روی مدیریت بارگذاری خودکار کلیک کنید.
  3. بخش محدودیت ماهانه را باز کنید و حداکثر محدودیت ماهانه برای بارگذاری خودکار را وارد کنید.
  4. روی ذخیره کلیک کنید.

پست‌پی

در طرح پرداخت Postpay، حساب Cloud Billing شما هزینه‌ها را جمع می‌کند و در پایان ماه یا زمانی که هزینه‌های شما به سقف هزینه‌ای که به طور خودکار بر اساس سطح حساب شما تعیین شده است ، برسد، به طور خودکار از شما کسر می‌شود. پرداخت از روش پرداختی که به حساب پرداخت‌های Postpay شما متصل است، انجام می‌شود که می‌توانید آن را در صفحه صورتحساب AI Studio مدیریت کنید. در صفحه صورتحساب می‌توانید موجودی، تاریخ‌های سررسید و پرداخت‌های گذشته خود را مشاهده کنید، همچنین پرداخت‌ها را انجام داده و روش‌های پرداخت را مدیریت کنید.

هنگام تنظیم صورتحساب برای یک پروژه جدید، اگر واجد شرایط Postpay باشید، می‌توانید در کادر گفتگوی تنظیم صورتحساب، بین Prepay و Postpay یکی را انتخاب کنید.

پس از اینکه حساب Cloud Billing خود را به طرح Postpay تغییر دادید، تمام پروژه‌های مرتبط با آن حساب به طرح Postpay منتقل می‌شوند. می‌توانید با دنبال کردن مراحل موجود در Migrate to prepay ، یک حساب واجد شرایط را به Prepay منتقل کنید. همچنین می‌توانید یک پروژه را به یک حساب Billing با طرح صورتحساب متفاوت منتقل کنید تا چرخه شارژ آن پروژه تغییر کند؛ به مستندات Cloud در مورد مدیریت صورتحساب برای پروژه‌ها مراجعه کنید.

می‌توانید اطلاعات بیشتری در مورد چرخه شارژ Postpay را در راهنمای Cloud Billing کسب کنید.

مهاجرت به پیش‌پرداخت

گوگل هوش مصنوعی استودیو در حال انتقال حساب‌های توسعه‌دهندگان از Postpay به Prepay برای استفاده از API Gemini است. این تغییر فقط برای API Gemini اعمال می‌شود؛ سایر سرویس‌های Google Cloud مرتبط با حساب صورتحساب شما در Postpay باقی می‌مانند.

برای جلوگیری از وقفه در سرویس، قبل از تاریخ پایان اعتبار در اطلاعیه حساب خود، به پیش‌پرداخت (Prepay) تغییر دهید و اعتبار اضافه کنید. حساب‌هایی که فقط از ویژگی‌های Free Tier استفاده می‌کنند، نیازی به انجام اقدامی ندارند.

برای تغییر حساب Postpay موجود به Prepay:

  1. به صفحه صورتحساب استودیوی هوش مصنوعی بروید.
  2. برای حساب صورتحساب خود، گزینه «تغییر به پیش‌پرداخت» را انتخاب کنید.
  3. برای شارژ موجودی اولیه خود، اعتبار (حداقل ۵ دلار) خریداری کنید .

برای جلوگیری از وقفه در سرویس پس از تغییر، شارژ مجدد خودکار را طوری پیکربندی کنید که در صورت کم شدن موجودی اعتبار، آن را شارژ کند.

سقف هزینه‌ها

رابط برنامه‌نویسی نرم‌افزار Gemini از سقف هزینه‌های ماهانه در هر دو سطح حساب صورتحساب و پروژه پشتیبانی می‌کند. این کنترل‌ها برای محافظت از حساب شما در برابر اضافه برداشت‌های غیرمنتظره و تضمین دسترسی به خدمات در اکوسیستم طراحی شده‌اند.

توجه داشته باشید که سقف هزینه برای حساب‌های فاکتوردار (یا آفلاین) در دسترس نیست.

سقف هزینه‌های پروژه

شما می‌توانید در AI Studio سقف هزینه در سطح پروژه خود را تعیین کنید. این قابلیت زمانی مفید است که چندین پروژه تحت یک حساب صورتحساب یکسان دارید و می‌خواهید مطمئن شوید که هر کدام به اندازه کافی از سقف هزینه تجمعی دسترسی دارند.

حساب‌هایی که نقش ویرایشگر پروژه، مالک یا مدیر را دارند می‌توانند در AI Studio و در صفحه Spend در مسیر Monthly spend cap > Edit spend cap، برای هر پروژه سقف هزینه تعیین کنند.

برای جزئیات بیشتر در مورد مجوزهای خاص IAM گوگل کلود که برای مشاهده یا ویرایش سقف هزینه‌ها و اطلاعات صورتحساب در AI Studio مورد نیاز است، به راهنمای عیب‌یابی AI Studio مراجعه کنید.

اگر پروژه‌ای را به حساب صورتحساب دیگری منتقل کنید، هرگونه سقف هزینه‌ای که قبلاً برای آن پروژه تعیین کرده‌اید، حفظ خواهد شد، اما هرگونه هزینه انباشته شده برای چرخه صورتحساب جدید به 0 دلار بازنشانی می‌شود.

وظایف طولانی مدت مانند تکمیل حالت دسته ای و جلسات اپراتور ممکن است هزینه های اضافی فراتر از سقف هزینه پروژه شما ایجاد کنند.

زمان پردازش داده‌های صورتحساب در AI Studio می‌تواند تا حدود ۱۰ دقیقه به تأخیر بیفتد. اگر داده‌های صورتحساب قبل از افزایش هزینه‌ها پردازش نشده باشند، ممکن است بیش از سقف پروژه خود هزینه کنید.

سقف هزینه ردیف حساب صورتحساب

هر سطح حداکثر محدودیت هزینه ماهانه دارد:

ردیف استفاده سقف هزینه
رایگان ناموجود
ردیف ۱ ۲۵۰ دلار
ردیف ۲ ۲۰۰۰ دلار
ردیف ۳ ۲۰،۰۰۰ تا ۱۰۰،۰۰۰ دلار

سقف استفاده ماهانه برای API Gemini در سطح حساب صورتحساب اعمال می‌شود. در حالی که محدودیت‌های پیش‌فرض از پیش تعیین شده‌اند، می‌توانید برای افزایش استفاده درخواست افزایش دهید . کل هزینه در تمام پروژه‌های مرتبط که سرویس Gemini API در آنها فعال است، تجمیع می‌شود. پس از اینکه مجموع کل حساب به حد مجاز رسید، سرویس برای تمام پروژه‌های مرتبط با آن حساب صورتحساب تا شروع چرخه صورتحساب بعدی (اول هر ماه) متوقف می‌شود.

هزینه حساب صورتحساب خود را ارزیابی کنید

برای ارزیابی هزینه‌های ماهانه‌ی گذشته‌تان و تعیین اینکه آیا سقف هزینه‌های جدید ردیف حساب‌های صورتحساب بر پروژه‌های جاری شما تأثیر خواهد گذاشت یا خیر، این مراحل را دنبال کنید:

  1. در کنسول گوگل کلود، صفحه گزارش‌های حساب کلود بیلینگ خود را مشاهده کنید.
    • اگر بیش از یک حساب صورتحساب دارید، در پنجره باز شده، حساب صورتحساب ابری را که می‌خواهید گزارش‌های هزینه آن را مشاهده کنید، انتخاب کنید.
  2. این گزارش به صورت پیش‌فرض در "ماه جاری" روی "گروه‌بندی بر اساس سرویس" تنظیم شده است. شما API Gemini را در ستون سرویس و کل هزینه را در ستون هزینه استفاده جدول مشاهده خواهید کرد.
  3. برای مشاهده‌ی هزینه‌های جزئی محدود به استفاده از Gemini API، فیلتر Group by را روی group by SKU و فیلتر Services را روی Gemini API تنظیم کنید.
  4. برای ارزیابی هزینه‌های گذشته خود در یک دوره زمانی، فیلتر « بازه زمانی بر اساس تاریخ استفاده» را در محدوده مورد نظر خود تنظیم کنید.

زمان‌های پردازش

سیگنال‌های صورتحساب و به‌روزرسانی‌ها همیشه در لحظه اتفاق نمی‌افتند.

  • استفاده از اعتبار : هزینه‌های استفاده معمولاً ظرف چند دقیقه از موجودی شما کسر می‌شود.
  • تأیید پرداخت : در حالی که اکثر پرداخت‌های کارتی فوری هستند، برخی از روش‌های پرداخت (مانند نقل و انتقالات بانکی) ممکن است چندین روز طول بکشد تا تسویه شوند. خدمات تنها پس از تأیید رسمی خرید اعتبار، از سر گرفته می‌شوند یا ارتقا می‌یابند.
  • ارتقاء سطح : پس از پرداخت موفقیت‌آمیز یا زمانی که معیارهای ارتقاء را برآورده کنید، ارتقاء سطح معمولاً ظرف 10 دقیقه اعمال می‌شود.
  • نمودارهای تفکیک کل هزینه : به‌روزرسانی نمودارهایی که تفکیک کل هزینه شما را هم در صفحه صورتحساب و هم در صفحه هزینه نشان می‌دهند، می‌تواند تا ۲۴ ساعت طول بکشد.

برای کسب اطلاعات بیشتر در مورد تأخیرهای احتمالی در صدور صورتحساب، راهنماهای مربوط به چرخه شارژ و تأخیر تراکنش را در بخش صورتحساب ابری مطالعه کنید.

بازپرداخت‌ها

بازپرداخت وجه برای حساب‌های صورتحساب Prepay مجاز نیست، مگر هنگام تغییر نوع حساب.

وقتی نوع حساب Prepay به Postpay تغییر می‌کند (پس از اینکه شما شرایط لازم را داشته باشید و حساب خود را به صورت دستی ارتقا دهید )، حساب Prepay بسته می‌شود و هرگونه اعتبار پیش‌پرداخت باقیمانده به طور خودکار به روش پرداخت موجود در پرونده بازپرداخت می‌شود.

اگر حساب Prepay خود را به هر دلیلی غیر از ارتقا به Postpay ببندید ، هرگونه اعتبار پیش‌پرداخت باقی‌مانده از بین می‌رود.

اعتبارهای خریداری شده پس از ۱ سال منقضی می‌شوند. پس از انقضا، اعتبارها از بین می‌روند و قابل بازیابی نیستند.

حساب‌های Postpay از سیاست بازپرداخت Google Cloud پیروی می‌کنند.

حساب‌های پرداخت ابری

رابط برنامه‌نویسی نرم‌افزار Gemini از حساب‌های پرداخت ابری برای خدمات صدور صورتحساب استفاده می‌کند که می‌توانید مستقیماً در AI Studio تنظیم کنید . می‌توانید از AI Studio برای پیگیری هزینه‌ها، درک هزینه‌ها و انجام پرداخت‌ها استفاده کنید.

سطوح، محدودیت‌های نرخ و سقف حساب‌های صورتحساب، همگی در سطح حساب صورتحساب تعیین می‌شوند.

پروژه‌ها و کلیدهای API

تمام پروژه‌هایی که به یک حساب صورتحساب ابری متصل هستند، سطح استفاده از حساب صورتحساب، محدودیت‌های نرخ و سقف‌های حساب مربوطه را به ارث می‌برند. اگر یک پروژه را از یک حساب صورتحساب به حساب صورتحساب دیگری تغییر دهید ، سطح آن و متعاقباً محدودیت‌های نرخ و سقف‌های حساب، به سطح حساب صورتحساب جدید تغییر خواهند کرد.

مجموع هزینه‌های انجام‌شده (برای همه محصولات Google Cloud) و سن حساب در تمام پروژه‌های مرتبط با یک حساب صورتحساب، در رتبه‌بندی صلاحیت‌های آن حساب صورتحساب لحاظ می‌شود.

شما می‌توانید یک پروژه را از حساب صورتحساب آن جدا کنید تا به سطح رایگان برگردید.

کلیدهای API، اعتبارنامه‌هایی هستند که درون یک پروژه تولید می‌شوند. آن‌ها هیچ تنظیمات صورتحساب مستقلی ندارند؛ آن‌ها محدودیت‌های سطح و وضعیت صورتحساب پروژه را به ارث می‌برند. میزان استفاده تجمعی از همه کلیدهای درون یک پروژه، به عنوان سقف هزینه آن پروژه و کل هزینه حساب صورتحساب در نظر گرفته می‌شود.

سوالات متداول

بخش‌های زیر پاسخ‌هایی به سوالات متداول ارائه می‌دهند.

برای چه چیزی از من صورتحساب گرفته شده است؟

قیمت‌گذاری API جمینی بر اساس موارد زیر است:

  • تعداد توکن‌های ورودی
  • تعداد توکن‌های خروجی
  • تعداد توکن‌های ذخیره‌شده
  • مدت زمان ذخیره توکن ذخیره شده

برای اطلاعات قیمت، به صفحه قیمت‌گذاری مراجعه کنید.

سهمیه‌ام را از کجا می‌توانم ببینم؟

شما می‌توانید سهمیه و محدودیت‌های سیستم خود را در AI Studio مشاهده کنید.

چگونه می‌توانم به سطح محدودیت نرخ بالاتر بروم یا سهمیه بیشتری درخواست کنم؟

وقتی حساب شما به الزامات سطح بعدی برسد، به طور خودکار سهمیه بیشتری به شما اعطا خواهد شد.

آیا می‌توانم از رابط برنامه‌نویسی کاربردی Gemini به صورت رایگان در منطقه اقتصادی اروپا (شامل اتحادیه اروپا)، بریتانیا و جمهوری خلق چین استفاده کنم؟

بله، ما نسخه رایگان و پولی را در بسیاری از مناطق در دسترس قرار می‌دهیم.

اگر صورتحساب را با رابط برنامه‌نویسی نرم‌افزار Gemini تنظیم کنم، آیا هزینه‌ای بابت استفاده از Google AI Studio از من دریافت می‌شود؟

استفاده از AI Studio رایگان باقی می‌ماند، مگر اینکه کاربران برای دسترسی به ویژگی‌های پولی، یک کلید API پولی را لینک کنند. به محض اینکه یک کلید API پولی را به عنوان بخشی از یک پروژه پولی در AI Studio لینک کنید، هزینه استفاده از AI Studio برای آن کلید از شما دریافت می‌شود. می‌توانید در صورت نیاز با استفاده از کلیدهای API مربوطه که به هر نوع پروژه مرتبط هستند، بین پروژه‌های سطح پولی و رایگان جابه‌جا شوید.

اگر در سطح رایگان هستم، چگونه می‌توانم به سطوح بالاتر ارتقا دهم؟

برای دسترسی به سطوح بالاتر، باید صورتحساب را در پروژه خود تنظیم کنید. در Google AI Studio روی Set up billing کلیک کنید. این به شما در انتخاب یا ایجاد یک حساب Cloud Billing کمک می‌کند. اگر لازم است از مدل صورتحساب پیش‌پرداخت استفاده کنید، فرآیند Set up billing شما را در فرآیند ایجاد حساب Prepay که به حساب Cloud Billing شما مرتبط است، راهنمایی می‌کند.

آیا می‌توانم از ۱ میلیون توکن در سطح رایگان استفاده کنم؟

سطح رایگان برای API Gemini بسته به مدل انتخاب شده متفاوت است. در حال حاضر، می‌توانید پنجره زمینه توکن ۱M را به روش‌های زیر امتحان کنید:

  • در استودیوی هوش مصنوعی گوگل
  • با طرح‌های رایگان برای مدل‌های منتخب
  • با طرح‌های پس‌پرداخت

آیا می‌توانم بعد از ارتقا به سطوح بالاتر (پولی) به سطح رایگان برگردم؟

برای کاهش سطح به سطح رایگان، می‌توانید پرداخت هزینه را برای هر یک از پروژه‌هایی که می‌خواهید به سطح پایین‌تری ارتقا دهید، غیرفعال کنید .

چطور می‌توانم تعداد توکن‌هایی که استفاده می‌کنم را محاسبه کنم؟

از متد GenerativeModel.count_tokens برای شمارش تعداد توکن‌ها استفاده کنید. برای کسب اطلاعات بیشتر در مورد توکن‌ها، به راهنمای توکن‌ها مراجعه کنید.

اگر از طریق AI Studio برای اولین حساب Cloud Billing خود ثبت نام کنم، آیا همچنان از نسخه آزمایشی رایگان Google Cloud بهره‌مند خواهم شد؟

وقتی برای اولین حساب Cloud Billing خود ثبت نام می‌کنید، دوره آزمایشی رایگان Google Cloud شما شروع می‌شود و یک اعتبار خوشامدگویی ۳۰۰ دلاری به شما اعطا می‌شود. با این حال، این اعتبارها را نمی‌توان برای پرداخت هزینه استفاده از AI Studio استفاده کرد. می‌توانید از اعتبار خوشامدگویی برای پرداخت سایر خدمات واجد شرایط در Google Cloud استفاده کنید (توجه داشته باشید که پس از مصرف یا انقضای این اعتبارها (ظرف ۹۰ روز)، هرگونه هزینه استفاده اضافی به طور خودکار به روش پرداخت تعیین شده شما محاسبه می‌شود).

آیا می‌توانم از اعتبار خوشامدگویی گوگل کلود خود با رابط برنامه‌نویسی نرم‌افزار Gemini استفاده کنم؟

خیر، اعتبار خوشامدگویی گوگل کلود یا اعتبار دوره آزمایشی رایگان را نمی‌توان برای Gemini API یا AI Studio استفاده کرد.

اگر قبل از اینکه اعتبار گوگل کلود شما منقضی شود، به شما اعتبار خوشامدگویی اعطا شده باشد، می‌توانید اعتبار باقی‌مانده خود را تا زمان انقضای اعتبار (پس از ۹۰ روز) در Gemini API و AI Studio خرج کنید.

آیا دوره آزمایشی رایگان گوگل کلود برای استفاده از رابط برنامه‌نویسی Gemini اعمال می‌شود؟

خیر، از مارس ۲۰۲۶، هزینه‌های استفاده از رابط برنامه‌نویسی Gemini به طور خاص از برنامه آزمایشی رایگان ۳۰۰ دلاری Google Cloud مستثنی شده‌اند.

اعتبارهای Google Cloud چگونه با Prepay کار می‌کنند؟

کاربران Prepay ابتدا باید اعتبارهای Prepaid را خریداری کنند تا بتوانند از هرگونه اعتبار Google Cloud واجد شرایط برای استفاده از Gemini API استفاده کنند. هنگامی که موجودی اعتبار Prepay شما فعال باشد، اعتبارهای Google Cloud که واجد شرایط استفاده از Gemini API هستند، قبل از موجودی اعتبار Prepay شما مصرف می‌شوند. وقتی موجودی اعتبار Prepay شما در حساب صورتحساب به 0 دلار برسد، اعتبارهای Google Cloud دیگر مصرف نخواهند شد.

همه اعتبارات Google Cloud، مانند اعتبار خوشامدگویی Google Cloud ، برای Gemini API و AI Studio قابل استفاده نیستند.

نحوه رسیدگی به صورتحساب چگونه است؟

صدور صورتحساب برای رابط برنامه‌نویسی نرم‌افزار Gemini توسط سیستم صدور صورتحساب ابری انجام می‌شود. برای کسب اطلاعات بیشتر در مورد تنظیمات صورتحساب ابری درون‌محصولی، به مستندات صورتحساب ابری مراجعه کنید.

آیا برای درخواست‌های ناموفق هزینه‌ای از من دریافت می‌شود؟

اگر درخواست شما با خطای ۴۰۰ یا ۵۰۰ ناموفق باشد، هزینه توکن‌های استفاده شده از شما کسر نخواهد شد. با این حال، درخواست همچنان جزو سهمیه شما محسوب می‌شود.

آیا GetTokens هزینه دارد؟

درخواست‌های ارسالی به API GetTokens هزینه‌ای دریافت نمی‌کنند و جزو سهمیه استنتاج محسوب نمی‌شوند.

برای جزئیات بیشتر در مورد نحوه مدیریت داده‌ها هنگام فعال بودن پرداخت ابری، به شرایط خدمات مراجعه کنید (به بخش «نحوه استفاده گوگل از داده‌های شما» در بخش «خدمات پولی» مراجعه کنید). توجه داشته باشید که درخواست‌های Google AI Studio شما تحت همان شرایط «خدمات پولی» رفتار می‌شوند، مادامی که حداقل یک پروژه API پرداخت را فعال کرده باشد، که می‌توانید در صورت مشاهده پروژه‌هایی که در بخش «طرح» با عنوان «پرداخت شده» علامت‌گذاری شده‌اند، آن را در صفحه کلید API Gemini تأیید کنید.

صورتحساب پیش‌پرداخت چیست و چه کسی ملزم به استفاده از مدل صورتحساب پیش‌پرداخت است؟

صورتحساب پیش‌پرداخت به کاربران Gemini API در AI Studio اجازه می‌دهد تا اعتبار پیش‌خرید کنند. از ۲۳ مارس ۲۰۲۶، ممکن است از کاربران جدید AI Studio خواسته شود که در طرح صورتحساب پیش‌پرداخت باشند. در طول فرآیند راه‌اندازی صورتحساب AI Studio، رابط کاربری شما را در جریان راه‌اندازی صورتحساب راهنمایی می‌کند و نشان می‌دهد که آیا لازم است پیش‌پرداخت کنید یا خیر.

چگونه می‌توانم اعتبار پیش‌پرداخت خریداری کنم و آیا حداقل یا حداکثر مبلغی وجود دارد؟

شما می‌توانید در صفحه صورتحساب استودیوی هوش مصنوعی، اعتبار خریداری کنید . در طول فرآیند خرید، رابط کاربری حداقل مبلغ پیش‌خرید مورد نیاز برای منطقه و سطح شما و همچنین حداکثر مبلغی که می‌تواند همزمان در حساب شما باشد را ارائه می‌دهد.

آیا می‌توانم حساب پیش‌پرداخت خود را طوری تنظیم کنم که در صورت نیاز، به‌طور خودکار اعتبار بیشتری خریداری کند؟

بله، توصیه می‌کنیم که شارژ خودکار را در تنظیمات صورتحساب AI Studio پیکربندی کنید. شما یک «فعال‌کننده» مانده اعتبار (مثلاً «وقتی مانده من به زیر 30 دلار رسید») و یک «مقدار شارژ مجدد» (مثلاً «اضافه کردن 100 دلار») را مشخص می‌کنید.

آیا می‌توانم میزان هزینه‌های شارژ مجدد خودکار را محدود کنم؟

بله، کاربران پیش‌پرداخت می‌توانند در ویجت شارژ خودکار، محدودیت شارژ خودکار ماهانه را تنظیم کنند. وقتی کل شارژهای خودکار در یک چرخه صورتحساب به این حد برسد، سیستم شارژ خودکار را تا ماه بعد غیرفعال می‌کند. خریدهای دستی اعتبار جزو این محدودیت محسوب نمی‌شوند.

آیا می‌توانم اعتبارهای استفاده نشده‌ام را پس بگیرم؟

تمام اعتبارهای API پیش‌پرداخت پس از ۱ سال منقضی می‌شوند و قابل استرداد نیستند. سیاست بازپرداخت حساب‌های پیش‌پرداخت را مطالعه کنید.

آیا اعتبارهای پیش‌پرداخت من منقضی می‌شوند؟

بله، اعتبارها ۱۲ ماه پس از تاریخ خرید منقضی می‌شوند.

چه اتفاقی می‌افتد وقتی موجودی اعتبار پیش‌پرداخت من به صفر دلار برسد؟

تمام سرویس‌های Gemini API در تمام پروژه‌هایی که توسط آن حساب Cloud Billing Prepay پرداخت می‌شوند، بلافاصله متوقف می‌شوند تا از تحمیل هزینه‌های بیشتر جلوگیری شود. پروژه‌های شما به طور خودکار به سطح رایگان تنزل نمی‌یابند.

برای بازیابی سرویس در سطح فعلی پولی خود، باید اعتبار اضافی خریداری کنید . پس از خرید اعتبار، باید بتوانید از API Gemini استفاده کنید. توجه داشته باشید که ممکن است در به‌روزرسانی سیستم‌های ما برای نمایش موجودی اعتبار شما، تأخیری وجود داشته باشد.

به صورت اختیاری، برای کاهش سطح به سطح رایگان، می‌توانید پرداخت هزینه را برای پروژه‌هایی که می‌خواهید سطح آنها را کاهش دهید، غیرفعال کنید .

چرا با وجود اینکه موجودی اعتبار Prepay من بیشتر از 0 دلار است، استفاده من متوقف شد؟

ممکن است به سقف استفاده برای سطح فعلی خود رسیده باشید. با پیشرفت به سطوح بالاتر، محدودیت‌های استفاده به طور خودکار افزایش می‌یابند. میزان استفاده شما از Gemini API AI Studio همچنین می‌تواند به دلیل وضعیت حساب Cloud Billing شما تحت تأثیر قرار گیرد.

چرا موجودی حساب Prepay من منفی است؟

با توجه به پیچیدگی سیستم‌های صدور صورتحساب و پردازش ما، ممکن است پس از مصرف تمام اعتبار شما، در قطع مصرف تأخیر ایجاد شود. این مصرف اضافی ممکن است به صورت مانده اعتبار منفی در داشبورد صورتحساب AI Studio شما ظاهر شود. در این صورت، سرویس شما متوقف شده و مانده منفی از خرید اعتباری بعدی شما کسر خواهد شد.

برای جلوگیری از وقفه در سرویس API Gemini خود، توصیه می‌کنیم شارژ مجدد خودکار را تنظیم کنید تا وقتی موجودی اعتبار شما از مقداری که مشخص می‌کنید کمتر می‌شود، به‌طور خودکار اعتبار بیشتری خریداری شود.

آیا می‌توانم از اعتبار پیش‌پرداخت خود برای سایر سرویس‌های Google Cloud، مانند Gemini Enterprise Agent Platform، استفاده کنم؟

خیر، اعتبارهای پیش‌پرداخت صرفاً به استفاده از API Gemini محدود می‌شوند. سایر سرویس‌های Google Cloud که استفاده می‌کنید (محاسبات، ذخیره‌سازی، پلتفرم Gemini Enterprise Agent) با استفاده از چرخه شارژ استاندارد Cloud محاسبه و پرداخت می‌شوند.

آیا می‌توانم از سیستم پرداخت پیش‌پرداخت (Prepay) به سیستم پرداخت پس‌پرداخت (Postpay) تغییر دهم؟

خیر، تغییر از طرح صورتحساب Prepay به طرح صورتحساب Postpay پشتیبانی نمی‌شود.

آیا می‌توانم از پرداخت پس از پرداخت (Postpay) به پرداخت پیش‌پرداخت (Prepay) تغییر دهم؟

بله، می‌توانید یک حساب Postpay موجود را در صفحه صورتحساب AI Studio منتقل کنید. برای دستورالعمل‌ها به Migrate to prepay مراجعه کنید.

اگر به Postpay تغییر دهم، چه اتفاقی برای اعتبارهای پیش‌پرداخت من می‌افتد؟

وقتی به Postpay ارتقا می‌دهید، Cloud Billing حساب پرداخت‌های Prepay شما را می‌بندد، شارژ خودکار را غیرفعال می‌کند و به‌طور خودکار هرگونه اعتبار Prepay استفاده نشده را به شما بازپرداخت می‌کند (منوط به زمان پردازش استاندارد بازپرداخت).

از کجا می‌توانم موجودی فعلی اعتبار Prepay و سابقه تراکنش‌هایم را ببینم؟

تمام مدیریت موجودی و تاریخچه تراکنش‌ها برای رابط برنامه‌نویسی نرم‌افزار Gemini باید مستقیماً در تب صورتحساب Google AI Studio انجام شود.

چرا پیام «نوع حساب صورتحساب غیرفعال یا پشتیبانی نشده است» را می‌بینم؟

اگر نوع حساب صورتحساب انتخابی یا وضعیت حساب صورتحساب شما واجد شرایط سطح پرداخت در AI Studio نباشد، ممکن است تعاملات پرداخت در صفحه صورتحساب AI Studio مسدود شده و با پیام «نوع حساب صورتحساب غیرفعال یا پشتیبانی نشده است» جایگزین شود.

برای مشاهده وضعیت حساب صورتحساب خود، کنسول ابری را بررسی کنید. یکی از انواع غیرمجاز می‌تواند حساب آزمایشی رایگان باشد که در این صورت می‌توانید صورتحساب را در AI Studio فعال کنید تا واجد شرایط شوید. یکی از حالت‌های غیرفعال می‌تواند بسته باشد که در این صورت می‌توانید حساب را دوباره باز کنید .

آیا هزینه‌های استفاده از API جمینی من در کنسول گوگل کلود نمایش داده می‌شود؟

بله، هزینه‌های API Gemini، به همراه هزینه‌های مرتبط با سایر سرویس‌های Google Cloud که توسط حساب Cloud Billing شما پرداخت می‌شوند، در صفحات مدیریت هزینه در کنسول Cloud Billing قابل مشاهده هستند. توجه داشته باشید که فقط می‌توانید موجودی اعتبار Prepay خود را در AI Studio مدیریت کنید.

چرا میزان استفاده از API در Gemini در کنسول Cloud Billing نمایش داده نمی‌شود، در حالی که می‌توانم آن را در AI Studio Billing به همراه میزان مصرف اعتبارم ببینم؟

گوگل کلود و هوش مصنوعی استودیو، داده‌های مربوط به میزان استفاده را در فواصل زمانی مختلف به کلود بیلینگ گزارش می‌دهند. به دلیل پیچیدگی سیستم‌های صدور صورتحساب و پردازش ما، ممکن است بین استفاده از خدمات و در دسترس بودن میزان استفاده و هزینه‌ها برای مشاهده در کلود بیلینگ، تأخیری مشاهده کنید. معمولاً جزئیات هزینه شما ظرف یک روز در دسترس قرار می‌گیرد، اما گاهی اوقات می‌تواند بیش از ۲۴ ساعت طول بکشد. برای اطلاعات بیشتر در مورد صورتحساب‌های تأخیری، به مستندات کلود بیلینگ مراجعه کنید.

اگر از سایر سرویس‌های Google Cloud با هزینه‌هایی که مشمول چرخه شارژ Postpay هستند استفاده کنم، در صورت عدم پرداخت چه اتفاقی می‌افتد؟

عدم پرداخت برای سایر سرویس‌های Google Cloud می‌تواند دسترسی شما به Gemini API در AI Studio را به حالت تعلیق درآورد، صرف نظر از اینکه چه تعداد اعتبار Prepaid در دسترس دارید . استفاده از AI Studio توسط یک حساب Google Cloud Billing تأمین می‌شود که می‌تواند هم صورتحساب Prepay برای AI Studio و هم صورتحساب Postpay برای سایر سرویس‌های Cloud را به اشتراک بگذارد. مشکلی در موجودی Postpay شما، تمام سرویس‌های مرتبط با آن حساب را متوقف می‌کند. اگر حساب Cloud Billing شما به دلیل مشکلاتی مانند موارد زیر علامت‌گذاری شود، استفاده از Gemini API شما به حالت تعلیق در خواهد آمد:

  • مانده بدهی معوق یا عقب افتاده
  • پرداخت رد شده
  • روش پرداخت نامعتبر یا منقضی شده

برای بازیابی سرویس، باید مشکل حساب Postpay را در کنسول Google Cloud Billing حل کنید . پس از حل مشکل، دوباره به اعتبارات و خدمات Prepaid Gemini API خود دسترسی خواهید داشت.

چرا پروژه‌های من پس از لغو تنظیمات Prepay مختل شده‌اند؟

مشکل: شما فرآیند افزودن قابلیت‌های Prepay به یک حساب صورتحساب Postpay موجود را آغاز کردید، اما قبل از تکمیل تنظیمات پیش‌پرداخت، پنجره را بستید یا فرآیند را لغو کردید. سایر پروژه‌های مرتبط با آن حساب صورتحساب، دسترسی به رابط برنامه‌نویسی Gemini را از دست دادند.

علت: در طول جریان انتقال، زیرساخت پشتیبانی از Prepay بلافاصله پس از پذیرش کادر تأیید، در حساب صورتحساب شما ایجاد می‌شود. اگر مراحل پیش‌پرداخت را تکمیل نکنید، پیکربندی در حالت غیرقابل پرداخت باقی می‌ماند. از آنجا که این حالت در سطح حساب صورتحساب اعمال می‌شود، دسترسی همه پروژه‌های مرتبط با آن حساب صورتحساب که به خدمات Prepay متکی هستند را محدود می‌کند.

راه حل: از آنجا که وضعیت حساب قبلاً تغییر کرده است، در صورت قطع جریان پرداخت، هیچ راه خودکاری برای بازگرداندن وضعیت وجود ندارد. برای بازگرداندن سرویس به پروژه‌های لینک شده خود، یکی از موارد زیر را انجام دهید:

  • تکمیل تنظیمات: به Google AI Studio برگردید، جریان تنظیمات صورتحساب را مجدداً راه‌اندازی کنید و فرآیند پیش‌پرداخت را تکمیل کنید. پس از پردازش پرداخت، طرح صورتحساب پیش‌پرداخت فعال می‌شود و سرویس بازیابی می‌شود.
  • تماس با پشتیبانی: اگر نمی‌خواهید از طرح صورتحساب Prepay استفاده کنید و می‌خواهید حساب صورتحساب خود را به Postpay برگردانید، برای تنظیم مجدد دستی وضعیت حساب خود با پشتیبانی صورتحساب ابری تماس بگیرید .

از کجا می‌توانم در مورد صورتحساب کمک بگیرم؟

برای دریافت کمک در مورد صورتحساب، به دریافت پشتیبانی صورتحساب ابری مراجعه کنید.

،

این راهنما مروری بر گزینه‌های مختلف پرداخت Gemini API ارائه می‌دهد، نحوه فعال‌سازی پرداخت و نظارت بر استفاده را توضیح می‌دهد و به سوالات متداول (FAQs) در مورد پرداخت پاسخ می‌دهد.

درباره صورتحساب و سطوح آن

صورتحساب برای API جمینی بر اساس سابقه پرداخت شما محاسبه می‌شود.

ردیف استفاده صلاحیت سقف ردیف صورتحساب
رایگان پروژه فعال یا دوره آزمایشی رایگان ناموجود
ردیف ۱ یک حساب صورتحساب فعال راه‌اندازی و پیوند دهید ۲۵۰ دلار
ردیف ۲ پرداخت ۱۰۰ دلار + ۳ روز پس از اولین پرداخت موفق ۲۰۰۰ دلار
ردیف ۳ پرداخت ۱۰۰۰ دلار + ۳۰ روز از اولین پرداخت موفق ۲۰،۰۰۰ تا ۱۰۰،۰۰۰ دلار +

حساب‌های جدید از سطح رایگان شروع می‌شوند که امکان دسترسی به مدل‌های خاصی را در Gemini API و AI Studio، تا سقف نرخ سطح رایگان مدل‌ها، فراهم می‌کند.

برای استقرار برنامه‌های خود مستقیماً از حالت ساخت (Build mode)، می‌توانید از Google Cloud Starter Tier استفاده کنید. این سطح به شما امکان می‌دهد تا حداکثر ۲ برنامه کامل را بدون راه‌اندازی پروژه Google Cloud یا حساب صورتحساب منتشر کنید. برای جزئیات بیشتر به بخش «استقرار از Google AI Studio» مراجعه کنید و برای اطلاعات بیشتر به مستندات Google Cloud Starter Tier مراجعه کنید.

برای دسترسی به محدودیت‌های نرخ بالاتر، استفاده از مدل‌های پیشرفته و اطمینان از اینکه پیام‌ها و پاسخ‌های شما برای بهبود محصولات گوگل استفاده نمی‌شوند ، می‌توانید یک حساب صورتحساب و پیش‌پرداخت را به سطوح پرداخت‌شده پیوند دهید. سپس، بر اساس مجموع هزینه‌ها و سن حساب، به سطوح بالاتر منتقل خواهید شد.

سطوح، محدودیت‌های نرخ و سقف حساب‌های صورتحساب، همگی در سطح حساب صورتحساب تعیین می‌شوند.

* حریم خصوصی داده‌ها در سطح سازمانی: برای اطلاعات بیشتر در مورد استفاده از داده‌ها برای سرویس‌های پولی، به شرایط خدمات مراجعه کنید.

برای دسترسی به ردیف پرداخت‌شده، صورتحساب تنظیم کنید

شما می‌توانید یک پروژه ایجاد کنید و صورتحساب را تنظیم کنید، یا یک پروژه موجود را وارد کنید تا به سطح پولی در Google AI Studio ارتقا دهید. ارتقا از سطح رایگان به سطح پولی به معنای پیوند دادن یک حساب صورتحساب و پیش‌پرداخت برای اضافه کردن حداقل ۵ دلار (یا معادل آن به ارزهای دیگر) اعتبار به حساب شما است.

  1. Go to the AI Studio API keys page, Projects page, or anywhere you see Set up billing button 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.
  2. Find the Free Tier project you want to upgrade to the Paid Tier, and click Set up billing under the Billing Tier column.
  3. اگر قبلاً حساب پرداخت گوگل راه‌اندازی نکرده‌اید:
    • از شما خواسته می‌شود کشور خود را برای موافقت با شرایط خدمات انتخاب کنید.
    • سپس، برای ادامه، اطلاعات تماس و روش پرداخت خود را پر یا تأیید کنید.
  4. اگر قبلاً حساب‌های پرداخت گوگل راه‌اندازی کرده‌اید:
    • از شما خواسته می‌شود از بین حساب‌های صورتحساب موجود خود، یکی را انتخاب کنید.
    • If you don't want to use any of your existing accounts, click Add new billing account and fill in or confirm your contact information and payment method to continue.
  5. در مرحله بعد، شما یکی از موارد زیر خواهید بود:
    • Asked to prepay a minimum of $5 to complete billing setup (meaning your account is auto-assigned to the Prepay billing plan),
    • Given the choice between Prepay and Postpay billing plans for your account.
    • Assigned to a Postpay billing plan for an intermediary period until the new Prepay system propagates to all users (starting March 23, 2026).
  6. After prepaying or selecting Postpay, your account setup is complete.

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 (subject to processing times ).

Verify billing status

After you have linked a billing account to your project, you can monitor its status on the AI Studio Billing page . Unlike the free tier, paid tier status is dynamic; while your usage tier is determined by your account history, the Gemini API will only serve requests if you have a positive Prepay credit balance.

On the Projects page, you'll be able to see your project's tier and billing plan under the Billing Tier column. Any billing status actions you may need to take for a project display in the Billing Tier or Status columns:

  • " Set up billing " if the project doesn't have a billing account attached.
  • " Set up Prepay " if the project does have a billing account attached, but is required to use a Prepay billing plan that needs to be set up.
  • " No credits " if the billing account is required to purchase credits but the Prepay payments account isn't set up or the available credit balance is depleted.

Click any of the messages to proceed with the necessary actions.

نظارت بر میزان استفاده

You can monitor your usage of the Gemini API in Google AI Studio in Dashboard > Usage .

طرح‌های صورتحساب

Billing plans for the Gemini API and AI Studio fall into two categories that determine when you pay for usage: Prepay and Postpay. You can check your assigned billing plan and manage payment methods on the AI Studio Billing page.

پیش‌پرداخت

In the Prepay billing plan, you purchase credits towards your prepay balance in advance of your Gemini API usage, and your API usage costs are deducted from your Prepay credit balance in near real-time . You can prepay by adding credits into your account, or setting up auto-reload . After credits are purchased, unused credits expire after 12 months and are non-refundable , except after switching to a Postpay account .

When your Prepay credit balance on the billing account hits $0, all API keys in all projects linked to that billing account will stop working simultaneously. Requests then fail with an HTTP 402 Payment Required error until you add credits. Prepay credits apply only to Gemini API usage costs; you can't use them to pay for other Google Cloud services.

New users default to the Prepay billing plan. Projects that pre-date the introduction of Prepay and Postpay billing plans may need to update their project's billing details before continuing to use the Gemini API.

Note that Prepay is not available for Invoiced (or Offline) accounts.

Add Prepay to an existing Postpay account

If your existing Cloud Billing account uses a Postpay plan, you can add Prepay capabilities to purchase credits in advance. These prepay credits let you use the Gemini API without creating a new Cloud Billing account.

During the setup to add Prepay to an existing account, you are presented with a mandatory confirmation screen explaining that your selected Cloud Billing account will be modified.

The system must modify your account state before you submit your prepayment. Therefore, canceling the process after confirming the modification but before completing the prepayment setup might result in temporary service disruptions for projects already linked to that Cloud Billing account. Ensure you are ready to complete the prepayment process before confirming the transition. If you encounter issues, see Services disrupted after canceling a Prepay setup .

If you are eligible and manually switch from a Prepay cycle to a Postpay cycle, any remaining prepay credit balance is automatically refunded to the original payment method used for the prepayment. However, if you close your Cloud Billing account for any other reason, any remaining prepay credits are forfeited and aren't refunded.

خرید اعتبار

You can manually purchase credits in advance of your Gemini API usage to load them into your Prepay account credit balance.

To purchase credits, go to the AI Studio Billing page and select Buy credits . The minimum purchase is $5. The maximum amount of credits you can prepay for is $5,000.

بارگیری مجدد خودکار

Auto-reload is an optional feature that automatically tops up your Prepay credit balance when it's running low. This is useful to prevent service interruptions.

You can set up auto reload and see your auto-reload status in the Available credits card on the AI Studio Billing page. Click Setup auto-reload or Manage auto-reload to set your payment method, reload amount, and the minimum balance that triggers a reload payment.

Monthly auto-charge limit

The monthly auto-charge limit is available to Prepay users and helps prevent unexpected costs from frequent automatic credit reloads. Use this feature to set a maximum limit for automatic credit reloads within a single billing cycle. Once the total amount of automatic reloads in a billing cycle reaches this limit, the system disables auto-reload until the start of the next month. One-time payments you initiate manually don't count against this limit.

To set the monthly auto-charge limit when auto-reload is enabled:

  1. Go to the AI Studio Billing page.
  2. Click Manage auto-reload .
  3. Expand the Monthly Limit section and enter the maximum monthly limit for auto-reloads.
  4. روی ذخیره کلیک کنید.

پست‌پی

In the Postpay billing plan, your Cloud Billing account accrues costs and you are automatically charged at the end of the month, or when your costs reach an automatically assigned spend cap based on your account tier. The payment is charged to the payment method attached to your Postpay payments account, which you can manage on the AI Studio Billing page. On the Billing page you'll be able to view your balance, due dates, and past payments, as well as make payments and manage payment methods.

When setting up billing for a new project, if you are eligible for Postpay, you will have the option to choose between Prepay and Postpay in the billing setup dialogue.

After you switch a Cloud Billing account to use the Postpay billing plan, all projects linked to that billing account are switched to the Postpay plan. You can move an eligible account to Prepay by following the steps in Migrate to prepay . You can also move a project to a billing account with a different billing plan to change the charging cycle for that project; visit the Cloud documentation on managing billing for projects .

You can learn more about the Postpay charging cycle in the Cloud Billing guide .

Migrate to prepay

Google AI Studio is transitioning developer accounts from Postpay to Prepay billing for Gemini API usage. This change applies only to the Gemini API; other Google Cloud services linked to your billing account remain on Postpay.

Switch to Prepay and add credits before the cutover date in your account notice to avoid service interruptions. Accounts that use only Free Tier features do not need to take action.

To switch an existing Postpay account to Prepay:

  1. Go to the AI Studio Billing page.
  2. Select Switch to Prepay for your billing account.
  3. Purchase credits (minimum $5) to load your starting balance.

To prevent service interruptions after switching, configure auto-reload to top up your credit balance when it runs low.

سقف هزینه‌ها

The Gemini API supports monthly spend caps at both the billing account tier and project levels. These controls are designed to protect your account from unexpected overages, and the ecosystem to ensure service availability.

Note that spend caps are not available for Invoiced (or Offline) accounts.

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 cumulative 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 .

For details on the specific Google Cloud IAM permissions required to view or edit spend caps and billing information in AI Studio, see the AI Studio troubleshooting guide .

If you move 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.

Long-running tasks like batch mode completions and agent sessions may incur overages beyond your project spend cap.

Billing data processing times can be 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 سقف هزینه
رایگان ناموجود
ردیف ۱ ۲۵۰ دلار
ردیف ۲ ۲۰۰۰ دلار
ردیف ۳ $20,000 - $100,000

Monthly usage caps are enforced for the Gemini API at the billing account level. While default limits are preset, you can request an increase to accommodate higher usage. Total spend is aggregated across all linked projects that have the Gemini API service enabled. After the cumulative account total reaches the tier limit, service is paused for all projects linked to that billing account until the start of the next billing cycle (the 1st of each month).

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:

  1. In the Google Cloud console, view your Cloud Billing account Reports page.
    • If you have more than one billing account, at the prompt, choose the Cloud Billing account for which you'd like to view cost reports.
  2. 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.
  3. To see granular costs limited to Gemini API usage, set the Group by filter to group by SKU , and the Services filter to Gemini API .
  4. Adjust the Time range by usage date filter to your desired range to evaluate your historical spend in a period.

زمان‌های پردازش

Billing signals and updates don't always happen in real time.

  • Credit usage : Usage costs are typically drawn down from your balance within minutes.
  • Payment confirmation : While most card payments are instant, some forms of payment (like bank transfers) may take several days to clear. Services only resume or upgrade after the purchase of credits is officially confirmed.
  • Tier upgrades : After a successful payment, or when you meet the upgrade criteria , tier upgrades usually reflect within 10 minutes.
  • Total Cost breakdown graphs : The graphs showing your total cost breakdown on both the Billing page and the Spend page can take up to 24 hours to update.

Read the Cloud Billing guides on charging cycle and transaction latencies to learn more about potential billing delays.

بازپرداخت‌ها

Refunds aren't allowed for Prepay billing accounts, except when switching account types.

When a Prepay account switches to the Postpay account type (after you meet the criteria and manually upgrade your account), the Prepay account is closed and any remaining prepaid credits are automatically refunded to the payment method on file.

If you close your Prepay account for any reason other than upgrading to Postpay, any remaining prepaid credits are forfeited.

Purchased credits expire after 1 year. After expiration, credits are forfeited and can't be retrieved.

Postpay accounts follow the Google Cloud refund policy .

Cloud Billing accounts

The Gemini API uses Cloud Billing accounts for billing services, which you can set up directly in AI Studio . You can use AI Studio to track spending, understand costs, and make payments.

Tiers, rate limits, and billing account caps are all determined at the billing account level.

Projects and API keys

All projects linked to a Cloud Billing account inherit the billing account's usage tier and associated rate limits and account caps. If you change a project from one billing account to another, its tier, and subsequently rate limits and account caps, will switch to the tier of the new billing account.

Cumulative spend (towards all Google Cloud products) and account age across all projects tied to a billing account counts towards that billing account's tier qualifications .

You can unlink a project from its billing account to return to the free tier.

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.

سوالات متداول

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 .

How do I move to a higher rate limit tier, or request more quota?

You will automatically be granted more quota when your account reaches the next tier requirements .

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 as needed by using the respective API keys linked to each type.

If I'm on the Free Tier, how do I upgrade to higher tiers?

To access higher tiers, you must set up billing on your project. Click Set up billing in Google AI Studio. This will walk you through selecting or creating a Cloud Billing account. If you are required to be on the prepaid billing model, the Set up billing process will guide you through the process to create your Prepay account that is linked to your Cloud Billing account.

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 free-of-charge plans for select models
  • With postpaid plans

Can I revert back to Free Tier after I've upgraded to higher (paid) tiers?

To downgrade to the Free Tier, you can disable billing on each of your projects that you want to downgrade.

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.

If I sign up for my first Cloud Billing account through AI Studio, will I still get a Google Cloud Free Trial?

When you sign up for your first ever Cloud Billing account, your Google Cloud Free Trial starts and you are granted a $300 Welcome credit . However, those credits can't be used to pay for AI Studio usage. You can use the Welcome credit to pay for other eligible services within Google Cloud (note that once those credits are consumed or expire (within 90 days), any additional usage costs are automatically billed to your established form of payment).

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 are allowed to spend your remaining credits on the Gemini API and AI Studio up until the credits expire (after 90 days).

Does the Google Cloud Free Trial apply to Gemini API usage?

No, starting March 2026, Gemini API usage costs are specifically excluded from the $300 Google Cloud Free Trial program.

How do Google Cloud credits work with Prepay?

Prepay users must first purchase Prepaid credits before any eligible Google Cloud credits can be applied to Gemini API usage. Once you have an active Prepay credit balance, Google Cloud credits that are eligible for the Gemini API are consumed before your Prepay credit balance. When your Prepay credit balance on the billing account hits $0, Google Cloud credits will no longer be consumed.

Not all Google Cloud credits, such as the Google Cloud Welcome credit , can be used towards Gemini API and AI Studio.

نحوه رسیدگی به صورتحساب چگونه است؟

Billing for the Gemini API is handled by the Cloud billing system. Learn about the in-product Cloud 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.

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".

What is Prepaid billing and who is required to use the prepaid billing model?

Prepaid billing allows users of Gemini API in AI Studio to pre-purchase credits. Starting Mar 23, 2026, new users to AI Studio might be required to be on the Prepaid billing plan. During the AI Studio Set up Billing process, the UI will guide you through the billing set up flow and will indicate if you are required to prepay.

How do I purchase Prepay credits, and is there a minimum amount or maximum?

You can purchase credits on the AI Studio Billing page. During the purchase process, the UI will provide the minimum pre-purchase amount that is required for your region and tier level, as well as a maximum amount that can be in your account at one time.

Can I configure my Prepay account to automatically purchase more credits as needed?

Yes, we recommend that you configure auto-reload in the AI Studio Billing settings. You specify a "trigger" credit balance (eg, "when my balance falls below $30") and a "reload value" (eg, "add $100").

Can I limit the amount of automatic reload charges?

Yes, Prepay users can set a Monthly Auto-Charge Limit within the Auto-Reload widget. When the total amount of automatic reloads in a billing cycle reaches this limit, the system disables auto-reload until the next month. Manual credit purchases do not count toward this limit.

Can I get a refund for my unused credits?

All Prepaid API credits expire after 1 year and cannot be refunded. Read the refund policy for Prepay accounts .

Do my prepaid credits expire?

Yes, credits expire 12 months after their purchase date.

What happens when my prepaid credit balance hits $0?

All Gemini API services in all projects paid for by that Cloud Billing Prepay account will stop immediately to prevent incurring more charges. Your projects aren't automatically downgraded to the Free Tier.

To restore service at your current Paid Tier level, you must purchase additional credits . After you've purchased credits, you should be able to use the Gemini API. Note that there might be a delay while our systems update to reflect your credit balance.

Optionally, to downgrade to the Free Tier, you can disable billing on the projects you want to downgrade.

Why did my usage stop even though my Prepay credit balance is greater than $0?

You may have hit the usage limit for your current tier. Usage limits will increase automatically as you progress to higher tiers. Your Gemini API AI Studio usage can also be impacted due to the status of your Cloud Billing account .

Why is my Prepay account credit balance negative?

Due to the complexity of our billing and processing systems, there might be delays in our ability to cut off usage after you consume all of your credits. This excess usage might appear as a negative credit balance in your AI Studio billing dashboard. If this happens, your service is paused, and your negative balance will be deducted from your next credit purchase.

To avoid a pause in your Gemini API service, we recommend setting up auto-reload to automatically purchase more credits when your credit balance falls below a value you specify.

Can I use my Prepay credits for other Google Cloud services, like Gemini Enterprise Agent Platform?

No, Prepay credits are strictly locked to Gemini API usage. Any other Google Cloud services you use (Compute, Storage, Gemini Enterprise Agent Platform) are billed using the standard Cloud charging cycle .

Can I switch from Prepay to Postpay billing?

No, switching from a Prepay billing plan to a Postpay billing plan is not supported.

Can I switch from Postpay to Prepay billing?

Yes, you can transition an existing Postpay account on the AI Studio Billing page. See Migrate to prepay for instructions.

What happens to my Prepaid credits if I switch to Postpay?

When you upgrade to Postpay , Cloud Billing closes your Prepay payments account, turns off auto-reload , and automatically refunds any unused Prepay credits to you (subject to standard refund processing time).

Where can I see my current Prepay credit balance and transaction history?

All balance management and transaction history for the Gemini API must be done directly within the Google AI Studio Billing tab.

Why am I seeing "The billing account type is inactive or unsupported"?

Payments interactions on the AI Studio Billing page may be blocked and replaced with the message "The billing account type is inactive or unsupported" if your selected billing account type or billing account status is not eligible for the Paid Tier in AI Studio.

Check the Cloud Console to see your billing account's status. One ineligible type could be Free trial account , in which case you can activate billing in AI Studio to become eligible. One inactive state could be Closed , in which case you can reopen the account .

Will my Gemini API usage costs show up in the Google Cloud console?

Yes, Gemini API costs, alongside costs associated with any other Google Cloud services that are paid for by your Cloud Billing account, are viewable on the Cost management pages in the Cloud Billing console . Note that you can only manage your Prepay credit balance in AI Studio.

Why isn't my Gemini API Usage showing up in the Cloud Billing Console, when I can see it in AI Studio Billing, along with the consumption of my credits?

Google Cloud and AI Studio report usage data to Cloud Billing at varying intervals. Due to the complexity of our billing and processing systems, you might see a delay between your use of services, and the usage and costs being available to view in Cloud Billing. Typically, your cost details are available within a day, but can sometimes take more than 24 hours. Learn more about delayed billing in the Cloud Billing documentation .

If I use other Google Cloud services with costs that are subject to a Postpay charging cycle, what happens if I miss a payment?

Missing a payment for other Google Cloud services can suspend your Gemini API access in AI Studio, regardless of how many Prepaid credits you have available . AI Studio usage is powered by a Google Cloud Billing account, which can share both Prepay billing for AI Studio and Postpay billing for other Cloud services. An issue with your Postpay balance halts all services tied to that account. Your Gemini API usage will be suspended if your Cloud Billing account is flagged for issues such as:

  • مانده بدهی معوق یا عقب افتاده
  • پرداخت رد شده
  • روش پرداخت نامعتبر یا منقضی شده

To restore service, you must resolve the Postpay account issue in the Google Cloud Billing console. Once you resolve the issue, you will regain access to your Prepaid Gemini API credits and services.

چرا پروژه‌های من پس از لغو تنظیمات Prepay مختل شده‌اند؟

Issue: You started the flow to add Prepay capabilities to an existing Postpay billing account, but closed the window or canceled the process before completing the prepayment setup. Other projects linked to that billing account lost access to the Gemini API.

Cause: During the transition flow, the infrastructure to support Prepay is created on your billing account immediately after you accept the confirmation dialog. If you don't complete the prepayment steps, the configuration remains in an unchargeable state. Because this state applies at the billing account level, it restricts access for all projects linked to that billing account that rely on Prepay services.

Resolution: Because the account state has already changed, there is no automatic way to revert the state if you abandon the payment flow. To restore service to your linked projects, do one of the following:

  • Complete the setup: Return to Google AI Studio, restart the billing setup flow, and complete the prepayment process. After the payment is processed, the Prepay billing plan becomes active and the service is restored.
  • Contact Support: If you don't want to use the Prepay billing plan and want to revert your billing account back to Postpay, contact Cloud Billing Support to manually reset your account state.

Where can I get help with billing?

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

،

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.

درباره صورتحساب و سطوح آن

صورتحساب برای API جمینی بر اساس سابقه پرداخت شما محاسبه می‌شود.

Usage tier صلاحیت سقف ردیف صورتحساب
رایگان Active project or free trial ناموجود
ردیف ۱ یک حساب صورتحساب فعال راه‌اندازی و پیوند دهید ۲۵۰ دلار
ردیف ۲ پرداخت ۱۰۰ دلار + ۳ روز پس از اولین پرداخت موفق ۲۰۰۰ دلار
ردیف ۳ پرداخت ۱۰۰۰ دلار + ۳۰ روز از اولین پرداخت موفق ۲۰،۰۰۰ تا ۱۰۰،۰۰۰ دلار +

New accounts begin on the Free Tier, which allows access to certain models in the Gemini API and AI Studio, up to the models' free tier rate limits .

To deploy your applications directly from Build mode, you can use the Google Cloud Starter Tier . This tier lets you publish up to 2 full stack applications without setting up a Google Cloud project or billing account. See Deploying from Google AI Studio for details and refer to the Google Cloud Starter Tier documentation for more information.

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 and Prepay to move to the Paid Tiers. Then, you'll move through higher tiers based on cumulative spend and account age.

Tiers, rate limits, and billing account caps are all determined at the billing account level.

* Enterprise-grade data privacy: For more information on data use for paid services, see the Terms of Service .

برای دسترسی به ردیف پرداخت‌شده، صورتحساب تنظیم کنید

You can create a project and set up billing, or import an existing project, to upgrade to the Paid Tier in Google AI Studio . Upgrading from the Free Tier to the Paid Tier means linking a billing account and prepaying to add a minimum of $5 (or equivalent in other currencies) of credits to your account.

  1. Go to the AI Studio API keys page, Projects page, or anywhere you see Set up billing button 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.
  2. Find the Free Tier project you want to upgrade to the Paid Tier, and click Set up billing under the Billing Tier column.
  3. اگر قبلاً حساب پرداخت گوگل راه‌اندازی نکرده‌اید:
    • از شما خواسته می‌شود کشور خود را برای موافقت با شرایط خدمات انتخاب کنید.
    • سپس، برای ادامه، اطلاعات تماس و روش پرداخت خود را پر یا تأیید کنید.
  4. اگر قبلاً حساب‌های پرداخت گوگل راه‌اندازی کرده‌اید:
    • از شما خواسته می‌شود از بین حساب‌های صورتحساب موجود خود، یکی را انتخاب کنید.
    • If you don't want to use any of your existing accounts, click Add new billing account and fill in or confirm your contact information and payment method to continue.
  5. در مرحله بعد، شما یکی از موارد زیر خواهید بود:
    • Asked to prepay a minimum of $5 to complete billing setup (meaning your account is auto-assigned to the Prepay billing plan),
    • Given the choice between Prepay and Postpay billing plans for your account.
    • Assigned to a Postpay billing plan for an intermediary period until the new Prepay system propagates to all users (starting March 23, 2026).
  6. After prepaying or selecting Postpay, your account setup is complete.

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 (subject to processing times ).

Verify billing status

After you have linked a billing account to your project, you can monitor its status on the AI Studio Billing page . Unlike the free tier, paid tier status is dynamic; while your usage tier is determined by your account history, the Gemini API will only serve requests if you have a positive Prepay credit balance.

On the Projects page, you'll be able to see your project's tier and billing plan under the Billing Tier column. Any billing status actions you may need to take for a project display in the Billing Tier or Status columns:

  • " Set up billing " if the project doesn't have a billing account attached.
  • " Set up Prepay " if the project does have a billing account attached, but is required to use a Prepay billing plan that needs to be set up.
  • " No credits " if the billing account is required to purchase credits but the Prepay payments account isn't set up or the available credit balance is depleted.

Click any of the messages to proceed with the necessary actions.

نظارت بر میزان استفاده

You can monitor your usage of the Gemini API in Google AI Studio in Dashboard > Usage .

طرح‌های صورتحساب

Billing plans for the Gemini API and AI Studio fall into two categories that determine when you pay for usage: Prepay and Postpay. You can check your assigned billing plan and manage payment methods on the AI Studio Billing page.

پیش‌پرداخت

In the Prepay billing plan, you purchase credits towards your prepay balance in advance of your Gemini API usage, and your API usage costs are deducted from your Prepay credit balance in near real-time . You can prepay by adding credits into your account, or setting up auto-reload . After credits are purchased, unused credits expire after 12 months and are non-refundable , except after switching to a Postpay account .

When your Prepay credit balance on the billing account hits $0, all API keys in all projects linked to that billing account will stop working simultaneously. Requests then fail with an HTTP 402 Payment Required error until you add credits. Prepay credits apply only to Gemini API usage costs; you can't use them to pay for other Google Cloud services.

New users default to the Prepay billing plan. Projects that pre-date the introduction of Prepay and Postpay billing plans may need to update their project's billing details before continuing to use the Gemini API.

Note that Prepay is not available for Invoiced (or Offline) accounts.

Add Prepay to an existing Postpay account

If your existing Cloud Billing account uses a Postpay plan, you can add Prepay capabilities to purchase credits in advance. These prepay credits let you use the Gemini API without creating a new Cloud Billing account.

During the setup to add Prepay to an existing account, you are presented with a mandatory confirmation screen explaining that your selected Cloud Billing account will be modified.

The system must modify your account state before you submit your prepayment. Therefore, canceling the process after confirming the modification but before completing the prepayment setup might result in temporary service disruptions for projects already linked to that Cloud Billing account. Ensure you are ready to complete the prepayment process before confirming the transition. If you encounter issues, see Services disrupted after canceling a Prepay setup .

If you are eligible and manually switch from a Prepay cycle to a Postpay cycle, any remaining prepay credit balance is automatically refunded to the original payment method used for the prepayment. However, if you close your Cloud Billing account for any other reason, any remaining prepay credits are forfeited and aren't refunded.

خرید اعتبار

You can manually purchase credits in advance of your Gemini API usage to load them into your Prepay account credit balance.

To purchase credits, go to the AI Studio Billing page and select Buy credits . The minimum purchase is $5. The maximum amount of credits you can prepay for is $5,000.

بارگیری مجدد خودکار

Auto-reload is an optional feature that automatically tops up your Prepay credit balance when it's running low. This is useful to prevent service interruptions.

You can set up auto reload and see your auto-reload status in the Available credits card on the AI Studio Billing page. Click Setup auto-reload or Manage auto-reload to set your payment method, reload amount, and the minimum balance that triggers a reload payment.

Monthly auto-charge limit

The monthly auto-charge limit is available to Prepay users and helps prevent unexpected costs from frequent automatic credit reloads. Use this feature to set a maximum limit for automatic credit reloads within a single billing cycle. Once the total amount of automatic reloads in a billing cycle reaches this limit, the system disables auto-reload until the start of the next month. One-time payments you initiate manually don't count against this limit.

To set the monthly auto-charge limit when auto-reload is enabled:

  1. Go to the AI Studio Billing page.
  2. Click Manage auto-reload .
  3. Expand the Monthly Limit section and enter the maximum monthly limit for auto-reloads.
  4. روی ذخیره کلیک کنید.

پست‌پی

In the Postpay billing plan, your Cloud Billing account accrues costs and you are automatically charged at the end of the month, or when your costs reach an automatically assigned spend cap based on your account tier. The payment is charged to the payment method attached to your Postpay payments account, which you can manage on the AI Studio Billing page. On the Billing page you'll be able to view your balance, due dates, and past payments, as well as make payments and manage payment methods.

When setting up billing for a new project, if you are eligible for Postpay, you will have the option to choose between Prepay and Postpay in the billing setup dialogue.

After you switch a Cloud Billing account to use the Postpay billing plan, all projects linked to that billing account are switched to the Postpay plan. You can move an eligible account to Prepay by following the steps in Migrate to prepay . You can also move a project to a billing account with a different billing plan to change the charging cycle for that project; visit the Cloud documentation on managing billing for projects .

You can learn more about the Postpay charging cycle in the Cloud Billing guide .

Migrate to prepay

Google AI Studio is transitioning developer accounts from Postpay to Prepay billing for Gemini API usage. This change applies only to the Gemini API; other Google Cloud services linked to your billing account remain on Postpay.

Switch to Prepay and add credits before the cutover date in your account notice to avoid service interruptions. Accounts that use only Free Tier features do not need to take action.

To switch an existing Postpay account to Prepay:

  1. Go to the AI Studio Billing page.
  2. Select Switch to Prepay for your billing account.
  3. Purchase credits (minimum $5) to load your starting balance.

To prevent service interruptions after switching, configure auto-reload to top up your credit balance when it runs low.

سقف هزینه‌ها

The Gemini API supports monthly spend caps at both the billing account tier and project levels. These controls are designed to protect your account from unexpected overages, and the ecosystem to ensure service availability.

Note that spend caps are not available for Invoiced (or Offline) accounts.

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 cumulative 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 .

For details on the specific Google Cloud IAM permissions required to view or edit spend caps and billing information in AI Studio, see the AI Studio troubleshooting guide .

If you move 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.

Long-running tasks like batch mode completions and agent sessions may incur overages beyond your project spend cap.

Billing data processing times can be 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 سقف هزینه
رایگان ناموجود
ردیف ۱ ۲۵۰ دلار
ردیف ۲ ۲۰۰۰ دلار
ردیف ۳ $20,000 - $100,000

Monthly usage caps are enforced for the Gemini API at the billing account level. While default limits are preset, you can request an increase to accommodate higher usage. Total spend is aggregated across all linked projects that have the Gemini API service enabled. After the cumulative account total reaches the tier limit, service is paused for all projects linked to that billing account until the start of the next billing cycle (the 1st of each month).

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:

  1. In the Google Cloud console, view your Cloud Billing account Reports page.
    • If you have more than one billing account, at the prompt, choose the Cloud Billing account for which you'd like to view cost reports.
  2. 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.
  3. To see granular costs limited to Gemini API usage, set the Group by filter to group by SKU , and the Services filter to Gemini API .
  4. Adjust the Time range by usage date filter to your desired range to evaluate your historical spend in a period.

زمان‌های پردازش

Billing signals and updates don't always happen in real time.

  • Credit usage : Usage costs are typically drawn down from your balance within minutes.
  • Payment confirmation : While most card payments are instant, some forms of payment (like bank transfers) may take several days to clear. Services only resume or upgrade after the purchase of credits is officially confirmed.
  • Tier upgrades : After a successful payment, or when you meet the upgrade criteria , tier upgrades usually reflect within 10 minutes.
  • Total Cost breakdown graphs : The graphs showing your total cost breakdown on both the Billing page and the Spend page can take up to 24 hours to update.

Read the Cloud Billing guides on charging cycle and transaction latencies to learn more about potential billing delays.

بازپرداخت‌ها

Refunds aren't allowed for Prepay billing accounts, except when switching account types.

When a Prepay account switches to the Postpay account type (after you meet the criteria and manually upgrade your account), the Prepay account is closed and any remaining prepaid credits are automatically refunded to the payment method on file.

If you close your Prepay account for any reason other than upgrading to Postpay, any remaining prepaid credits are forfeited.

Purchased credits expire after 1 year. After expiration, credits are forfeited and can't be retrieved.

Postpay accounts follow the Google Cloud refund policy .

Cloud Billing accounts

The Gemini API uses Cloud Billing accounts for billing services, which you can set up directly in AI Studio . You can use AI Studio to track spending, understand costs, and make payments.

Tiers, rate limits, and billing account caps are all determined at the billing account level.

Projects and API keys

All projects linked to a Cloud Billing account inherit the billing account's usage tier and associated rate limits and account caps. If you change a project from one billing account to another, its tier, and subsequently rate limits and account caps, will switch to the tier of the new billing account.

Cumulative spend (towards all Google Cloud products) and account age across all projects tied to a billing account counts towards that billing account's tier qualifications .

You can unlink a project from its billing account to return to the free tier.

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.

سوالات متداول

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 .

How do I move to a higher rate limit tier, or request more quota?

You will automatically be granted more quota when your account reaches the next tier requirements .

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 as needed by using the respective API keys linked to each type.

If I'm on the Free Tier, how do I upgrade to higher tiers?

To access higher tiers, you must set up billing on your project. Click Set up billing in Google AI Studio. This will walk you through selecting or creating a Cloud Billing account. If you are required to be on the prepaid billing model, the Set up billing process will guide you through the process to create your Prepay account that is linked to your Cloud Billing account.

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 free-of-charge plans for select models
  • With postpaid plans

Can I revert back to Free Tier after I've upgraded to higher (paid) tiers?

To downgrade to the Free Tier, you can disable billing on each of your projects that you want to downgrade.

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.

If I sign up for my first Cloud Billing account through AI Studio, will I still get a Google Cloud Free Trial?

When you sign up for your first ever Cloud Billing account, your Google Cloud Free Trial starts and you are granted a $300 Welcome credit . However, those credits can't be used to pay for AI Studio usage. You can use the Welcome credit to pay for other eligible services within Google Cloud (note that once those credits are consumed or expire (within 90 days), any additional usage costs are automatically billed to your established form of payment).

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 are allowed to spend your remaining credits on the Gemini API and AI Studio up until the credits expire (after 90 days).

Does the Google Cloud Free Trial apply to Gemini API usage?

No, starting March 2026, Gemini API usage costs are specifically excluded from the $300 Google Cloud Free Trial program.

How do Google Cloud credits work with Prepay?

Prepay users must first purchase Prepaid credits before any eligible Google Cloud credits can be applied to Gemini API usage. Once you have an active Prepay credit balance, Google Cloud credits that are eligible for the Gemini API are consumed before your Prepay credit balance. When your Prepay credit balance on the billing account hits $0, Google Cloud credits will no longer be consumed.

Not all Google Cloud credits, such as the Google Cloud Welcome credit , can be used towards Gemini API and AI Studio.

نحوه رسیدگی به صورتحساب چگونه است؟

Billing for the Gemini API is handled by the Cloud billing system. Learn about the in-product Cloud 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.

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".

What is Prepaid billing and who is required to use the prepaid billing model?

Prepaid billing allows users of Gemini API in AI Studio to pre-purchase credits. Starting Mar 23, 2026, new users to AI Studio might be required to be on the Prepaid billing plan. During the AI Studio Set up Billing process, the UI will guide you through the billing set up flow and will indicate if you are required to prepay.

How do I purchase Prepay credits, and is there a minimum amount or maximum?

You can purchase credits on the AI Studio Billing page. During the purchase process, the UI will provide the minimum pre-purchase amount that is required for your region and tier level, as well as a maximum amount that can be in your account at one time.

Can I configure my Prepay account to automatically purchase more credits as needed?

Yes, we recommend that you configure auto-reload in the AI Studio Billing settings. You specify a "trigger" credit balance (eg, "when my balance falls below $30") and a "reload value" (eg, "add $100").

Can I limit the amount of automatic reload charges?

Yes, Prepay users can set a Monthly Auto-Charge Limit within the Auto-Reload widget. When the total amount of automatic reloads in a billing cycle reaches this limit, the system disables auto-reload until the next month. Manual credit purchases do not count toward this limit.

Can I get a refund for my unused credits?

All Prepaid API credits expire after 1 year and cannot be refunded. Read the refund policy for Prepay accounts .

Do my prepaid credits expire?

Yes, credits expire 12 months after their purchase date.

What happens when my prepaid credit balance hits $0?

All Gemini API services in all projects paid for by that Cloud Billing Prepay account will stop immediately to prevent incurring more charges. Your projects aren't automatically downgraded to the Free Tier.

To restore service at your current Paid Tier level, you must purchase additional credits . After you've purchased credits, you should be able to use the Gemini API. Note that there might be a delay while our systems update to reflect your credit balance.

Optionally, to downgrade to the Free Tier, you can disable billing on the projects you want to downgrade.

Why did my usage stop even though my Prepay credit balance is greater than $0?

You may have hit the usage limit for your current tier. Usage limits will increase automatically as you progress to higher tiers. Your Gemini API AI Studio usage can also be impacted due to the status of your Cloud Billing account .

Why is my Prepay account credit balance negative?

Due to the complexity of our billing and processing systems, there might be delays in our ability to cut off usage after you consume all of your credits. This excess usage might appear as a negative credit balance in your AI Studio billing dashboard. If this happens, your service is paused, and your negative balance will be deducted from your next credit purchase.

To avoid a pause in your Gemini API service, we recommend setting up auto-reload to automatically purchase more credits when your credit balance falls below a value you specify.

Can I use my Prepay credits for other Google Cloud services, like Gemini Enterprise Agent Platform?

No, Prepay credits are strictly locked to Gemini API usage. Any other Google Cloud services you use (Compute, Storage, Gemini Enterprise Agent Platform) are billed using the standard Cloud charging cycle .

Can I switch from Prepay to Postpay billing?

No, switching from a Prepay billing plan to a Postpay billing plan is not supported.

Can I switch from Postpay to Prepay billing?

Yes, you can transition an existing Postpay account on the AI Studio Billing page. See Migrate to prepay for instructions.

What happens to my Prepaid credits if I switch to Postpay?

When you upgrade to Postpay , Cloud Billing closes your Prepay payments account, turns off auto-reload , and automatically refunds any unused Prepay credits to you (subject to standard refund processing time).

Where can I see my current Prepay credit balance and transaction history?

All balance management and transaction history for the Gemini API must be done directly within the Google AI Studio Billing tab.

Why am I seeing "The billing account type is inactive or unsupported"?

Payments interactions on the AI Studio Billing page may be blocked and replaced with the message "The billing account type is inactive or unsupported" if your selected billing account type or billing account status is not eligible for the Paid Tier in AI Studio.

Check the Cloud Console to see your billing account's status. One ineligible type could be Free trial account , in which case you can activate billing in AI Studio to become eligible. One inactive state could be Closed , in which case you can reopen the account .

Will my Gemini API usage costs show up in the Google Cloud console?

Yes, Gemini API costs, alongside costs associated with any other Google Cloud services that are paid for by your Cloud Billing account, are viewable on the Cost management pages in the Cloud Billing console . Note that you can only manage your Prepay credit balance in AI Studio.

Why isn't my Gemini API Usage showing up in the Cloud Billing Console, when I can see it in AI Studio Billing, along with the consumption of my credits?

Google Cloud and AI Studio report usage data to Cloud Billing at varying intervals. Due to the complexity of our billing and processing systems, you might see a delay between your use of services, and the usage and costs being available to view in Cloud Billing. Typically, your cost details are available within a day, but can sometimes take more than 24 hours. Learn more about delayed billing in the Cloud Billing documentation .

If I use other Google Cloud services with costs that are subject to a Postpay charging cycle, what happens if I miss a payment?

Missing a payment for other Google Cloud services can suspend your Gemini API access in AI Studio, regardless of how many Prepaid credits you have available . AI Studio usage is powered by a Google Cloud Billing account, which can share both Prepay billing for AI Studio and Postpay billing for other Cloud services. An issue with your Postpay balance halts all services tied to that account. Your Gemini API usage will be suspended if your Cloud Billing account is flagged for issues such as:

  • مانده بدهی معوق یا عقب افتاده
  • پرداخت رد شده
  • روش پرداخت نامعتبر یا منقضی شده

To restore service, you must resolve the Postpay account issue in the Google Cloud Billing console. Once you resolve the issue, you will regain access to your Prepaid Gemini API credits and services.

چرا پروژه‌های من پس از لغو تنظیمات Prepay مختل شده‌اند؟

Issue: You started the flow to add Prepay capabilities to an existing Postpay billing account, but closed the window or canceled the process before completing the prepayment setup. Other projects linked to that billing account lost access to the Gemini API.

Cause: During the transition flow, the infrastructure to support Prepay is created on your billing account immediately after you accept the confirmation dialog. If you don't complete the prepayment steps, the configuration remains in an unchargeable state. Because this state applies at the billing account level, it restricts access for all projects linked to that billing account that rely on Prepay services.

Resolution: Because the account state has already changed, there is no automatic way to revert the state if you abandon the payment flow. To restore service to your linked projects, do one of the following:

  • Complete the setup: Return to Google AI Studio, restart the billing setup flow, and complete the prepayment process. After the payment is processed, the Prepay billing plan becomes active and the service is restored.
  • Contact Support: If you don't want to use the Prepay billing plan and want to revert your billing account back to Postpay, contact Cloud Billing Support to manually reset your account state.

Where can I get help with billing?

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

،

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.

درباره صورتحساب و سطوح آن

صورتحساب برای API جمینی بر اساس سابقه پرداخت شما محاسبه می‌شود.

Usage tier صلاحیت سقف ردیف صورتحساب
رایگان Active project or free trial ناموجود
ردیف ۱ یک حساب صورتحساب فعال راه‌اندازی و پیوند دهید ۲۵۰ دلار
ردیف ۲ پرداخت ۱۰۰ دلار + ۳ روز پس از اولین پرداخت موفق ۲۰۰۰ دلار
ردیف ۳ پرداخت ۱۰۰۰ دلار + ۳۰ روز از اولین پرداخت موفق ۲۰،۰۰۰ تا ۱۰۰،۰۰۰ دلار +

New accounts begin on the Free Tier, which allows access to certain models in the Gemini API and AI Studio, up to the models' free tier rate limits .

To deploy your applications directly from Build mode, you can use the Google Cloud Starter Tier . This tier lets you publish up to 2 full stack applications without setting up a Google Cloud project or billing account. See Deploying from Google AI Studio for details and refer to the Google Cloud Starter Tier documentation for more information.

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 and Prepay to move to the Paid Tiers. Then, you'll move through higher tiers based on cumulative spend and account age.

Tiers, rate limits, and billing account caps are all determined at the billing account level.

* Enterprise-grade data privacy: For more information on data use for paid services, see the Terms of Service .

برای دسترسی به ردیف پرداخت‌شده، صورتحساب تنظیم کنید

You can create a project and set up billing, or import an existing project, to upgrade to the Paid Tier in Google AI Studio . Upgrading from the Free Tier to the Paid Tier means linking a billing account and prepaying to add a minimum of $5 (or equivalent in other currencies) of credits to your account.

  1. Go to the AI Studio API keys page, Projects page, or anywhere you see Set up billing button 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.
  2. Find the Free Tier project you want to upgrade to the Paid Tier, and click Set up billing under the Billing Tier column.
  3. اگر قبلاً حساب پرداخت گوگل راه‌اندازی نکرده‌اید:
    • از شما خواسته می‌شود کشور خود را برای موافقت با شرایط خدمات انتخاب کنید.
    • سپس، برای ادامه، اطلاعات تماس و روش پرداخت خود را پر یا تأیید کنید.
  4. اگر قبلاً حساب‌های پرداخت گوگل راه‌اندازی کرده‌اید:
    • از شما خواسته می‌شود از بین حساب‌های صورتحساب موجود خود، یکی را انتخاب کنید.
    • If you don't want to use any of your existing accounts, click Add new billing account and fill in or confirm your contact information and payment method to continue.
  5. در مرحله بعد، شما یکی از موارد زیر خواهید بود:
    • Asked to prepay a minimum of $5 to complete billing setup (meaning your account is auto-assigned to the Prepay billing plan),
    • Given the choice between Prepay and Postpay billing plans for your account.
    • Assigned to a Postpay billing plan for an intermediary period until the new Prepay system propagates to all users (starting March 23, 2026).
  6. After prepaying or selecting Postpay, your account setup is complete.

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 (subject to processing times ).

Verify billing status

After you have linked a billing account to your project, you can monitor its status on the AI Studio Billing page . Unlike the free tier, paid tier status is dynamic; while your usage tier is determined by your account history, the Gemini API will only serve requests if you have a positive Prepay credit balance.

On the Projects page, you'll be able to see your project's tier and billing plan under the Billing Tier column. Any billing status actions you may need to take for a project display in the Billing Tier or Status columns:

  • " Set up billing " if the project doesn't have a billing account attached.
  • " Set up Prepay " if the project does have a billing account attached, but is required to use a Prepay billing plan that needs to be set up.
  • " No credits " if the billing account is required to purchase credits but the Prepay payments account isn't set up or the available credit balance is depleted.

Click any of the messages to proceed with the necessary actions.

نظارت بر میزان استفاده

You can monitor your usage of the Gemini API in Google AI Studio in Dashboard > Usage .

طرح‌های صورتحساب

Billing plans for the Gemini API and AI Studio fall into two categories that determine when you pay for usage: Prepay and Postpay. You can check your assigned billing plan and manage payment methods on the AI Studio Billing page.

پیش‌پرداخت

In the Prepay billing plan, you purchase credits towards your prepay balance in advance of your Gemini API usage, and your API usage costs are deducted from your Prepay credit balance in near real-time . You can prepay by adding credits into your account, or setting up auto-reload . After credits are purchased, unused credits expire after 12 months and are non-refundable , except after switching to a Postpay account .

When your Prepay credit balance on the billing account hits $0, all API keys in all projects linked to that billing account will stop working simultaneously. Requests then fail with an HTTP 402 Payment Required error until you add credits. Prepay credits apply only to Gemini API usage costs; you can't use them to pay for other Google Cloud services.

New users default to the Prepay billing plan. Projects that pre-date the introduction of Prepay and Postpay billing plans may need to update their project's billing details before continuing to use the Gemini API.

Note that Prepay is not available for Invoiced (or Offline) accounts.

Add Prepay to an existing Postpay account

If your existing Cloud Billing account uses a Postpay plan, you can add Prepay capabilities to purchase credits in advance. These prepay credits let you use the Gemini API without creating a new Cloud Billing account.

During the setup to add Prepay to an existing account, you are presented with a mandatory confirmation screen explaining that your selected Cloud Billing account will be modified.

The system must modify your account state before you submit your prepayment. Therefore, canceling the process after confirming the modification but before completing the prepayment setup might result in temporary service disruptions for projects already linked to that Cloud Billing account. Ensure you are ready to complete the prepayment process before confirming the transition. If you encounter issues, see Services disrupted after canceling a Prepay setup .

If you are eligible and manually switch from a Prepay cycle to a Postpay cycle, any remaining prepay credit balance is automatically refunded to the original payment method used for the prepayment. However, if you close your Cloud Billing account for any other reason, any remaining prepay credits are forfeited and aren't refunded.

خرید اعتبار

You can manually purchase credits in advance of your Gemini API usage to load them into your Prepay account credit balance.

To purchase credits, go to the AI Studio Billing page and select Buy credits . The minimum purchase is $5. The maximum amount of credits you can prepay for is $5,000.

بارگیری مجدد خودکار

Auto-reload is an optional feature that automatically tops up your Prepay credit balance when it's running low. This is useful to prevent service interruptions.

You can set up auto reload and see your auto-reload status in the Available credits card on the AI Studio Billing page. Click Setup auto-reload or Manage auto-reload to set your payment method, reload amount, and the minimum balance that triggers a reload payment.

Monthly auto-charge limit

The monthly auto-charge limit is available to Prepay users and helps prevent unexpected costs from frequent automatic credit reloads. Use this feature to set a maximum limit for automatic credit reloads within a single billing cycle. Once the total amount of automatic reloads in a billing cycle reaches this limit, the system disables auto-reload until the start of the next month. One-time payments you initiate manually don't count against this limit.

To set the monthly auto-charge limit when auto-reload is enabled:

  1. Go to the AI Studio Billing page.
  2. Click Manage auto-reload .
  3. Expand the Monthly Limit section and enter the maximum monthly limit for auto-reloads.
  4. روی ذخیره کلیک کنید.

پست‌پی

In the Postpay billing plan, your Cloud Billing account accrues costs and you are automatically charged at the end of the month, or when your costs reach an automatically assigned spend cap based on your account tier. The payment is charged to the payment method attached to your Postpay payments account, which you can manage on the AI Studio Billing page. On the Billing page you'll be able to view your balance, due dates, and past payments, as well as make payments and manage payment methods.

When setting up billing for a new project, if you are eligible for Postpay, you will have the option to choose between Prepay and Postpay in the billing setup dialogue.

After you switch a Cloud Billing account to use the Postpay billing plan, all projects linked to that billing account are switched to the Postpay plan. You can move an eligible account to Prepay by following the steps in Migrate to prepay . You can also move a project to a billing account with a different billing plan to change the charging cycle for that project; visit the Cloud documentation on managing billing for projects .

You can learn more about the Postpay charging cycle in the Cloud Billing guide .

Migrate to prepay

Google AI Studio is transitioning developer accounts from Postpay to Prepay billing for Gemini API usage. This change applies only to the Gemini API; other Google Cloud services linked to your billing account remain on Postpay.

Switch to Prepay and add credits before the cutover date in your account notice to avoid service interruptions. Accounts that use only Free Tier features do not need to take action.

To switch an existing Postpay account to Prepay:

  1. Go to the AI Studio Billing page.
  2. Select Switch to Prepay for your billing account.
  3. Purchase credits (minimum $5) to load your starting balance.

To prevent service interruptions after switching, configure auto-reload to top up your credit balance when it runs low.

سقف هزینه‌ها

The Gemini API supports monthly spend caps at both the billing account tier and project levels. These controls are designed to protect your account from unexpected overages, and the ecosystem to ensure service availability.

Note that spend caps are not available for Invoiced (or Offline) accounts.

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 cumulative 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 .

For details on the specific Google Cloud IAM permissions required to view or edit spend caps and billing information in AI Studio, see the AI Studio troubleshooting guide .

If you move 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.

Long-running tasks like batch mode completions and agent sessions may incur overages beyond your project spend cap.

Billing data processing times can be 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 سقف هزینه
رایگان ناموجود
ردیف ۱ ۲۵۰ دلار
ردیف ۲ ۲۰۰۰ دلار
ردیف ۳ $20,000 - $100,000

Monthly usage caps are enforced for the Gemini API at the billing account level. While default limits are preset, you can request an increase to accommodate higher usage. Total spend is aggregated across all linked projects that have the Gemini API service enabled. After the cumulative account total reaches the tier limit, service is paused for all projects linked to that billing account until the start of the next billing cycle (the 1st of each month).

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:

  1. In the Google Cloud console, view your Cloud Billing account Reports page.
    • If you have more than one billing account, at the prompt, choose the Cloud Billing account for which you'd like to view cost reports.
  2. 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.
  3. To see granular costs limited to Gemini API usage, set the Group by filter to group by SKU , and the Services filter to Gemini API .
  4. Adjust the Time range by usage date filter to your desired range to evaluate your historical spend in a period.

زمان‌های پردازش

Billing signals and updates don't always happen in real time.

  • Credit usage : Usage costs are typically drawn down from your balance within minutes.
  • Payment confirmation : While most card payments are instant, some forms of payment (like bank transfers) may take several days to clear. Services only resume or upgrade after the purchase of credits is officially confirmed.
  • Tier upgrades : After a successful payment, or when you meet the upgrade criteria , tier upgrades usually reflect within 10 minutes.
  • Total Cost breakdown graphs : The graphs showing your total cost breakdown on both the Billing page and the Spend page can take up to 24 hours to update.

Read the Cloud Billing guides on charging cycle and transaction latencies to learn more about potential billing delays.

بازپرداخت‌ها

Refunds aren't allowed for Prepay billing accounts, except when switching account types.

When a Prepay account switches to the Postpay account type (after you meet the criteria and manually upgrade your account), the Prepay account is closed and any remaining prepaid credits are automatically refunded to the payment method on file.

If you close your Prepay account for any reason other than upgrading to Postpay, any remaining prepaid credits are forfeited.

Purchased credits expire after 1 year. After expiration, credits are forfeited and can't be retrieved.

Postpay accounts follow the Google Cloud refund policy .

Cloud Billing accounts

The Gemini API uses Cloud Billing accounts for billing services, which you can set up directly in AI Studio . You can use AI Studio to track spending, understand costs, and make payments.

Tiers, rate limits, and billing account caps are all determined at the billing account level.

Projects and API keys

All projects linked to a Cloud Billing account inherit the billing account's usage tier and associated rate limits and account caps. If you change a project from one billing account to another, its tier, and subsequently rate limits and account caps, will switch to the tier of the new billing account.

Cumulative spend (towards all Google Cloud products) and account age across all projects tied to a billing account counts towards that billing account's tier qualifications .

You can unlink a project from its billing account to return to the free tier.

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.

سوالات متداول

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 .

How do I move to a higher rate limit tier, or request more quota?

You will automatically be granted more quota when your account reaches the next tier requirements .

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 as needed by using the respective API keys linked to each type.

If I'm on the Free Tier, how do I upgrade to higher tiers?

To access higher tiers, you must set up billing on your project. Click Set up billing in Google AI Studio. This will walk you through selecting or creating a Cloud Billing account. If you are required to be on the prepaid billing model, the Set up billing process will guide you through the process to create your Prepay account that is linked to your Cloud Billing account.

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 free-of-charge plans for select models
  • With postpaid plans

Can I revert back to Free Tier after I've upgraded to higher (paid) tiers?

To downgrade to the Free Tier, you can disable billing on each of your projects that you want to downgrade.

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.

If I sign up for my first Cloud Billing account through AI Studio, will I still get a Google Cloud Free Trial?

When you sign up for your first ever Cloud Billing account, your Google Cloud Free Trial starts and you are granted a $300 Welcome credit . However, those credits can't be used to pay for AI Studio usage. You can use the Welcome credit to pay for other eligible services within Google Cloud (note that once those credits are consumed or expire (within 90 days), any additional usage costs are automatically billed to your established form of payment).

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 are allowed to spend your remaining credits on the Gemini API and AI Studio up until the credits expire (after 90 days).

Does the Google Cloud Free Trial apply to Gemini API usage?

No, starting March 2026, Gemini API usage costs are specifically excluded from the $300 Google Cloud Free Trial program.

How do Google Cloud credits work with Prepay?

Prepay users must first purchase Prepaid credits before any eligible Google Cloud credits can be applied to Gemini API usage. Once you have an active Prepay credit balance, Google Cloud credits that are eligible for the Gemini API are consumed before your Prepay credit balance. When your Prepay credit balance on the billing account hits $0, Google Cloud credits will no longer be consumed.

Not all Google Cloud credits, such as the Google Cloud Welcome credit , can be used towards Gemini API and AI Studio.

نحوه رسیدگی به صورتحساب چگونه است؟

Billing for the Gemini API is handled by the Cloud billing system. Learn about the in-product Cloud 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.

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".

What is Prepaid billing and who is required to use the prepaid billing model?

Prepaid billing allows users of Gemini API in AI Studio to pre-purchase credits. Starting Mar 23, 2026, new users to AI Studio might be required to be on the Prepaid billing plan. During the AI Studio Set up Billing process, the UI will guide you through the billing set up flow and will indicate if you are required to prepay.

How do I purchase Prepay credits, and is there a minimum amount or maximum?

You can purchase credits on the AI Studio Billing page. During the purchase process, the UI will provide the minimum pre-purchase amount that is required for your region and tier level, as well as a maximum amount that can be in your account at one time.

Can I configure my Prepay account to automatically purchase more credits as needed?

Yes, we recommend that you configure auto-reload in the AI Studio Billing settings. You specify a "trigger" credit balance (eg, "when my balance falls below $30") and a "reload value" (eg, "add $100").

Can I limit the amount of automatic reload charges?

Yes, Prepay users can set a Monthly Auto-Charge Limit within the Auto-Reload widget. When the total amount of automatic reloads in a billing cycle reaches this limit, the system disables auto-reload until the next month. Manual credit purchases do not count toward this limit.

Can I get a refund for my unused credits?

All Prepaid API credits expire after 1 year and cannot be refunded. Read the refund policy for Prepay accounts .

Do my prepaid credits expire?

Yes, credits expire 12 months after their purchase date.

What happens when my prepaid credit balance hits $0?

All Gemini API services in all projects paid for by that Cloud Billing Prepay account will stop immediately to prevent incurring more charges. Your projects aren't automatically downgraded to the Free Tier.

To restore service at your current Paid Tier level, you must purchase additional credits . After you've purchased credits, you should be able to use the Gemini API. Note that there might be a delay while our systems update to reflect your credit balance.

Optionally, to downgrade to the Free Tier, you can disable billing on the projects you want to downgrade.

Why did my usage stop even though my Prepay credit balance is greater than $0?

You may have hit the usage limit for your current tier. Usage limits will increase automatically as you progress to higher tiers. Your Gemini API AI Studio usage can also be impacted due to the status of your Cloud Billing account .

Why is my Prepay account credit balance negative?

Due to the complexity of our billing and processing systems, there might be delays in our ability to cut off usage after you consume all of your credits. This excess usage might appear as a negative credit balance in your AI Studio billing dashboard. If this happens, your service is paused, and your negative balance will be deducted from your next credit purchase.

To avoid a pause in your Gemini API service, we recommend setting up auto-reload to automatically purchase more credits when your credit balance falls below a value you specify.

Can I use my Prepay credits for other Google Cloud services, like Gemini Enterprise Agent Platform?

No, Prepay credits are strictly locked to Gemini API usage. Any other Google Cloud services you use (Compute, Storage, Gemini Enterprise Agent Platform) are billed using the standard Cloud charging cycle .

Can I switch from Prepay to Postpay billing?

No, switching from a Prepay billing plan to a Postpay billing plan is not supported.

Can I switch from Postpay to Prepay billing?

Yes, you can transition an existing Postpay account on the AI Studio Billing page. See Migrate to prepay for instructions.

What happens to my Prepaid credits if I switch to Postpay?

When you upgrade to Postpay , Cloud Billing closes your Prepay payments account, turns off auto-reload , and automatically refunds any unused Prepay credits to you (subject to standard refund processing time).

Where can I see my current Prepay credit balance and transaction history?

All balance management and transaction history for the Gemini API must be done directly within the Google AI Studio Billing tab.

Why am I seeing "The billing account type is inactive or unsupported"?

Payments interactions on the AI Studio Billing page may be blocked and replaced with the message "The billing account type is inactive or unsupported" if your selected billing account type or billing account status is not eligible for the Paid Tier in AI Studio.

Check the Cloud Console to see your billing account's status. One ineligible type could be Free trial account , in which case you can activate billing in AI Studio to become eligible. One inactive state could be Closed , in which case you can reopen the account .

Will my Gemini API usage costs show up in the Google Cloud console?

Yes, Gemini API costs, alongside costs associated with any other Google Cloud services that are paid for by your Cloud Billing account, are viewable on the Cost management pages in the Cloud Billing console . Note that you can only manage your Prepay credit balance in AI Studio.

Why isn't my Gemini API Usage showing up in the Cloud Billing Console, when I can see it in AI Studio Billing, along with the consumption of my credits?

Google Cloud and AI Studio report usage data to Cloud Billing at varying intervals. Due to the complexity of our billing and processing systems, you might see a delay between your use of services, and the usage and costs being available to view in Cloud Billing. Typically, your cost details are available within a day, but can sometimes take more than 24 hours. Learn more about delayed billing in the Cloud Billing documentation .

If I use other Google Cloud services with costs that are subject to a Postpay charging cycle, what happens if I miss a payment?

Missing a payment for other Google Cloud services can suspend your Gemini API access in AI Studio, regardless of how many Prepaid credits you have available . AI Studio usage is powered by a Google Cloud Billing account, which can share both Prepay billing for AI Studio and Postpay billing for other Cloud services. An issue with your Postpay balance halts all services tied to that account. Your Gemini API usage will be suspended if your Cloud Billing account is flagged for issues such as:

  • مانده بدهی معوق یا عقب افتاده
  • پرداخت رد شده
  • روش پرداخت نامعتبر یا منقضی شده

To restore service, you must resolve the Postpay account issue in the Google Cloud Billing console. Once you resolve the issue, you will regain access to your Prepaid Gemini API credits and services.

چرا پروژه‌های من پس از لغو تنظیمات Prepay مختل شده‌اند؟

Issue: You started the flow to add Prepay capabilities to an existing Postpay billing account, but closed the window or canceled the process before completing the prepayment setup. Other projects linked to that billing account lost access to the Gemini API.

Cause: During the transition flow, the infrastructure to support Prepay is created on your billing account immediately after you accept the confirmation dialog. If you don't complete the prepayment steps, the configuration remains in an unchargeable state. Because this state applies at the billing account level, it restricts access for all projects linked to that billing account that rely on Prepay services.

Resolution: Because the account state has already changed, there is no automatic way to revert the state if you abandon the payment flow. To restore service to your linked projects, do one of the following:

  • Complete the setup: Return to Google AI Studio, restart the billing setup flow, and complete the prepayment process. After the payment is processed, the Prepay billing plan becomes active and the service is restored.
  • Contact Support: If you don't want to use the Prepay billing plan and want to revert your billing account back to Postpay, contact Cloud Billing Support to manually reset your account state.

Where can I get help with billing?

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