THE WORLD IS NOT STANDING STILL.RSS
BIG CHANGE.
BIG CHANGE, one tap away
BIG CHANGE, one tap away

Make room for the big picture.

Add BIG CHANGE to your home screen or desktop. It opens in its own window, with the latest stories when you’re online.

iPhone & iPad
Open bigchange.ai in Safari. Tap Share, then Add to Home Screen. Turn on Open as Web App if shown, then tap Add.
Android
Open bigchange.ai in Chrome. In the browser menu, choose Install app or Add to Home screen.
Desktop
In Chrome or Edge, use the install icon in the address bar or the browser’s app menu. In Safari on Mac, choose File → Add to Dock.

Markdown edition

# Set BigQuery AI token quotas before a large SQL job

> A documented setup sequence for BigQuery administrators: set project and per-user input and output token limits, check a small AI query, and identify rows affected by quota exhaustion.

By BIGCHANGE.AI Editorial

Published: 2026-10-15T09:39:18.471Z
Updated: 2026-10-15T09:39:18.471Z
Canonical: https://bigchange.ai/blog/bigquery-ai-token-quotas-guide

![A wooden abacus has four horizontal rods of charcoal beads, with one orange bead near the right side of each rod.](https://bigchange.ai/api/media/file/bigquery-four-token-limits-abacus-v1.png)
AI-generated conceptual illustration by BIG CHANGE. No actual BigQuery project, console screen or observed token usage is depicted.

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](https://cloud.google.com/blog/products/data-analytics/using-bigquerys-generative-ai-cost-management-features), 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](https://docs.cloud.google.com/bigquery/docs/control-genai-costs). 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](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-generate) 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](https://docs.cloud.google.com/bigquery/docs/control-genai-costs) 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

1. 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.
2. 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.
3. 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.
4. Estimate input volume before the large run. Google's [`AI.COUNT_TOKENS` reference](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-count-tokens) 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. Its `result` can be null on null input or an API error, so do not silently treat null as zero.
5. Run one deliberately small generation call with approved data. This illustrative one-call SQL preflight uses BigQuery's default model:

```sql
   SELECT AI.GENERATE(
     'Classify this approved sample text as positive, negative, or neutral'
   ) AS generation;
```

   The [function reference](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-generate) 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.

6. Open the query's **Job information** tab to read actual input and output token counts, as directed by the [token-count reference](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-count-tokens). 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](https://docs.cloud.google.com/bigquery/docs/control-genai-costs) 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](https://cloud.google.com/blog/products/data-analytics/using-bigquerys-generative-ai-cost-management-features) 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](https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps) 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.

## Sources

- [Google Cloud Blog, Predictable AI spend in BigQuery: Introducing cost management for generative AI functions](https://cloud.google.com/blog/products/data-analytics/using-bigquerys-generative-ai-cost-management-features) — Dated primary tutorial for four quota controls, console steps, role access, covered functions, usage charts and partial-row behavior. Calls GA recent without dating the GA event.
- [Google Cloud BigQuery, Control costs with token quotas](https://docs.cloud.google.com/bigquery/docs/control-genai-costs) — Maintained quota reference, last updated October 13 UTC. Defines scope, defaults, Pacific reset, global aggregation, precision limits, overrides and execution errors.
- [Google Cloud BigQuery, The AI.COUNT_TOKENS function](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-count-tokens) — Preview utility reference, last updated October 13 UTC. Specifies input-only estimate, possible null result, no Vertex AI generation charge and Job information token readback.
- [Google Cloud BigQuery, The AI.GENERATE function](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-ai-generate) — Current function reference, last updated October 13 UTC. Documents credential options, prompt form and result/full_response/status fields; no BIG CHANGE execution.
- [Google Cloud Billing, Manage spend cap budgets](https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps) — Dollar spend-cap reference, last updated October 13 UTC. Eligible-service scope and delayed enforcement distinguish it from BigQuery token quotas.