CertSafari
    Snowflake SnowPro Specialty: Gen AI (GES-C02)· Lessons

    Domain 3 · Lesson 10/15

    What Snowflake Cortex bills for: tokens, search, agents and compute pools

    Manage, monitor, and optimize Snowflake Cortex costs.

    12 min read
    7.25% of exam
    6 sources
    Published 21 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Work out which tokens an AI function call is billed for, and why the billed count is higher than the text you send
    • List the cost categories of a Cortex Search service and choose the lever that cuts each one
    • Explain how Cortex Analyst is metered and what a Cortex Agent token budget does and does not cap
    • Say which compute pool states bill credits and how auto-suspend stops idle spend

    Key concept

    Consumption-based Cortex billing — Every Cortex feature bills by a unit of work that it measures itself: tokens for AI functions, embedded tokens plus indexed gigabyte-months for Search, messages for Analyst, and node time for compute pools. The warehouse that runs the query is billed on top of these. Controlling cost means knowing which unit a feature uses and what makes that unit grow.

    1.Billable tokens for Cortex AI functions

    Cortex AI functions bill in tokens, priced in credits per million tokens at the rate of the function and model you call. A token is roughly four characters of text, although the exact figure depends on the model. Row count only sets how many calls you make. What each call costs depends on how many tokens it moves, so a nightly job over the same 500 rows can get more expensive just because its prompts or outputs got longer.

    Generative functions bill both directions. That covers AI_COMPLETE, AI_CLASSIFY, AI_FILTER, AI_AGG, AI_SUMMARIZE and AI_TRANSLATE, so a long prompt that asks for a long answer pays twice. Cortex Guard counts only input tokens, but its input is the output of AI_COMPLETE, and it is billed in addition to that call. AI_EXTRACT and AI_REDACT also count input and output. Document parsing is the exception to token billing: AI_PARSE_DOCUMENT bills per page processed.

    Which units each kind of AI function is billed on
    FunctionBilled on
    AI_COMPLETE, AI_CLASSIFY, AI_FILTER, AI_AGG, AI_SUMMARIZE, AI_TRANSLATEInput and output tokens
    AI_EMBED, AI_SIMILARITY, SNOWFLAKE.CORTEX.EMBED_*Input tokens only
    Cortex GuardInput tokens (the AI_COMPLETE output), on top of the AI_COMPLETE charge
    EXTRACT_ANSWERTokens in from_text plus question
    AI_EXTRACTInput and output tokens; responseFormat counts as input; each page counts as 970 tokens
    AI_PARSE_DOCUMENTDocument pages processed
    Audio input50 tokens per second of audio

    You are billed for tokens you never typed. AI_CLASSIFY, AI_FILTER, AI_AGG, AI_SENTIMENT, AI_SUMMARIZE_AGG, AI_TRANSLATE, EXTRACT_ANSWER and the sentiment functions wrap your text in a prompt of their own, and that prompt is billed as input. AI_CLASSIFY makes this worse because its labels, descriptions and examples are counted again for every record. Twenty verbose label descriptions across a million rows is a large bill. Two short labels is a small one.

    The levers follow directly from this. Trim prompts and label text, ask for short outputs, and before a large batch run AI_COUNT_TOKENS on a representative sample. That call costs only the compute to run it, with no token charge, so you can multiply the per-row count by the row count and the model's rate before you commit. When output quality is already acceptable, moving to a smaller model is the other big lever, because rates differ by model (Choosing an LLM: latency, capability and cost trade-off).

    Checkpoint 1 of 6· Check yourself

    A team expands an AI_CLASSIFY job from two short labels to twenty labels, each with a detailed description and examples, and runs it over one million rows. How does this change the token bill?

    Checkpoint 2 of 6· Exam question

    A platform team runs AI_COMPLETE against a 500-row table every night to generate short product summaries. Monthly Cortex spend has grown far faster than the row count. Which factor is the most likely primary driver of the token-based charge for this workload?

    Sources1

    2.Cortex Search cost categories and how to cut each one

    A Cortex Search service bills in several places at once, and each has its own lever. The warehouse you give it refreshes the service: it runs the source query and orchestrates embedding and index builds. Embedding bills per token through EMBED_TEXT_768 or EMBED_TEXT_1024, but only for rows that are added or changed. Serving runs on separate multi-tenant compute and bills per GB-month of uncompressed indexed data. Storage holds the materialized source query and index structures at a flat rate per TB. Cloud services detect changes, and they are billed only when daily cloud services cost exceeds 10% of daily warehouse cost.

    Both of the variable charges can be estimated in advance. Embedding a 10-million-row source at 500 tokens per row, with a model at 0.05 credits per million tokens, costs 250 credits for the initial refresh. Serving the same 10 million rows with 768-dimension vectors (4 bytes per dimension) and about 1,000 bytes per row, at 6.3 credits per GB-month, costs about 256.5 credits every month. Add a second 768-dimension vector index and serving rises to about 448.1 credits, because each index stores its own vectors.

    Cortex Search cost drivers and the lever for each
    Cost categoryWhat makes it growLever
    Virtual warehouse computeLow target lag, high change rate, oversized warehouseSet target lag to when consumers actually query; most services need MEDIUM and gain nothing past LARGE
    EMBED_TEXT tokensRows inserted or updated; full refreshesDefine primary keys; bundle changes into fewer updates; use MERGE INTO instead of CREATE OR REPLACE; avoid source-query schema changes
    Serving computeRows, bytes per row, vector dimensions, number of vector indexesSuspend serving when idle or set AUTO_SUSPEND
    StorageSize of the materialized source query and indexEstimate with CORTEX_SEARCH_DATA_SCAN
    Cloud servicesChange tracking on base objectsBilled only above 10% of daily warehouse cost

    Full re-embeds are the expensive mistake. Changing the source query's schema forces a full refresh of embeddings and indexes. So does rebuilding the source table with CREATE OR REPLACE. Even a change to a non-search column re-embeds that row's search column. If you add spare payload columns when you create a large service, a later column need won't trigger a rebuild. Suspend indexing, or raise target lag, during periods when freshness doesn't matter. To get a cost baseline, run the service on a dedicated warehouse first so its refresh consumption can be isolated, then move it to a shared warehouse.

    Checkpoint 3 of 6· Match them up

    A Cortex Search service bills in five places at once. Match each cost category to how it is charged.

    Tap a term, then the definition that fits it.

    Sources2

    3.Cortex Analyst message billing and Cortex Agent budgets

    Cortex Analyst is metered by message, not by token. Each message processed is billed at the rate in the consumption table. Its usage view records both REQUEST_COUNT and CREDITS per hourly window and per user, so dividing credits by request count over a week gives an effective cost per request. A short question and a long one count as the same number of messages.

    A Cortex Agent can be given a budget made of a time limit and a token limit. When either limit is reached, the agent stops generating its response, which bounds runaway multi-step reasoning. The token limit covers orchestration only. Tokens spent by Cortex Analyst, Cortex Search or any other tool the agent calls are outside it and are billed by those services on their own terms. One agent request that uses both Analyst and Search therefore produces orchestration tokens, Analyst messages and Search consumption, all billed separately.

    Checkpoint 4 of 6· Check yourself

    A FinOps lead wants one control that caps the total credits a Cortex Agent consumes, including the Cortex Analyst and Cortex Search calls it makes on each request. What should they configure?

    Sources34

    4.Compute pool billing for Snowpark Container Services

    Models you run yourself on Snowpark Container Services execute on a SPCS compute pool, a set of VM nodes. The pool bills credits according to how many nodes it has and their instance family. A GPU family costs more per node than a CPU one, so the pool's size and family are the first cost decision.

    What a pool costs depends on its state, not on traffic. A pool in IDLE, ACTIVE, STOPPING or RESIZING state bills credits. A pool in STARTING or SUSPENDED state does not. An IDLE pool serving no requests overnight bills just as an ACTIVE one does, so the fix is AUTO_SUSPEND, which moves an inactive pool to SUSPENDED. Storage around the pool, such as the image repository stage, event-table logs, mounted stages and block storage, is billed separately at the normal storage rates.

    Compute pool states and whether they bill
    StateBills credits?
    IDLEYes
    ACTIVEYes
    STOPPINGYes
    RESIZINGYes
    STARTINGNo
    SUSPENDEDNo

    Checkpoint 5 of 6· Check yourself

    Overnight, the GPU compute pool that hosts a self-run model on Snowpark Container Services gets no requests and sits in the IDLE state. What happens to its cost, and what is the right fix?

    Checkpoint 6 of 6· Exam question

    A team deploys a fine-tuned embedding model on Snowpark Container Services using a dedicated compute pool. Finance asks why the pool is billing credits even overnight when no inference requests are being sent. What is the most likely explanation?

    Sources5

    Sources

    (6)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “both input and output tokens are billable.”
      ↩︎ Billable tokens for Cortex AI functions
      “As a result, the billed token count is higher than the number of tokens in the text you provide.”
      ↩︎ Billable tokens for Cortex AI functions
      “AI_COUNT_TOKENS incurs only compute cost to run the function.”
      ↩︎ Billable tokens for Cortex AI functions
      “Snowflake recommends using a warehouse size no larger than MEDIUM when calling Snowflake Cortex AI Functions.”
      ↩︎ Billable tokens for Cortex AI functions
      “billing is based on the number of document pages processed.”
      ↩︎ Billable tokens for Cortex AI functions
      “Snowflake Cortex AI functions incur compute cost based on the number of tokens processed.”
      ↩︎ Key concept
      “AI_CLASSIFY labels, descriptions, and examples are counted as input tokens for each record processed, not just once for each AI_CLASSIFY call.”
      ↩︎ Exam trap 1
      “For AI_SIMILARITY, AI_EMBED, and the SNOWFLAKE.CORTEX.EMBED_* functions, only input tokens are counted.”
      ↩︎ Prediction
      “AI_CLASSIFY labels, descriptions, and examples are counted as input tokens for each record processed, not just once for each AI_CLASSIFY call.”
      ↩︎ Checkpoint
    2. 2.
      “the embedding cost is only incurred for added or changed documents.”
      ↩︎ Cortex Search cost categories and how to cut each one
      “Most services do not see improved indexing performance beyond a LARGE warehouse and many need only MEDIUM.”
      ↩︎ Cortex Search cost categories and how to cut each one
      “Any change to the schema of the source query causes a full refresh of the service, including vector embeddings and indexes.”
      ↩︎ Cortex Search cost categories and how to cut each one
      “Cortex Search Services with lower target lag values and higher change rates on underlying data will incur higher Warehouse-related compute costs.”
      ↩︎ Cortex Search cost categories and how to cut each one
      “test Cortex Search using dedicated warehouses so that the virtual warehouse consumption attributed to Cortex Search refreshes can be isolated.”
      ↩︎ Cortex Search cost categories and how to cut each one
      “set the AUTO_SUSPEND property so that serving is suspended after a period of inactivity and resumed when the next query arrives”
      ↩︎ Exam trap 2
      “You incur these costs while the service is available to respond to queries, even if no queries are served during a given period.”
      ↩︎ Prediction
      “Embeddings are processed incrementally in the evaluation of the source query, so the embedding cost is only incurred for added or changed documents.”
      ↩︎ Checkpoint
    3. 3.
      “Credit rate usage is based on the number of messages processed”
      ↩︎ Cortex Analyst message billing and Cortex Agent budgets
      “REQUEST_COUNT | NUMBER | The number of messages sent to Cortex Analyst.”
      ↩︎ Cortex Analyst message billing and Cortex Agent budgets
    4. 4.
      “After either one of the limits is reached, the agent will stop generating a response.”
      ↩︎ Cortex Analyst message billing and Cortex Agent budgets
      “Token limits are used only for orchestration”
      ↩︎ Exam trap 3
    5. 5.
      “The number and type (instance family) of the nodes in the compute pool”
      ↩︎ Compute pool billing for Snowpark Container Services
      “To optimize compute pool expenses, you should leverage the AUTO_SUSPEND feature”
      ↩︎ Compute pool billing for Snowpark Container Services
      “in the IDLE, ACTIVE, STOPPING, or RESIZING state, but not when it is in a STARTING or SUSPENDED state”
      ↩︎ Exam trap 4
      “IDLE, ACTIVE, STOPPING, or RESIZING state, but not when it is in a STARTING or SUSPENDED state”
      ↩︎ Checkpoint

    Also cited

    Continue to part 2 of 2

    Tracking and capping Cortex spend with usage views, alerts and budgets

    Spotted a mistake, or was something unclear? Tell us.