https://github.com/anthropics/anthropic-sdk-typescript
Access to Anthropic's safety-first language model APIs in TypeScript
https://github.com/anthropics/anthropic-sdk-typescript
Last synced: about 1 month ago
JSON representation
Access to Anthropic's safety-first language model APIs in TypeScript
- Host: GitHub
- URL: https://github.com/anthropics/anthropic-sdk-typescript
- Owner: anthropics
- License: mit
- Created: 2023-01-30T14:58:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-05-18T22:33:45.000Z (about 1 month ago)
- Last Synced: 2026-05-18T22:46:01.483Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@anthropic-ai/sdk
- Size: 4.54 MB
- Stars: 1,949
- Watchers: 164
- Forks: 327
- Open Issues: 99
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-claude-ai - TypeScript SDK - Official TypeScript/JavaScript client (API & SDKs / Official SDKs)
- awesome-agentic-ai-js - **Anthropic TypeScript** - Official TypeScript library for the Anthropic API. (Model SDKs)
- awesome-claude - anthropic-sdk-typescript
- React-Toolkit - Anthropic SDK
- awesome-github-projects - anthropic-sdk-typescript - Access to Anthropic's safety-first language model APIs in TypeScript ⭐2,008 `TypeScript` 🔥 (🤖 AI & Machine Learning)
- awesome-llm-tools - anthropic
README
#
Claude SDK for TypeScript
[](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
Node.js 18+
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md).
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.