RepoAnthropicAnthropicpublished Jan 30, 2023seen 6d

anthropics/anthropic-sdk-typescript

TypeScript

Open original ↗

Captured source

source ↗

anthropics/anthropic-sdk-typescript

Description: Access to Anthropic's safety-first language model APIs in TypeScript

Language: TypeScript

License: MIT

Stars: 1996

Forks: 354

Open issues: 118

Created: 2023-01-30T14:58:08Z

Pushed: 2026-06-09T23:55:41Z

Default branch: main

Fork: no

Archived: no

README:

Claude SDK for TypeScript

The Claude SDK for TypeScript provides access to the Claude 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

npm install @anthropic-ai/sdk

Getting started

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.

Excerpt shown — open the source for the full document.