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.
| Function | Billed on |
|---|---|
| AI_COMPLETE, AI_CLASSIFY, AI_FILTER, AI_AGG, AI_SUMMARIZE, AI_TRANSLATE | Input and output tokens |
| AI_EMBED, AI_SIMILARITY, SNOWFLAKE.CORTEX.EMBED_* | Input tokens only |
| Cortex Guard | Input tokens (the AI_COMPLETE output), on top of the AI_COMPLETE charge |
| EXTRACT_ANSWER | Tokens in from_text plus question |
| AI_EXTRACT | Input and output tokens; responseFormat counts as input; each page counts as 970 tokens |
| AI_PARSE_DOCUMENT | Document pages processed |
| Audio input | 50 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?
AI_CLASSIFY counts its labels, descriptions and examples as input tokens for each record, not once per call. A long label set therefore adds to the cost of every one of the million rows, so you should keep label text short.
“AI_CLASSIFY labels, descriptions, and examples are counted as input tokens for each record processed, not just once for each AI_CLASSIFY call.”Source: docs.snowflake.com
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?
Correct answer: A — The combined size of the input prompt and the generated output text on every call
- A. Generative Cortex functions bill by token, counting both the prompt sent in and the completion produced, so longer prompts or verbose responses directly raise the credit charge per call.
- B. Warehouse count affects SQL compute billing but AI_COMPLETE token charges are billed independently of how many virtual warehouses happen to be active.
- C. The number of databases holding the source data has no bearing on how many tokens a generative function processes per call.
- D. Open worksheets are a client-side UI detail and do not factor into the token accounting for a scheduled function call.
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.
| Cost category | What makes it grow | Lever |
|---|---|---|
| Virtual warehouse compute | Low target lag, high change rate, oversized warehouse | Set target lag to when consumers actually query; most services need MEDIUM and gain nothing past LARGE |
| EMBED_TEXT tokens | Rows inserted or updated; full refreshes | Define primary keys; bundle changes into fewer updates; use MERGE INTO instead of CREATE OR REPLACE; avoid source-query schema changes |
| Serving compute | Rows, bytes per row, vector dimensions, number of vector indexes | Suspend serving when idle or set AUTO_SUSPEND |
| Storage | Size of the materialized source query and index | Estimate with CORTEX_SEARCH_DATA_SCAN |
| Cloud services | Change tracking on base objects | Billed 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.
Each category grows for a different reason, so each has its own lever. You cut warehouse cost with target lag and size, embedding cost by avoiding full refreshes, and serving cost by suspending serving. Storage is a flat rate, and cloud services are usually absorbed by the 10% threshold.
“Embeddings are processed incrementally in the evaluation of the source query, so the embedding cost is only incurred for added or changed documents.”Source: docs.snowflake.com
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.
The token limit caps only orchestration tokens. Tool calls to Analyst and Search are billed under their own metering, so to cap the agent's total spend you need a resource budget on the agent object rather than the token limit.
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?
The agent's token and time limits only bound orchestration. Analyst messages and Search consumption are metered separately, outside those limits. A resource budget is applied to the agent object and tracks the agent's aggregated credit consumption, so it is the control for total agent spend.
“Resource budgets give you control over the credits consumed at an aggregated level for that specific Agent.”Source: docs.snowflake.com
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.
| State | Bills credits? |
|---|---|
| IDLE | Yes |
| ACTIVE | Yes |
| STOPPING | Yes |
| RESIZING | Yes |
| STARTING | No |
| SUSPENDED | No |
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?
A compute pool's cost depends on its state, not on traffic. IDLE bills credits just as ACTIVE does, but SUSPENDED and STARTING do not. AUTO_SUSPEND moves an inactive pool to SUSPENDED and stops the node charges.
“IDLE, ACTIVE, STOPPING, or RESIZING state, but not when it is in a STARTING or SUSPENDED state”Source: docs.snowflake.com
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?
Correct answer: A — The compute pool is in the IDLE state, which is billed just like ACTIVE, so it keeps accruing charges until it is suspended
- A. Compute pools are billed while IDLE, ACTIVE, STOPPING, or RESIZING, so an idle pool with no traffic keeps consuming credits until AUTO_SUSPEND or a manual suspend stops it.
- B. Billing is based on node uptime across the states listed above, not a one-time charge tied to the initial image pull.
- C. Charges are not automatically waived when traffic drops; the pool must actually transition to SUSPENDED for billing to stop, which requires configuration such as AUTO_SUSPEND.
- D. SUSPENDED is explicitly a non-billed state regardless of node type, so this describes the opposite of how the pool is actually charged.
Sources5
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 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.https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-search/cortex-search-costsOfficial docs
“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.
“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.
“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.https://docs.snowflake.com/en/developer-guide/snowpark-container-services/accounts-orgs-usage-viewsOfficial docs
“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
- https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-resource-budgetsOfficial docs
“Resource budgets give you control over the credits consumed at an aggregated level for that specific Agent.”
↩︎ Checkpoint