Top Gradient
Back

Snowflake Cortex Analyst: Overview, Pricing & Cost Monitoring

Author

Jeff SkoldbergFriday, October 10, 2025

What is Cortex Analyst?

Cortex Analyst is Snowflake's fully-managed text-to-SQL service that lets business users ask questions in natural language and get SQL-powered answers without writing a single query. Users can interact with it in two ways: through Snowflake Intelligence (Snowflake's built-in AI agent interface), or via the REST API that you integrate into custom applications (think Streamlit apps, Slack bots, Microsoft Teams, custom web chat interfaces, or any other business tool where users already work). It's powered by large language models, with Claude Sonnet, Mistral Large, and Llama being the primary models, and uses semantic models to understand your business context.

This guide will give you a very high level overview of using Cortext Analyst, then we’ll show you how to monitor and control Cortex Analyst costs.

How does Cortex Analyst Work?

Cortex Analyst converts natural language questions into accurate SQL queries using a combination of large language models and semantic models. The semantic model bridges the gap between business terminology and database schemas, providing context that helps the LLM generate correct SQL.

Creating Semantic Models

You have two options for creating semantic models:

  1. Use the Snowsight wizard: Navigate to AI & ML » Cortex Analyst in Snowsight and use the guided setup to create a semantic view. The wizard walks you through selecting tables, defining dimensions and metrics, and adding sample questions. This is the easiest way to get started.
  2. Upload a YAML file to a stage: If you prefer to define your semantic model as code, you can create a YAML file following the semantic model specification and upload it to a Snowflake stage.

Both approaches work with Cortex Analyst. The wizard creates a semantic view (a schema-level object), while the YAML approach stores the model file in a stage.

Using Cortex Analyst

Once your semantic model is ready, grant users access:

1-- Grant the CORTEX_USER role to users who need access
2GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE analyst_role;

Then in your application, you call the Cortex Analyst API with a natural language question:

1import requests
2import json
3
4response = requests.post(
5 f"https://{account}.snowflakecomputing.com/api/v2/cortex/analyst/message",
6 headers={
7 "Authorization": f"Bearer {token}",
8 "Content-Type": "application/json"
9 },
10 json={
11 "messages": [{
12 "role": "user",
13 "content": [{
14 "type": "text",
15 "text": "What were our top 5 products by revenue last quarter?"

Cortex Analyst supports multi-turn conversations, allowing users to ask follow-up questions that build on previous queries.

If you want to use Cortex Analyst in Snowflake Intelligence, you’ll need to create an agent as well. That is covered here.

How does Cortex Analyst pricing work?

Cortex Analyst uses message-based pricing, not token-based. Only successful HTTP 200 responses are billable, and the cost is the same regardless of how many tokens are in each message. According to the Snowflake Service Consumption Table, each message costs a fixed number of credits. Currently, it costs 6.7 credits per 100 messages.

The two main cost drivers:

  1. Each natural language query = 1 message: Ask "What's my revenue?", that's one billable message.
    1. At $3 per credit, 10 questions would cost $2. It feels like this could add up quick, but you’ll have to weigh the business value you gain. The goal isn’t always to minimize Snowflake spend, it is to maximize business value.
  2. Warehouse costs for SQL execution: The message cost covers only the AI text-to-SQL generation. Additional warehouse compute costs apply when executing the generated SQL.

How to monitor Cortex Analyst usage

Snowflake provides one main views for tracking Cortex Analyst costs:

CORTEX_ANALYST_USAGE_HISTORY: Data is aggregated in hourly increments and therefore does not contain the query ID.

This view shows credit consumption for Cortex Analyst, aggregated in one-hour increments. It includes the number of messages and credits consumed per user.

1-- See daily Cortex Analyst usage by user over the past 30 days
2SELECT
3 DATE_TRUNC('day', START_TIME) AS usage_date,
4 USERNAME,
5 SUM(REQUEST_COUNT) AS total_messages,
6 SUM(CREDITS) AS total_credits
7FROM SNOWFLAKE.ACCOUNT_USAGE.CORTEX_ANALYST_USAGE_HISTORY
8WHERE START_TIME >= DATEADD('day', -30, CURRENT_TIMESTAMP())
9GROUP BY 1, 2
10ORDER BY total_credits DESC;

The view includes START_TIME, END_TIME, REQUEST_COUNT (number of messages), CREDITS consumed, and USERNAME. This gives you per-user visibility into who's driving Cortex Analyst costs. The METERING_HISTORY view can be filtered WHERE SERVICE_TYPE = 'AI_SERVICES', but you could get more than just Cortex Analyst cost here.

Monitor warehouse costs from SQL execution

Here you have a few options. You can use a dedicated warehouse, user, or role, or tag queries initiated by your Cortex Analyst app. You would take the same approach as normally take for query attribution, whatever works for your organization.

Best Practices and Recommendations when using Cortex Analyst

Set up alerts, not just dashboards

Those monitoring queries above are worthless if nobody runs them. For anything you want to monitor in Snowflake, you can wrap the SQL in a scheduled task with a Notification Integration to create a custom monitor that sends alerts to Slack or Teams. If you want extremely easy to use monitoring functionality, check out monitors in SELECT.

Control access with roles

By default, the CORTEX_USER role is granted to the PUBLIC role, meaning all users have access. If you don't want universal access, revoke it from PUBLIC and grant to specific roles:

-- Restrict Cortex Analyst to specific teams
USE ROLE ACCOUNTADMIN;
REVOKE DATABASE ROLE SNOWFLAKE.CORTEX_USER FROM ROLE PUBLIC;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE data_analysts;
GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE finance_team;

This simple change prevents uncontrolled sprawl across your entire organization.

Optimize semantic models

A well-crafted semantic model reduces the number of retries and failed queries. Focus on a specific subject area rather than exposing entire databases. Include verified queries for common questions to improve accuracy. This reduces wasted API calls and improves user experience.

Add verified query repositories. These are example questions with validated SQL that dramatically improve accuracy. When users ask similar questions, Cortex Analyst can reference these examples:

1verified_queries:
2 - name: "total revenue last quarter"
3 question: "What was total revenue in Q4?"
4 sql: |
5 SELECT SUM(revenue_amount)
6 FROM fact_sales
7 WHERE sale_date >= '2024-10-01'
8 AND sale_date < '2025-01-01'
9 verified_result: 1250000.00

Use descriptive names and add synonyms. If your table is called dim_product_category_master, define it with business-friendly names:

1dimensions:
2 - name: product_category
3 synonyms: ["category", "product type", "product class"]
4 description: "High-level product grouping (Electronics, Clothing, etc.)"

Determine your warehouse cost attribution method

As mentioned earlier, you should decide how you will attribute Cortex Analyst generated SQL costs. Some customers will choose a dedicated warehouse, while others will attribute cost by role.

Use the smallest possible default warehouse size

Most Cortex Analyst queries are relatively simple aggregations. You likely don't need an XL warehouse here.

Educate your users

The biggest cost lever is user behavior. If users understand that:

  • 10 questions costs a couple of bucks
  • Complex questions might require multiple attempts
  • Broader questions trigger larger warehouse queries

...they'll naturally be more thoughtful about their usage. Create internal documentation showing cost examples and best practices for formulating questions.

Wrap Up

Cortex Analyst is a powerful tool for democratizing data access, but like all AI services, costs can surprise you if left unmonitored.

Use CORTEX_ANALYST_USAGE_HISTORY for granular tracking, implement role-based access controls, and educate your users about cost-effective usage patterns. With these practices in place, you can confidently deploy Cortex Analyst across your organization without budget anxiety.

Remember: The real ROI of Cortex Analyst isn't just about reducing SQL writing, it's about getting business users answers faster so they can make better decisions. A few extra credits spent on empowering your team is often worth it compared to the cost of delayed insights or misallocated analytics resources.

Have fun chatting with your data. And as always, reach out to let us know your wins using Cortex Analyst!

Author
Jeff Skoldberg Sales Engineer at SELECT

Jeff Skoldberg is a Sales Engineer at SELECT, helping customers get maximum value out of the SELECT app to reduce their Snowflake spend. Prior to joining SELECT, Jeff was a Data and Analytics Consultant with 15+ years experience in automating insights and using data to control business processes. From a technology standpoint, he specializes in Snowflake + dbt + Tableau. From a business topic standpoint, he has experience in Public Utility, Clinical Trials, Publishing, CPG, and Manufacturing.

Want to hear about our latest Snowflake learnings?Subscribe to get notified.

Get up and running in less than 15 minutes

Connect your Snowflake account and instantly understand your savings potential.

CTA Screen