Anthropic SDK with idapt
The Anthropic-compatible surface: Messages API code unchanged, routed through idapt.
- 1
Install
bashnpm i @anthropic-ai/sdk # or: pip install anthropic - 2
Point it at idapt
tsimport Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({ baseURL: "https://idapt.app/api/anthropic/v1", apiKey: process.env.IDAPT_API_KEY, }); const reply = await client.messages.create({ model: "anthropic/claude-opus-5", max_tokens: 512, messages: [{ role: "user", content: "Three facts about ravens." }], });Python: Anthropic(base_url=..., api_key=...) takes the same two arguments.
GOOD TO KNOW
Anthropic-compatible API referenceAPI keys and scopesOpenRouter-compatible API referenceRate limits and errors