ClaudeMap

Anthropic TypeScript SDK

Official TypeScript client for the Anthropic API.

SDKs & Toolingofficialsdktypescriptanthropic

Official TypeScript and JavaScript client for the Anthropic API. Tree-shakeable ESM, full TypeScript types, and Node + browser + Deno support. Used by Vercel AI SDK, LangChain.js, and most JS-based agents.

What it does

  • Tree-shakeable ESM + full TypeScript types — bundle-friendly for Vercel/Next.js
  • Native support for Messages, Batch, Files, Token Counting, Vision
  • Works in Node.js, browsers, Deno, Bun, Cloudflare Workers
  • Streaming with delta events + tool-use streaming
  • Vercel AI SDK, LangChain.js, Mastra, and most JS agents consume it

When to use it

Best for browser/Next.js apps calling Claude directly, edge functions on Cloudflare/Vercel, and any TypeScript agent framework that needs streaming responses and tool use. Pairs with Zod for typed tool inputs.

Getting started

npm install @anthropic-ai/sdk

Set ANTHROPIC_API_KEY (and ANTHROPIC_BASE_URL for Bedrock/Vertex) before importing.

Things to know

Pin to a major version in production — the SDK's TypeScript types change between minor releases. Tool-use streaming events require Node 18+ for stable behavior under backpressure.

Repository

anthropics/anthropic-sdk-typescript

Charted

Related on the map

  • E2B

    SDK / Tool

    Open-source secure sandboxes where AI agents run code — the de facto execution layer for agent apps.

    • sandbox
    • code-execution
    • sdk
    • agents
  • FastMCP

    SDK / Tool

    Pythonic framework for building MCP servers — decorators, type hints, and zero boilerplate.

    • framework
    • python
    • mcp
    • type-driven
  • Anthropic's official TypeScript SDK for building agentic applications.

    • official
    • sdk
    • typescript
    • anthropic