Skip to main content
idapt
HomeAI ModelsExploreResourcesPricing
Sign inUse for Free
  • Home
  • Pricing
  • AI Models
  • Skills
  • Image models
  • Voice models
  • Video models
  • Rankings
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • Blog
  • About
  • Comparisons
  • Benchmarks
  • Model Match
  • Demos
  • Help center
  • FAQ
  • Privacy
  • Support
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Migrate
  • Downloads
  • Desktop
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)Discord
Help Center
🤖

Anthropic SDK with idapt

Found this helpful? Share it:

Set up Anthropic SDK against idapt's compatible APIs with the steps below. This article and the AI Gateway quickstarts lander render the same shared steps, so they never drift.

Anthropic SDK with idapt

The Anthropic-compatible surface: Messages API code unchanged, routed through idapt.

  1. 1

    Install

    bash
    npm i @anthropic-ai/sdk   # or: pip install anthropic
  2. 2

    Point it at idapt

    ts
    import 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

MORE QUICKSTARTS

Claude Code

OpenAI SDK (JS)

curl

curl

Related articles

🔑

API keys and scopes

Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.

🚦

Rate limits and errors

Every error shape the API returns, what each rate limit is, and how to handle a wall in code.

🛡️

Cap what an API key spends

Give every Gateway API key a lifetime, monthly, or daily USD cap, and what a capped-out key returns.

🤖

Anthropic-compatible API

Use idapt's 200+ models from Claude Code or any app that speaks the Anthropic Messages API.

🤖

Claude Code with idapt

Point Claude Code at idapt's Anthropic-compatible API with ANTHROPIC_BASE_URL and an idapt key; add MCP for workspace access.

🔗

OpenAI SDK (JS) with idapt

Point the official OpenAI Node SDK at idapt's compatible API: a three-line change routes 200+ models through your existing code.

⚡

curl with idapt

curl examples for idapt's three compatible APIs: OpenAI chat completions, Anthropic messages, and OpenRouter completions with one key.

Up next

OpenRouter client with idapt

Point OpenRouter client code at idapt's OpenRouter-compatible API: same wire shape, provider routing, ordered model fallbacks, and key management with one URL swap.

Was this helpful?