All models

Claude Sonnet 5.5

Incognito
Try in Playground
anthropic/claude-sonnet-5-5

Anthropic's latest Sonnet model, balancing speed and intelligence for everyday coding, agents, and enterprise work, with adaptive reasoning and a 1M-token context window.

Input / 1M tokens
$2
Output / 1M tokens
$10
Cache read / 1M tokens
$0.1
Context window
1M tokens

Privacy & execution

This Incognito model runs on a partner provider’s infrastructure. NEAR AI routes requests using shared provider credentials, so your NEAR AI account credentials are not forwarded.

Your prompts are processed by the provider under its terms and privacy policy. HTTPS protects data in transit. Model TEE attestation and client-to-model end-to-end encryption are not provided for this model. Where available, Gateway signatures verify the request and response handled by the Gateway.

Verification documentation
01

Make your first request

Call /v1/messages over HTTPS.

Get an API key and replace the API key placeholder below.

curl https://cloud-api.near.ai/v1/messages \ -H "Content-Type: application/json" \ -H "x-api-key: <YOUR-NEAR-AI-CLOUD-API-KEY>" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "anthropic/claude-sonnet-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "What is the meaning of life?"}] }'

This HTTP example uses HTTPS. Use the SDK below to verify deployment evidence and the response signature.

02

Build and Verify with the SDK

Use the Anthropic Messages API and verify the Gateway’s response signature.

Verification guide

Set NEARAI_API_KEY before running an example. Messages use Gateway signatures and do not support field-level E2EE.

Setup

npm install @nearai/inference-sdk @anthropic-ai/sdk

Example

import Anthropic from "@anthropic-ai/sdk"; import { InferenceClient } from "@nearai/inference-sdk/node"; const apiKey = process.env.NEARAI_API_KEY; if (!apiKey) throw new Error("Set NEARAI_API_KEY first."); const inference = new InferenceClient({ apiKey, baseUrl: "https://cloud-api.near.ai/v1", e2ee: false, }); const anthropic = new Anthropic({ apiKey, baseURL: "https://cloud-api.near.ai", fetch: inference.fetch, maxRetries: 0, }); const response = await anthropic.messages.create({ model: "anthropic/claude-sonnet-5-5", max_tokens: 128, messages: [{ role: "user", content: "Hello!" }], }); // Verify before displaying the answer. const verified = await inference.verifyResponse(response.id); console.log(response.content .filter((block) => block.type === "text") .map((block) => block.text) .join("")); console.log("Verified signer:", verified.signatureKind);

JavaScript SDK guide