BigQuery administrators can now set daily token limits for Gemini-backed generative AI functions at both project and per-user scope. Google described the controls in an October 14 tutorial, following what it called a recent general availability announcement. The tutorial did not give that announcement a date. This guide follows Google's BigQuery quota documentation, updated October 13. BIG CHANGE reviewed the documentation; we did not change a cloud project or run a query.
The big change
- What changed: A project administrator can set separate daily input and output token ceilings for a project and for each user within it. Usage is counted across regions, so moving a query to another region does not create a fresh allowance.
- Why it matters: An analytics team can limit the token volume of SQL functions that call Gemini before a table-wide job starts. The per-user ceiling also keeps one person's work from consuming the whole project's allowance. These limits govern tokens, while the bill still depends on the model and other BigQuery charges.
- What to watch: A job that reaches a quota during execution can leave rows without generated values, or fail under a function's error-ratio setting. The operational check is therefore the row status and actual token usage, not merely whether BigQuery says the query succeeded.
Before you change a quota
This guide is for a BigQuery project administrator and an analytics engineer preparing a Gemini-backed SQL workload. You need a Google Cloud project with billing and access to the table and AI function you intend to use. To edit quotas, Google says the administrator needs Owner, Editor, Quota Administrator (roles/servicemanagement.quotaAdmin), or Service Usage Admin (roles/serviceusage.serviceUsageAdmin). The person running AI.GENERATE also needs the function's documented model access; Google's function reference describes end-user credentials or a configured connection and an Agent Platform User role in its examples.
Choose the project, identify who will run the job, and note the model and region before changing a limit. Review the data in the prompt for personal, confidential or regulated information under your organization's rules. A token ceiling controls consumption; it does not decide whether sending a row to a model is appropriate. Keep a human review step for generated classifications or text before using them in consequential decisions.
Google's quota table lists four controls: project and per-user daily limits for input tokens, and project and per-user daily limits for output tokens. Output includes the model's internal reasoning tokens. The default limits are very large: 200 billion project input, 150 billion per-user input, 20 billion project output and 15 billion per-user output tokens per day. They reset at midnight Pacific time and aggregate usage across regions. Google says cached tokens do not count. It also warns that quotas are tracked in million-token increments, so a limit below a few million might not be reflected precisely.
Configure and check the limits
- In the Google Cloud console, open IAM & Admin → Quotas & System Limits. Filter the list to Service: BigQuery API. Search for an AI quota such as
GenAiInputTokensPerDay, then locate the other input, output, project and per-user controls. Record the four displayed values before editing. - For each limit you intend to lower, select Edit, enter the new value in the Quota changes pane, and submit the request. Google documents a stricter limit as a quota override. A request to raise a limit can require review; do not assume an increase has taken effect until the console shows it. Set both input and output limits for the project and the relevant per-user scope. A lower per-user limit can protect the remaining project allowance from one account.
- Reopen the four entries and check the displayed limits. The success check at this stage is the console's current values, not the fact that the submission form closed. Google's October 14 tutorial says lowering a quota takes effect immediately; a higher limit may need approval.
- Estimate input volume before the large run. Google's
AI.COUNT_TOKENSreference describes a count over the actual prompt text and lets you specify the model endpoint used for tokenization. Use it on representative rows or the intended input column, then add the counts. The function is labeled preview. It counts the supplied input text without a Vertex AI generation charge, but it does not include output, thinking tokens, instructions the AI function adds, or non-text inputs. Itsresultcan be null on null input or an API error, so do not silently treat null as zero. - Run one deliberately small generation call with approved data. This illustrative one-call SQL preflight uses BigQuery's default model:
SELECT AI.GENERATE(
'Classify this approved sample text as positive, negative, or neutral'
) AS generation; The function reference says the result is a struct with result, full_response and status. Specify an endpoint if you need a particular supported model. BIG CHANGE did not run this query. Check that status is empty and the expected output is present. The exact prompt and model choice for a production query should follow your own task and data policy.
- Open the query's Job information tab to read actual input and output token counts, as directed by the token-count reference. Compare them with the estimate and inspect the BigQuery quota page's usage chart before scaling the job. The expected output is a visible limit, an observed small-run token count and a result whose row status you checked.
When a limit is reached
If a needed daily quota is already exhausted when a query starts, BigQuery rejects the query with QuotaExceeded. If it runs out during execution, new model calls stop. Remaining rows that needed a model call encounter a quota error. Google's enforcement documentation says functions with max_error_ratio, such as AI.IF, can return partial results when the error share stays within the configured threshold; otherwise the query fails. Google's tutorial says general-purpose AI.GENERATE can still return a successful query while skipped rows have no generated value and their status contains the quota error. Treat each nonempty status and missing result as unprocessed work. Do not count those rows as completed classifications or fill them with guessed values.
Record the affected row IDs and statuses before any retry. Reduce the batch or wait for the daily reset, then recheck the active quota and usage. Raise a limit only through the documented approval path and after reviewing the budget and source data. Re-run only the rows that failed, with a fresh status check, so completed rows are not billed again by an indiscriminate full-table retry. This recovery sequence is editorial guidance based on Google's row-level behavior; BIG CHANGE has not verified it in a live project.
What the limit does not cap
These controls apply to the documented Gemini-backed generative AI SQL functions, including AI.GENERATE, AI.IF, AI.CLASSIFY, AI.SCORE and generation variants. Google's October 14 list excludes embedding functions such as AI.EMBED. Check the current function reference before assuming another workload is covered. Token quotas also do not set a fixed dollar amount: models have different input and output rates, and BigQuery processing can add charges. Google's separate Cloud Billing spend-cap documentation covers eligible services at a dollar threshold and says enforcement is not instantaneous, so overages can still be billed. Check service eligibility and current pricing rather than converting a token quota into a guaranteed bill.



