What you will be able to do
- Choose a CORTEX_ENABLED_CROSS_REGION value that fits a data residency requirement, and know who can set it
- Tell Cortex AI Guardrails apart from Cortex Guard, and turn each one on
- Use model settings and output filtering to keep generated responses focused
- Detect or mask PII with AI_REDACT before text is stored or sent to another prompt
- Authenticate to the Cortex REST API and give the calling role the privileges it needs
1.Cross-region inference and data residency
Deciding who may call which model is half of governing Cortex. The other half is what happens to the data in a prompt. The first question is where the prompt is processed. A single account-level parameter, CORTEX_ENABLED_CROSS_REGION, decides whether Snowflake may send inference requests to regions outside your account's home region. Many frontier models and Cortex products are only available with cross-region inference enabled.
| Type | Parameter value | Where requests can be processed |
|---|---|---|
| Global | ANY_REGION | Any Snowflake-supported region, on any cloud provider |
| Cloud-specific | AWS_GLOBAL, AZURE_GLOBAL, GCP_GLOBAL, or combinations | Only within the named cloud provider |
| Regional | AWS_US, AWS_EU, AWS_APJ, AWS_JP, AWS_AU, AZURE_US, AZURE_EU, GCP_US, or combinations | Only within the named cloud provider and geography |
| Disabled | DISABLED | Only the account's home region |
Only ACCOUNTADMIN can change the parameter, and only with ALTER ACCOUNT. It cannot be set at the user or session level, and ORGADMIN cannot set it. If it was never set, the account inherits a default. Organizations created after March 9, 2026 get ANY_REGION. Other commercial accounts get a same-cloud geography value such as AWS_US or AZURE_EU. If you have residency requirements, set the value explicitly instead of relying on the default.
Cross-region inference moves only the inference payload: the prompt you send and the response you get back. That payload goes to the processing region temporarily and is not stored there. Your stored data stays in your account's region. Inside one cloud provider, traffic stays on the provider's private backbone. Between providers, it crosses the public internet over mTLS. Credits are counted in the requesting region, and there is no egress charge. DISABLED is the strictest option, but it limits you to the models and features deployed in your region. A model you have been granted can then still fail with what looks like an access error.
Checkpoint 1 of 6· Match them up
Match each CORTEX_ENABLED_CROSS_REGION value to where Snowflake may process inference requests
Tap a term, then the definition that fits it.
The values run from most flexible to most restrictive. Global values allow any cloud, *_GLOBAL values keep requests inside one cloud provider, and regional values such as AZURE_EU limit them to one cloud and one geography. DISABLED keeps processing in the home region.
“Requests stay within designated cloud provider regions (for example, AWS US or Azure EU).”Source: docs.snowflake.com
Checkpoint 2 of 6· Check yourself
A data team in an EU account wants Cortex requests limited to AWS EU regions. How can this be configured?
CORTEX_ENABLED_CROSS_REGION exists only at the account level, and only ACCOUNTADMIN can change it, with ALTER ACCOUNT. It cannot be set per user or per session, and ORGADMIN cannot set it.
“Only the ACCOUNTADMIN role can modify this parameter using the ALTER ACCOUNT command. This parameter cannot be set by the ORGADMIN role.”Source: docs.snowflake.com
Sources1
2.Two guardrails: Cortex AI Guardrails and Cortex Guard
Snowflake has two guardrail features with similar names, and they protect different things. Cortex AI Guardrails defend agents against adversarial input such as prompt injection and jailbreaks. Cortex Guard filters harmful output from a single completion. Mixing them up leads to the wrong setting being turned on.
| Aspect | Cortex AI Guardrails | Cortex Guard |
|---|---|---|
| Protects against | Prompt injection (including indirect injection in tool outputs), jailbreaks, previously unknown attack patterns | Unsafe and harmful model responses such as violent crimes, hate, sexual content and self-harm |
| Applies to | CoCo, Snowflake CoWork, Cortex Agents | AI_COMPLETE and SNOWFLAKE.CORTEX.COMPLETE |
| How to turn on | ALTER ACCOUNT SET AI_SETTINGS (ACCOUNTADMIN) | guardrails: TRUE in the model_parameters argument |
| Billing | Credits based on tokens scanned | Compute charges on input tokens processed, on top of AI_COMPLETE charges |
ALTER ACCOUNT SET AI_SETTINGS = $$
guardrails:
advanced_prompt_injection:
- enabled: true
$$;Cortex AI Guardrails depend on your cross-region setting. They are available only to Commercial accounts (not Gov, VPS or Sovereign) whose CORTEX_ENABLED_CROSS_REGION is ANY_REGION, AWS_US, AWS_EU, AWS_JP, AWS_APJ or AWS_GLOBAL. An account set to DISABLED or to an Azure-only value cannot turn them on. ALTER ACCOUNT UNSET AI_SETTINGS turns them off. In SNOWFLAKE.ACCOUNT_USAGE.CORTEX_AI_GUARDRAILS_USAGE_HISTORY, flagged requests have GUARDRAILS_SIGNAL = TRUE. Check this view regularly, because some legitimate prompts get flagged.
Cortex Guard is built on Meta's Llama Guard 3. It checks a model's response before that response reaches your application, so filtering happens per call rather than through an account setting.
Checkpoint 3 of 6· Check yourself
Instructions hidden in a tool's output could hijack your company's Cortex Agent. The Commercial account has CORTEX_ENABLED_CROSS_REGION set to AWS_US. Which setting protects the agent against this?
Cortex AI Guardrails are turned on for the whole account through AI_SETTINGS, and they protect CoCo, CoWork and Cortex Agents from prompt injection, including injection hidden in tool outputs. guardrails: TRUE turns on Cortex Guard, which only filters harmful output from one completion. Setting cross-region to DISABLED would make AI Guardrails unavailable. Model access controls decide which model runs, not what the prompt contains.
“Cortex AI Guardrails at the account level using the AI_SETTINGS parameter. This provides centralized control over guardrail behavior for CoCo, Snowflake CoWork, and Cortex Agents”Source: docs.snowflake.com
3.Keeping generated output focused and filtered
The levers inside AI_COMPLETE's model_parameters affect how predictable a response is. temperature runs from 0 to 1. Higher values such as 0.7 give more varied, random output. Lower values such as 0.2 make output more deterministic and focused. The default is 0. top_p is an alternative way to control randomness: it limits the set of tokens the model can choose from. max_tokens, default 4096, caps the length of the response, and small values can cut a response off.
For pipelines where a response has to stay close to its input, such as extraction or classification feeding a table, keep temperature low. Add Cortex Guard where hateful or otherwise harmful text must never reach users. Treat neither as proof the output is correct. Snowflake describes its AI-based detection as best effort, and checking output against your own policies remains your job. Cortex Playground lets you try different temperature, top_p and max_tokens values and turn Cortex Guard on before you write the SQL.
Checkpoint 4 of 6· Check yourself
Your team's extraction pipeline writes AI_COMPLETE output into a table. It runs with temperature set to 0 and guardrails: TRUE in model_parameters. What is still true about the rows it produces?
Low temperature makes output more focused and deterministic, and Cortex Guard filters harmful content. Neither one proves the output is correct. Snowflake calls its AI-based detection best effort, so you still have to review the output against your own policies.
“AI_REDACT performs detection and redaction in a best-effort manner using AI models. Always review the output to ensure compliance with your organization’s data privacy policies.”Source: docs.snowflake.com
4.Masking PII with AI_REDACT
AI_REDACT uses an LLM to find personally identifiable information in unstructured text, so you can remove it before the text is stored, analysed or sent on to another prompt. Its signature is AI_REDACT( <input> [, <categories> ] [, <return_error_details> ] [, <mode> ] ). The calling role needs the SNOWFLAKE.CORTEX_USER database role. For documents or audio, convert them to text first with AI_PARSE_DOCUMENT or AI_TRANSCRIBE.
The function has two modes, and they produce different results:
- redact (the default) returns a VARCHAR with each PII span replaced by a category placeholder, such as
[NAME]or[ADDRESS]. - detect returns an OBJECT with a
spansarray. Each entry gives thecategory,start,endand matchedtext, so your own code can choose what to mask. - categories is an ARRAY that limits which PII types are handled. If you leave it out, every supported category is redacted. An unsupported category name causes an error.
The supported categories are NAME, EMAIL, PHONE_NUMBER, DATE_OF_BIRTH, GENDER, AGE, ADDRESS, NATIONAL_ID, PASSPORT, TAX_IDENTIFIER, PAYMENT_CARD_DATA, DRIVERS_LICENSE and IP_ADDRESS. Partial matches count: a first name on its own is redacted as [NAME].
On large tables, one bad row can fail the whole query, because AI_REDACT raises an error by default. To keep going, set AI_SQL_ERROR_HANDLING_USE_FAIL_ON_ERROR to FALSE for the session. Failed rows then return NULL. If you also pass TRUE for return_error_details, each result is an OBJECT with value and error fields, so you can store the redacted text and the failures separately. Detection is best effort, so review the output against your privacy policy before treating text as clean.
Checkpoint 5 of 6· Match them up
A privacy team is choosing how to configure AI_REDACT for a large table of support tickets. Pair each configuration with what the function returns
Tap a term, then the definition that fits it.
Redact is the default mode and returns text with placeholders. Detect returns span locations and does not change the text. When fail-on-error is turned off, failed rows return NULL, or an OBJECT with value and error fields if return_error_details is TRUE. If fail-on-error stays on, one bad row fails the whole query.
“redact (default): Replaces detected PII with category placeholders, such as [NAME] and [ADDRESS]. detect: Returns an OBJECT that contains a spans array”Source: docs.snowflake.com
Sources4
5.Authenticating to the Cortex REST API
The Cortex REST API uses the standard Snowflake REST API authentication methods. Put a token in the Authorization header: a JSON web token (JWT), an OAuth token or a programmatic access token (PAT). Consider creating a dedicated user for REST traffic. That keeps its grants and activity separate from people's interactive sessions.
A REST request runs under the user's default role. Switching roles in a worksheet has no effect on it. That default role needs either SNOWFLAKE.CORTEX_USER, which covers all Covered AI features including the REST API, or SNOWFLAKE.CORTEX_REST_API_USER, which covers only the REST API. Most users already pass this check, because CORTEX_USER is granted to PUBLIC. If an administrator has revoked that grant, grant the role to a role that becomes the user's default. The REST API also respects the allowlist and model RBAC, so the default role needs access to the model it names.
ALTER USER my_user SET DEFAULT_ROLE=my_roleCheckpoint 6 of 6· Check yourself
After moving to RBAC-only access, an account has CORTEX_MODELS_ALLOWLIST set to 'None' and the bootstrap all-models grant removed with the stored procedure. An administrator creates a dedicated REST user. That user's default role holds SNOWFLAKE.CORTEX_USER but no CORTEX-MODEL-ROLE application role. The user sends a Cortex REST API request with a valid PAT, and the request names claude-sonnet-4-6. What happens?
The REST API respects the allowlist and model RBAC, and CORTEX_USER opens the feature without granting any model. The default role has no USAGE on the model, and an allowlist of 'None' allows nothing, so both checks fail and the request is denied. Switching roles in a worksheet does not change the role a REST request runs under, and PATs are a supported token type.
“Access is denied only if both checks fail.”Source: docs.snowflake.com
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Your customer data remains stored only in the region where your account is located.”
↩︎ Cross-region inference and data residency“Only the ACCOUNTADMIN role can modify this parameter using the ALTER ACCOUNT command.”
↩︎ Cross-region inference and data residency“If you have data residency requirements, set the parameter explicitly.”
↩︎ Cross-region inference and data residency“Data traverses the public internet using Mutual Transport Layer Security (mTLS), providing encrypted, mutually authenticated connections between Snowflake endpoints.”
↩︎ Cross-region inference and data residency“Your customer data is not persisted in the processing region.”
↩︎ Exam trap 1“This parameter cannot be set by the ORGADMIN role.”
↩︎ Exam trap 2“Credits are consumed in your requesting region, regardless of where the request is processed.”
↩︎ Prediction“Requests stay within designated cloud provider regions (for example, AWS US or Azure EU).”
↩︎ Checkpoint“Only the ACCOUNTADMIN role can modify this parameter using the ALTER ACCOUNT command. This parameter cannot be set by the ORGADMIN role.”
↩︎ Checkpoint - 2.
“provide run-time protection against prompt injection and jailbreak attacks on CoCo, Snowflake CoWork, and Cortex Agents.”
↩︎ Two guardrails: Cortex AI Guardrails and Cortex Guard“Cortex AI Guardrails are available to Commercial (non-Gov, VPS, Sovereign) accounts that have Cross-region inference enabled.”
↩︎ Two guardrails: Cortex AI Guardrails and Cortex Guard“Review which requests were flagged for possible prompt injection (GUARDRAILS_SIGNAL = TRUE)”
↩︎ Two guardrails: Cortex AI Guardrails and Cortex Guard“Cortex AI Guardrails at the account level using the AI_SETTINGS parameter. This provides centralized control over guardrail behavior for CoCo, Snowflake CoWork, and Cortex Agents”
↩︎ Checkpoint - 3.
“Cortex Guard works by evaluating the responses of a language model before that output is returned to the application.”
↩︎ Two guardrails: Cortex AI Guardrails and Cortex Guard“a lower temperature (such as 0.2) makes the output more deterministic and focused”
↩︎ Keeping generated output focused and filtered“language model responses which may be associated with violent crimes, hate, sexual content, self-harm, and more are automatically filtered”
↩︎ Keeping generated output focused and filtered“To enable Cortex Guard, set the guardrails option in the model_parameters argument to TRUE.”
↩︎ Exam trap 3 - 4.
“AI_REDACT performs detection and redaction in a best-effort manner using AI models.”
↩︎ Keeping generated output focused and filtered“Use AI_REDACT in redact mode to replace PII in the input text with placeholder values.”
↩︎ Masking PII with AI_REDACT“identifies the location and category of each detected PII instance without redacting the text”
↩︎ Masking PII with AI_REDACT“If not specified, all supported PII categories are redacted.”
↩︎ Masking PII with AI_REDACT“Users must use a role that has been granted the SNOWFLAKE.CORTEX_USER database role.”
↩︎ Masking PII with AI_REDACT“To allow processing to continue with other rows, set the session parameter AI_SQL_ERROR_HANDLING_USE_FAIL_ON_ERROR to FALSE.”
↩︎ Masking PII with AI_REDACT“a first name alone is sufficient to trigger redaction with the [NAME] placeholder”
↩︎ Masking PII with AI_REDACT“AI_REDACT performs detection and redaction in a best-effort manner using AI models. Always review the output to ensure compliance with your organization’s data privacy policies.”
↩︎ Checkpoint“redact (default): Replaces detected PII with category placeholders, such as [NAME] and [ADDRESS]. detect: Returns an OBJECT that contains a spans array”
↩︎ Checkpoint - 5.
“Set the Authorization header to include your token (for example, a JSON web token (JWT), OAuth token, or programmatic access token).”
↩︎ Authenticating to the Cortex REST API“To send a REST API request, your default role must be granted either the SNOWFLAKE.CORTEX_USER database role or the SNOWFLAKE.CORTEX_REST_API_USER database role.”
↩︎ Authenticating to the Cortex REST API“so that role must have the necessary privileges.”
↩︎ Exam trap 4 - 6.
“Model access controls are supported by the following features:”
↩︎ Authenticating to the Cortex REST API“Access is denied only if both checks fail.”
↩︎ Checkpoint