# @anthropic-ai/sdk

> The official TypeScript library for the Anthropic API

Latest version **0.125.0** (published 2026-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @anthropic-ai/sdk
pnpm add @anthropic-ai/sdk
yarn add @anthropic-ai/sdk
bun add @anthropic-ai/sdk
```

Provides the command `anthropic-ai-sdk`.

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.125.0 |
| Published | 2026-09-10 |
| First published | 2023-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2116 |
| Author | Anthropic |
| Maintainers | zak-anthropic, dylanc-anthropic, benjmann, nikhil-anthropic, ejlangev-ant, jv-anthropic, ollie-ant-2025, packy-anthropic, noahz-anthropic, sbidasaria, wolffiex, felixrieseberg-anthropic, joan-anthropic |

## Links

- npm: https://www.npmjs.com/package/@anthropic-ai/sdk
- Repository: https://github.com/anthropics/anthropic-sdk-typescript
- Homepage: https://github.com/anthropics/anthropic-sdk-typescript#readme
- Issues: https://github.com/anthropics/anthropic-sdk-typescript/issues
- npm.io page: https://npm.io/package/@anthropic-ai/sdk

## Dependencies (2)

- [standardwebhooks](https://npm.io/package/standardwebhooks.md) ^1.0.0
- [json-schema-to-ts](https://npm.io/package/json-schema-to-ts.md) ^3.1.1

## Recent versions

- 0.125.0 (latest) — 2026-09-10
- 0.34.0-alpha.0 (alpha) — 2024-12-20
- 0.124.0 — 2026-09-04
- 0.123.0 — 2026-09-01
- 0.122.0 — 2026-08-27
- 0.121.0 — 2026-08-26
- 0.120.0 — 2026-08-19
- 0.119.0 — 2026-08-19
- 0.118.0 — 2026-08-19
- 0.117.1 — 2026-08-13
- 0.116.0 — 2026-08-07
- 0.115.0 — 2026-07-24
- 0.114.0 — 2026-07-23
- 0.113.0 — 2026-07-22
- 0.112.5 — 2026-07-21
- … 190 more at https://npm.io/package/@anthropic-ai/sdk/versions

## README

# <img src=".github/logo.svg" alt="" width="32"> Claude SDK for TypeScript

[![NPM version](https://img.shields.io/npm/v/@anthropic-ai/sdk.svg)](https://npmjs.org/package/@anthropic-ai/sdk)

The Claude SDK for TypeScript provides access to the [Claude API](https://docs.anthropic.com/en/api/) from server-side TypeScript or JavaScript applications.

## Documentation

Full documentation is available at **[platform.claude.com/docs/en/api/sdks/typescript](https://platform.claude.com/docs/en/api/sdks/typescript)**.

## Installation

```sh
npm install @anthropic-ai/sdk
```

## Getting started

```js
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic({
  apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});

const message = await client.messages.create({
  max_tokens: 1024,
  messages: [{ role: 'user', content: 'Hello, Claude' }],
  model: 'claude-opus-4-6',
});

console.log(message.content);
```

## Requirements

TypeScript >= 5.0 is supported.

The following runtimes are supported:

- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
- Deno v1.28.0 or higher.
- Bun 1.0 or later.
- Cloudflare Workers.
- Vercel Edge Runtime.
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
- Nitro v2.6 or greater.
- Web browsers: disabled by default to avoid exposing your secret API credentials (see [API key best practices](https://support.anthropic.com/en/articles/9767949-api-key-best-practices-keeping-your-keys-safe-and-secure)). Enable browser support by explicitly setting `dangerouslyAllowBrowser` to `true`.

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---
_Source: https://npm.io/package/@anthropic-ai/sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
