anthropics/anthropic-sdk-go

Access to Anthropic's safety-first language model APIs via Go

What it solves

This SDK lets Go developers call the Claude API directly from their Go applications, without writing raw HTTP requests or handling JSON manually. It turns Anthropic's AI capabilities into typed Go functions and structs.

How it works

You create a client with an API key (or let it read the ANTHROPIC_API_KEY environment variable), then call methods like client.Messages.New with parameters such as the model, max tokens, and user messages. The SDK handles request encoding, authentication, and response parsing, returning strongly typed results.

Who it's for

Go developers building applications that need to integrate Claude's language model capabilities, such as chatbots, text analysis, or any feature powered by Claude. Requires Go 1.25 or newer.

Highlights

  • Official Anthropic SDK for Go
  • Access to the full Claude API
  • Typed request and response structures
  • Easy setup with API key or environment variable
  • Supports Go 1.25+

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Dispatch