Why Is Snowflake Cortex Code So Expensive? What Drives the Credits (2026)
Cortex Code credits come from tokens. Snowflake bills Cortex Code in AI Credits per million tokens. The rate depends on the model and on four token types: input, cache write, cache read and output. For Claude Sonnet 4.6 in Snowflake’s Service Consumption Table, output costs five times input, and a cache read costs about a tenth of input. Any SQL it runs bills separately on your warehouse. Every fact and figure in this guide was checked against Snowflake’s documentation.
This article is part of our guide to Snowflake Cortex AI costs.
Snowflake’s docs now call Cortex Code “Snowflake CoCo“. This guide keeps the older name, which the daily-limit parameters, per-surface views and billing service types still use. The combined view, SNOWFLAKE_COCO_USAGE_HISTORY, uses the new name.
How does Snowflake bill Cortex Code?
Snowflake bills Cortex Code in AI Credits per million tokens, at the rates in Table 6(e) of its Service Consumption Table. The rate depends on the model and the token type. An on-demand AI Credit costs $2.00 with global routing and $2.20 with regional routing, whatever your edition or region. Partial millions are billed proportionally.
Three rules set the price per credit:
- AI Credits are their own unit. Snowflake’s AI pricing page keeps them apart from Platform Credits, which pay for warehouses and other compute.
- Routing sets the price.
CORTEX_ENABLED_CROSS_REGIONset toANY_REGIONor a cloud-wide value such asAWS_GLOBALcounts as global. A regional value such asAWS_USorAWS_EUcounts as regional.DISABLEDis also regional, but Cortex Code requires cross-region inference. - Contracts change the price, not the tokens. Table 2(b) lowers the capacity AI Credit price by contract size, down to $1.88 with global routing at the top tier.
What counts as input, output and cache tokens?
Output tokens are what the model writes back. Input is what it reads. Snowflake’s context management page says the context window holds your messages, the agent’s replies, tool results, and any instructions or files in scope. The usage view splits input into plain input, cache writes and cache reads, each with its own rate.
For Claude Sonnet 4.6, output costs 5x the input rate, a cache write 1.25x, and a cache read about 10%.
Session setup adds tokens too. The CLI’s code mode sends fewer tokens per turn because it ships a smaller tool set and system prompt. So loaded tools and instructions count toward each turn. Code mode turns off Snowflake data tools, however, so it suits coding work only. In Desktop, /compact replaces earlier turns with a summary.
Snowflake’s Cortex Code docs do not say when the cache is used, or how a turn’s input splits across these three. So measure your split from the usage view.
How much does the model change Cortex Code credits?
The model sets every rate. Among generally available models, Claude Opus 4.6 charges five times the input rate of Claude Haiku 4.5. Users pick one with /model in the CLI or the model picker. By default, every user’s role can use all of them, if the model is reachable from your region.
| Model | Input | Cache write | Cache read | Output |
|---|---|---|---|---|
| claude-haiku-4-5 | 0.55 | 0.688 | 0.055 | 2.75 |
| claude-sonnet-5 | 1.10 | 1.375 | 0.11 | 5.50 |
| claude-sonnet-4-6 | 1.65 | 2.07 | 0.17 | 8.25 |
| claude-opus-4-6 | 2.75 | 3.44 | 0.28 | 13.75 |
AI Credits per one million tokens, Table 6(e), effective November 12, 2026. All four are generally available in Cortex Code on Snowflake’s model availability page. Claude Sonnet 5 costs about a third less than Sonnet 4.6 per token type.
Snowflake labels Auto Intelligent the highest cost option. Plain auto currently maps to a fixed default model that the docs do not name, so you cannot price it in advance. Some rows in Table 6(e) are marked Preview or carry promotional prices that Snowflake says will rise on set dates, so check the footnotes.
What does one Cortex Code session cost?
Take an illustrative session of 3,060,000 tokens on Claude Sonnet 4.6. It costs 1.829 AI Credits, or $3.66 on demand with global routing, in any edition or region. The same tokens cost 0.605 AI Credits on Haiku 4.5, 1.21 on Sonnet 5 and 3.038 on Opus 4.6. Output is 2% of the tokens but 27% of the credits.
Illustrative token counts, at the Sonnet 4.6 rates in Table 6(e):
- Input: 300,000 tokens at 1.65 = 0.495 AI Credits
- Cache write: 200,000 tokens at 2.07 = 0.414 AI Credits
- Cache read: 2,500,000 tokens at 0.17 = 0.425 AI Credits
- Output: 60,000 tokens at 8.25 = 0.495 AI Credits
- Total: 3,060,000 tokens = 1.829 AI Credits
With regional routing, the session costs $4.02. With global routing, it costs $1.21 on Haiku 4.5, $2.42 on Sonnet 5 and $6.08 on Opus 4.6.
Cache reads are 82% of the tokens but only 23% of the credits. At the input rate, those 2,500,000 tokens would be 4.125 AI Credits, not 0.425. Volume adds up, too. Illustratively, five such sessions a working day for 21 days is about 192 AI Credits, or $384.09 on demand with global routing.
Does Cortex Code also use warehouse credits?
Yes, when it runs SQL. For the CLI and Desktop, Snowflake says compute or storage used separately from Cortex Code “is billed at standard Snowflake on-demand rates”; check your order form for the price that applies to you. The CLI can execute SQL directly against your warehouse. The Cortex Code usage view does not include that compute.
A standard warehouse bills Platform Credits per second, with a 60-second minimum each time it starts or resumes. An X-Small Gen2 warehouse on AWS uses 1.35 an hour (Table 1(b)). Illustratively, 15 minutes of runtime is 0.3375 Platform Credits, or $1.01 on Enterprise in AWS US East, on demand. Never add these to AI Credits.
The usage view has no query ID column, so it cannot name the queries a session ran. QUERY_ATTRIBUTION_HISTORY shows warehouse cost by user, for all of that user’s queries, not only Cortex Code’s. It lags up to eight hours and skips idle time and queries of about 100 ms or less. For query efficiency, see cost guardrails for AI-generated SQL.
How do you see which driver is behind your bill?
Start with METERING_HISTORY to compare Cortex Code with warehouse spend by day. Then split the Cortex Code view by model, routing, token type, user and surface. The usage view lags up to an hour, and METERING_HISTORY up to three hours, or six for its cloud services part. Use the USAGE_VIEWER role, per the Account Usage page.
An April 2026 release note names the CORTEX_CODE_CLI and CORTEX_CODE_SNOWSIGHT service types, and the AI cost governance page lists SNOWFLAKE_COCO. Snowflake’s metering and governance pages list no Desktop type, so the first query does not filter by type.
-- Role: USAGE_VIEWER database role, or imported privileges on the SNOWFLAKE database.
-- Credits per day by service type, last 30 days. Up to 3 hours behind, 6 for the cloud services part.
-- CREDITS_USED is before the daily cloud services adjustment. Do not add AI and warehouse rows together.
SELECT DATE_TRUNC('day', start_time) AS usage_day,
service_type,
SUM(credits_used) AS credits
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
WHERE start_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
GROUP BY usage_day, service_type
ORDER BY usage_day DESC, credits DESC;
SNOWFLAKE_COCO_USAGE_HISTORY has one row per request. TOKENS_GRANULAR and CREDITS_GRANULAR split it by model and token type, and METADATA records the routing.
-- Role: USAGE_VIEWER database role, or imported privileges on the SNOWFLAKE database.
-- Cortex Code tokens and credits by model, routing and token type, last 30 days. Up to 1 hour behind.
-- routing is NULL on rows recorded before Snowflake added the field.
SELECT m.key AS model,
h.metadata:inference_region::STRING AS routing,
COUNT(DISTINCT h.request_id) AS requests,
SUM(GET(GET(h.tokens_granular, m.key), 'input')::NUMBER) AS input_tokens,
SUM(GET(GET(h.tokens_granular, m.key), 'cache_write_input')::NUMBER) AS cache_write_tokens,
SUM(GET(GET(h.tokens_granular, m.key), 'cache_read_input')::NUMBER) AS cache_read_tokens,
SUM(GET(GET(h.tokens_granular, m.key), 'output')::NUMBER) AS output_tokens,
SUM(m.value:input::FLOAT) AS input_credits,
SUM(m.value:cache_write_input::FLOAT) AS cache_write_credits,
SUM(m.value:cache_read_input::FLOAT) AS cache_read_credits,
SUM(m.value:output::FLOAT) AS output_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.SNOWFLAKE_COCO_USAGE_HISTORY h,
LATERAL FLATTEN(input => h.credits_granular) m
WHERE h.usage_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
GROUP BY model, routing
ORDER BY model, routing;
-- Top 20 user and surface pairs by Cortex Code credits, last 30 days, with averages per request. Up to 1 hour behind.
SELECT user_name,
interface,
COUNT(*) AS requests,
SUM(token_credits) AS credits,
SUM(token_credits) / COUNT(*) AS credits_per_request,
SUM(tokens) / COUNT(*) AS tokens_per_request
FROM SNOWFLAKE.ACCOUNT_USAGE.SNOWFLAKE_COCO_USAGE_HISTORY
WHERE usage_time >= DATEADD('day', -30, CURRENT_TIMESTAMP())
GROUP BY user_name, interface
ORDER BY credits DESC
LIMIT 20;
The governance page lists the combined view next to the CLI and Snowsight views. Do not add their totals, because the combined view already holds the per-surface rows.
Is Cortex Code really this expensive, or are you using it wrong?
Snowflake’s documented cost drivers are choices you can see and change. Read the query results against five levers: the model, the output it writes, the input each request carries, global or regional routing, and the warehouse time behind its SQL.
Scheduled Cortex Code automations add one more: each run bills standard task charges on top of its tokens.
- One model dominates. Check the default model and who picks Opus or Auto Intelligent.
- Output credits lead. Ask for shorter answers.
- Input and cache writes lead. Requests carry a large context. Try code mode or
/compact. - Routing says regional. Each AI Credit costs $2.20 on demand, not $2.00, though data residency may require it.
- Requests are high, credits per request normal. That is adoption, which limits address.
Which controls cap Cortex Code credits?
By default, Snowflake grants CORTEX_USER to PUBLIC, and each daily credit limit is -1, meaning no limit. The cost controls page offers per-surface daily limits, per-user quotas and budgets. Our guides to managing Cortex Code cost and Snowflake AI budgets set each one up. The Cortex Code guide covers the product.
How Seemore helps with Cortex Code credits
A head of data still asks a wider question: which pipeline, dashboard, cost domain, or business unit drove the spike? Seemore connects spend to upstream jobs, downstream dashboards, ownership, and business usage across the wider data stack, which is the gap many teams still have after native Snowflake setup. Its focus is end-to-end visibility, owner-level cost attribution, lineage, and anomaly detection, with cross-stack cost context from ingestion through BI.
Frequently asked questions
Is Snowflake Cortex Code free?
No. Snowflake accounts pay for its tokens in AI Credits on every surface. On standard trial accounts the CLI is unavailable, and Snowsight AI features stay off until an administrator adds a credit card. Developers who sign up directly get a 30-day CLI or Desktop trial, then a paid subscription.
How are Snowflake Cortex Code credits calculated?
Snowflake multiplies the tokens of each type by the model’s rate per million tokens in Table 6(e): input, cache write, cache read and output. The total is in AI Credits, which cost $2.00 each on demand with global routing and $2.20 with regional routing, in every edition and region.
Why does Snowflake Cortex Code cost more on some models?
Each model has its own rates. Among generally available models, Claude Opus 4.6 charges 2.75 AI Credits per million input tokens and Claude Haiku 4.5 charges 0.55, a fifth as much. Snowflake labels Auto Intelligent, which favors the most capable models, the highest cost option.
Do Snowflake Cortex Code credits include warehouse compute?
No. Cortex Code credits are billed per token at the model’s rates. SQL it runs uses your warehouse, which bills Platform Credits per second with a 60-second minimum each time it starts or resumes. That compute does not appear in SNOWFLAKE_COCO_USAGE_HISTORY, so check warehouse metering as well.
Are cached tokens cheaper in Snowflake Cortex Code?
Cache reads are. On Claude Sonnet 4.6, a cache read costs 0.17 AI Credits per million tokens against 1.65 for plain input. Cache writes cost more than input, at 2.07. The usage view reports cache tokens per model.
Does regional routing make Snowflake Cortex Code more expensive?
Yes. An on-demand AI Credit costs $2.20 with regional routing and $2.00 with global routing, in every edition and region. The CORTEX_ENABLED_CROSS_REGION parameter decides which applies. The METADATA column of SNOWFLAKE_COCO_USAGE_HISTORY records each request’s routing, except on older rows.