Skip to content
Lucas Lessa
Voltar para as notícias
SnowflakePublic PreviewImpacto: Médio

Anthropic Claude Sonnet 5.5 Model in Preview in Snowflake Cortex AI

The claude-sonnet-5-5 model is now available in Public Preview in Cortex AI Functions and the Cortex REST API.

O que mudou

The Anthropic Claude Sonnet 5.5 model is now available in Public Preview within Snowflake Cortex AI. You can use it via native AI functions or the Cortex REST API with cross-region inference support.

Use cases

Imagine you need to integrate an advanced Anthropic language model into your data workflows securely within the Snowflake perimeter.

  • Run requests against Claude Sonnet 5.5 via the REST API using Snowflake infrastructure.
  • Leverage cross-region inference by setting the appropriate parameter.
  • Monitor token consumption and credit usage directly in Account Usage.

How to use

Authentication and usage follow the Anthropic Messages API specification adapted for Snowflake.

import httpx
import anthropic

PAT = "<SNOWFLAKE_PAT>"

http_client = httpx.Client(
  headers={"Authorization": f"Bearer {PAT}"},
)

client = anthropic.Anthropic(
  api_key="not-used",
  base_url="https://<account-identifier>.snowflakecomputing.com/api/v2/cortex",
  http_client=http_client,
  default_headers={"Authorization": f"Bearer {PAT}"},
)

response = client.messages.create(
  model="claude-sonnet-5-5",
  max_tokens=1024,
  messages=[
    {"role": "user", "content": "How does inference work in Snowflake?"}
  ],
)

print(response.content[0].text)

What happens in this code:

  1. Initializes an HTTP client adding your Snowflake Programmatic Access Token (PAT) to the authorization header.
  2. Sets up the Anthropic client pointing the base URL to your Snowflake Cortex REST API endpoint.
  3. Sends a prompt to the claude-sonnet-5-5 model with a defined token limit.
  4. Prints the generated text response from the model.

Limitations and requirements

  • The model is in Public Preview and is not suitable for production workloads.
  • Requires cross-region inference parameters configured as AWS_GLOBAL or ANY_REGION where applicable.
  • Requires proper Cortex database roles such as SNOWFLAKE.CORTEX_USER or SNOWFLAKE.CORTEX_REST_API_USER.
Ver nota oficial do Snowflake

Anthropic Claude Sonnet 5.5 model (Preview)

Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.

Relacionadas