Skip to main content

Overview

TokenLab 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 TokenLab paths for Claude-native features.
For the Anthropic SDK, use https://api.tokenlab.sh 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.tokenlab.sh
  • Do not manually append /v1 when configuring the Anthropic SDK
  • Check that your TokenLab API key starts with sk-
  • Confirm the key is active in TokenLab 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 TokenLab model catalog