Skip to main content

Overview

AI Sonar supports the native Anthropic Messages API path, so you can use the official Anthropic SDK directly for Claude models. Among the documented SDK routes, this is one of the strongest-supported AI Sonar paths for Claude-native features.
For the Anthropic SDK, use https://api.aisonar.dev as the base URL, without appending /v1 yourself.
Type: Native SDKPrimary Path: Anthropic-nativeSupport Confidence: Strong native path

Installation

Configure the Client

Basic Usage

Streaming

Vision

Tool Use

Extended Thinking

Troubleshooting

  • Use https://api.aisonar.dev
  • Do not manually append /v1 when configuring the Anthropic SDK
  • Check that your AI Sonar API key starts with sk-
  • Confirm the key is active in AI Sonar dashboard
  • Let the Anthropic SDK manage the auth header instead of adding custom headers manually
  • Verify the Claude model name exactly
  • Check current availability in the AI Sonar model catalog