Guides · Claude in Snowflake

How to use Claude in Snowflake, and the six things that stop it

Claude runs inside Snowflake through Cortex. You call it from SQL with AI_COMPLETE, or from code through the Cortex REST API, and the bill lands on your Snowflake account. We build ZLens, which runs Claude through Cortex in customers’ accounts, so we have hit most of the six blockers below.

Start with one statement

Run this in a Snowsight worksheet with a warehouse selected, as the role that will use Claude. Don’t test as ACCOUNTADMIN: it can always use every model, so it hides problems other roles will hit.

SELECT AI_COMPLETE('claude-sonnet-5-5', 'Reply with the single word PONG.');

If it returns "PONG", Claude works for that role. If it fails, check items 1 to 4 below. Items 5 and 6 matter only if you call the legacy function or the REST API.

The six things that stop Claude in Snowflake

  1. A trial account with no card. Snowflake turns AI features off on self-service trial accounts until a credit card is added. (Snowflake: trial accounts)
  2. Your region’s cross-region setting. Claude reaches Snowflake through cross-region inference, and the account setting CORTEX_ENABLED_CROSS_REGION decides which regions may serve your request. On AWS in the US, Canada, Europe, Australia and Asia Pacific outside Japan, the default reaches Claude Sonnet 5.5. In Tokyo and Osaka it reaches Opus 5.5 only, and in a few other AWS regions and on Azure and Google Cloud it reaches neither. See Claude by region, with the fix for each.
  3. The privilege and the role. A role needs the USE AI FUNCTIONS account privilege (or USE AI FUNCTION AI_COMPLETE for that one function) and either the SNOWFLAKE.CORTEX_USER or the SNOWFLAKE.AI_FUNCTIONS_USER database role. Both the privilege and CORTEX_USER are granted to PUBLIC by default, so this only bites when an admin has revoked them. CORTEX_USER and AI_FUNCTIONS_USER can’t be granted to a user directly; grant them to a role. (Snowflake: privileges)
    -- Who holds the role, and who holds the privilege (look for USE AI FUNCTIONS)
    SHOW GRANTS OF DATABASE ROLE SNOWFLAKE.CORTEX_USER;
    SHOW GRANTS ON ACCOUNT;
    
    -- As ACCOUNTADMIN, if your role is missing them
    GRANT USE AI FUNCTIONS ON ACCOUNT TO ROLE analyst;
    GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE analyst;
  4. Model access. An admin can decide which roles may use which models, with grants on the model objects in SNOWFLAKE.MODELS. Older accounts may also limit models account-wide with CORTEX_MODELS_ALLOWLIST, which Snowflake is removing; a value of All means it blocks nothing, and ours says All. A role gets a model if either one allows it. To see the models and the cross-region groups that reach each, run as the role that will use Claude:
    USE SECONDARY ROLES NONE;
    SHOW CORTEX BASE MODELS LIKE 'CLAUDE%' IN SCHEMA SNOWFLAKE.MODELS;
    SHOW PARAMETERS LIKE 'CORTEX_MODELS_ALLOWLIST' IN ACCOUNT;
    If Claude is listed but the call still fails with an access error, ask your admin which models your role may use. (Snowflake: model access control)
  5. The legacy function. Use AI_COMPLETE, not SNOWFLAKE.CORTEX.COMPLETE. Snowflake says the legacy function “will be deprecated by the end of 2026”, and in our account it already fails with an error that says new accounts are blocked:
    399270 (0A000): SNOWFLAKE.CORTEX.COMPLETE is not available on this account.
    New accounts are blocked from using legacy SNOWFLAKE.CORTEX functions.
    Please migrate to AI Functions and use AI_COMPLETE instead.
    COMPLETE(model, prompt) becomes AI_COMPLETE(model, prompt). Calls that pass an options object need more changes; Snowflake’s migration guide covers each one.
  6. The REST API returns 403, code 003001. If SQL works but POST /api/v2/cortex/v1/messages returns 403 with code 003001, check the role first. REST calls run as your user’s default role, which needs CORTEX_USER or CORTEX_REST_API_USER, and that may not be the role your worksheet uses. If the role is right, the account may not have the Cortex REST API yet. Ours got this 403 for about two weeks after we upgraded it from a trial to a paid account, and Snowflake Support told us our account needed an internal review first. All that time, AI_COMPLETE through SQL kept working. (Snowflake: Cortex REST API)

If Claude runs inside a Native App

An app installed from Snowflake Marketplace calls Cortex with its own grants, not yours. Two things differ:

  • No USE AI FUNCTIONS check. Snowflake says the privilege doesn’t currently apply to AI function queries run inside native apps.
  • Apps now get CORTEX_USER automatically. Since 5 October 2026, Snowflake has been giving installed apps CORTEX_USER through a Snowflake-managed application role, account by account, with no grant from you. You can’t revoke it from an app, only uninstall the app. Snowflake’s check for whether your account has the change is SHOW GRANTS TO APPLICATION ROLE SNOWFLAKE.APP_PUBLIC;. Until it does, an admin grants the role: GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO APPLICATION my_app; (Snowflake: behavior change 2437)

The region setting still applies to apps, and only your ACCOUNTADMIN can change it. An app can’t.

See what Claude costs you

Cortex bills AI Credits by tokens, counted in your account’s own region even when another region serves the request. The price per AI Credit follows your cross-region setting: $2.00 with a global value such as ANY_REGION, $2.20 with a regional value or DISABLED. (Snowflake: AI pricing)

These two queries show the last 30 days by model: the first for SQL AI functions in AI Credits, the second for REST API calls in tokens. They need access to the SNOWFLAKE.ACCOUNT_USAGE views, which can run a few hours behind.

SELECT model_name, function_name, ROUND(SUM(credits), 4) AS credits
FROM SNOWFLAKE.ACCOUNT_USAGE.CORTEX_AI_FUNCTIONS_USAGE_HISTORY
WHERE start_time >= DATEADD(day, -30, CURRENT_TIMESTAMP())
GROUP BY 1, 2
ORDER BY credits DESC;

SELECT model_name, SUM(tokens) AS tokens
FROM SNOWFLAKE.ACCOUNT_USAGE.CORTEX_REST_API_USAGE_HISTORY
WHERE start_time >= DATEADD(day, -30, CURRENT_TIMESTAMP())
GROUP BY 1
ORDER BY tokens DESC;

What we saw

The 403 cost us the most time, because nothing in the error says “account review”. SQL calls to Claude worked in the same account, so it looked like our code. We only learned the cause from Snowflake Support. Since then, ZLens calls Claude through the REST API when the account has it and falls back to AI_COMPLETE through SQL when it doesn’t, so a new customer’s first question still gets an answer.

One more trap from the same week: the same model name worked on /api/v2/cortex/v1/messages and came back “unknown model” on the older /api/v2/cortex/inference:complete endpoint. If you switch endpoints, check the model name for that endpoint.

Questions people ask

Does Snowflake Cortex use Claude?

Yes. Claude models, including Claude Opus 5.5 and Claude Sonnet 5.5, are available in Cortex AI Functions such as AI_COMPLETE, in the Cortex REST API, and in Cortex Agents and CoWork. Which ones your account reaches depends on its region setting.

How do I enable Cortex in Snowflake?

Often there is nothing to enable. By default Snowflake grants both the USE AI FUNCTIONS privilege and the SNOWFLAKE.CORTEX_USER role to PUBLIC, and most AWS accounts already reach Claude. On Azure, Google Cloud, AWS Japan and a few other AWS regions, the account’s CORTEX_ENABLED_CROSS_REGION setting needs a change, which only ACCOUNTADMIN can make.

Can I use Claude in a Snowflake trial account?

Not until you add a credit card. Snowflake turns AI features off on self-service trial accounts until a card is on file.

What is the model name for Claude Sonnet 5.5 in Snowflake?

claude-sonnet-5-5, for example AI_COMPLETE('claude-sonnet-5-5', 'your prompt'). Claude Opus 5.5 is claude-opus-5-5.

Should I use AI_COMPLETE or SNOWFLAKE.CORTEX.COMPLETE?

AI_COMPLETE. Snowflake says the legacy SNOWFLAKE.CORTEX.COMPLETE will be deprecated by the end of 2026, and its error message says new accounts are already blocked from it.

Ask Claude about your own Snowflake data

ZLens for Snowflake is a Native App on Snowflake Marketplace, free for one person. It runs Claude through Cortex in your account, and every answer says whether your team certified it, it came from approved metrics, or the AI wrote it. When the data can’t answer, it says so and runs no query. Not a Snowflake admin? Send your admin this note.

More: Claude by region · Snowflake CoWork vs Cortex Agents vs Cortex Analyst · Snowflake’s developer guide to ZLens · All guides

Sources, checked on 26 November 2026: Privileges and model access, Cross-region inference, Model availability, Model access control, Trial accounts, COMPLETE (legacy), Migrating legacy functions, Cortex REST API, Behavior change 2437, AI pricing. The SELECT and SHOW statements and the error text come from our own Snowflake account on that date; the GRANT statements follow Snowflake’s docs. Snowflake and Cortex are trademarks of Snowflake Inc.; Claude is a trademark of Anthropic. ZLens is not affiliated with or endorsed by either.