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

Claude Haiku 5.5 Model in the Snowflake Cortex REST API

The Claude Haiku 5.5 model is now available in Public Preview in the Snowflake Cortex REST API.

O que mudou

The Claude Haiku 5.5 model is available for use through the Snowflake Cortex REST API, enabling inference calls using the Anthropic messages API within the platform's security perimeter.

Use cases

Imagine you need to integrate advanced Anthropic models into your external applications while keeping data governance and security inside Snowflake.

  • Run inferences with the Claude Haiku 5.5 model via REST API.
  • Support cross-region inference using specific configurations.
  • Use the standard Anthropic SDK with token-based authentication.

How to use

Configure the Anthropic client pointing to the Snowflake endpoint and passing the programmatic access token.

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-haiku-5-5",
  max_tokens=1024,
  messages=[
    {"role": "user", "content": "Explain data engineering in one sentence."}
  ],
)

print(response.content[0].text)

What happens in this code:

  1. Configures a custom HTTP client to inject the Snowflake access token into the authorization header.
  2. Initializes the Anthropic SDK client pointing the base URL to the Cortex REST API endpoint in Snowflake.
  3. Sends a message requesting text generation using the claude-haiku-5-5 model.
  4. Prints the text returned by the model response to the console.

Limitations and requirements

  • The feature is in Public Preview and is not suitable for critical production workloads.
  • Requires a Snowflake Programmatic Access Token (PAT) for authentication.
  • Usage requires the user's default role to have proper privileges, such as the SNOWFLAKE.CORTEX_USER or SNOWFLAKE.CORTEX_REST_API_USER database role.
  • Supports cross-region inference with CORTEX_ENABLED_CROSS_REGION set to options like ANY_REGION, AWS_GLOBAL, and others.
Ver nota oficial do Snowflake

Claude Haiku 5.5 model in the Cortex REST API (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