Swift SDK for Claude API - Build intelligent applications with ease
Built from the ground up for Swift developers with modern async/await support and type safety.
Complete implementation of Claude's API including messages, streaming, and tool use.
Learn by doing with step-by-step tutorials that guide you through building real applications.
macOS • Linux • iOS • watchOS • tvOS
import AnthropicKit
let client = AnthropicClient(apiKey: "your-api-key")
let message = try await client.messages.create(
model: .claude3Opus,
messages: [
Message(role: .user, content: "Hello, Claude!")
],
maxTokens: 1024
)
print(message.content.first?.text ?? "")