.N .NET Landscape

Anthropic C# SDK

AI & Machine Learning
github.com/anthropics/anthropic-sdk-csharp

Access to Anthropic's safety-first language model APIs in C#

☁ Paid service. Free SDK; Anthropic API usage is billed per token. Licensing changes often; verify on the project's site before adopting.

GitHub stars
340
Forks
121
Open issues
30
NuGet downloads
7,345,618
latest 13.3.0
License
Apache-2.0
Language
C#
Last push
today
23 Oct 2026
Created
25 Aug 2025

Claude SDK for C#

NuGet Version

[!IMPORTANT] As of version 10+, the Anthropic package is now the official Claude SDK for C#. Package versions 3.X and below were previously used for the tryAGI community-built SDK, which has moved to tryAGI.Anthropic. If you need to continue using the former client in your project, update your package reference to tryAGI.Anthropic.

The Claude SDK for C# provides access to the Claude API from C# applications.

Documentation

Full documentation is available at platform.claude.com/docs/en/api/sdks/csharp.

Installation

dotnet add package Anthropic

Getting started

using System;
using Anthropic;
using Anthropic.Models.Messages;

AnthropicClient client = new();

MessageCreateParams parameters = new()
{
    MaxTokens = 1024,
    Messages =
    [
        new UserMessageParam("Hello, Claude")
    ],
    Model = Model.ClaudeOpus5_5,
};

var message = await client.Messages.Create(parameters);

Console.WriteLine(message);

Requirements

.NET Standard 2.0+

Contributing

See CONTRIBUTING.md.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details. Versions released before the change from the MIT License, and third-party contributions merged before it, remain under the MIT License. See LICENSE-MIT.