ee31e48
d35da8c
ee31e48
d35da8c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | <!DOCTYPE html>
<html>
<head>
<title>Claude SDK Docs</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.2.0/github-markdown.min.css">
<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
</style>
</head>
<body class="markdown-body">
<div id="content"></div>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
const markdownContent = `
# Client SDKs
Official SDKs for building with the Claude API in Python, TypeScript, Java, Go, Ruby, C#, PHP, and the command line.
---
Anthropic provides official client SDKs in multiple languages to make it easier to work with the Claude API. Each SDK provides idiomatic interfaces, type safety, and built-in support for features like streaming, retries, and error handling.
<Info>
For the full API specification, see the [API reference](/docs/en/api/overview).
</Info>
<CardGroup cols={3}>
<Card title="CLI" href="/docs/en/api/sdks/cli">
Shell scripting, typed flags, response transforms
</Card>
<Card title="Python" href="/docs/en/api/sdks/python">
Sync and async clients, Pydantic models
</Card>
<Card title="TypeScript" href="/docs/en/api/sdks/typescript">
Node.js, Deno, Bun, and browser support
</Card>
<Card title="Java" href="/docs/en/api/sdks/java">
Builder pattern, CompletableFuture async
</Card>
<Card title="Go" href="/docs/en/api/sdks/go">
Context-based cancellation, functional options
</Card>
<Card title="Ruby" href="/docs/en/api/sdks/ruby">
Sorbet types, streaming helpers
</Card>
<Card title="C#" href="/docs/en/api/sdks/csharp">
.NET Standard 2.0+, IChatClient integration
</Card>
<Card title="PHP" href="/docs/en/api/sdks/php">
Value objects, builder pattern
</Card>
</CardGroup>
## Quick installation
### CLI
\`\`\`bash
brew install anthropics/tap/ant
\`\`\`
### Python
\`\`\`bash
pip install anthropic
\`\`\`
### TypeScript
\`\`\`bash
npm install @anthropic-ai/sdk
\`\`\`
### C#
\`\`\`bash
dotnet add package Anthropic
\`\`\`
### Go
\`\`\`bash
go get github.com/anthropics/anthropic-sdk-go
\`\`\`
### Java
#### Gradle
\`\`\`groovy
implementation("com.anthropic:anthropic-java:2.30.0")
\`\`\`
#### Maven
\`\`\`xml
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java</artifactId>
<version>2.30.0</version>
</dependency>
\`\`\`
### PHP
\`\`\`bash
composer require anthropic-ai/sdk
\`\`\`
### Ruby
\`\`\`bash
bundler add anthropic
\`\`\`
## Quick start
### Python
\`\`\`python
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-4-7",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(message.content)
\`\`\`
### TypeScript
\`\`\`typescript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const message = await client.messages.create({
model: "claude-opus-4-7",
max_tokens: 1024,
messages: [{ role: \"user\", content: \"Hello, Claude\" }]
});
console.log(message.content);
\`\`\`
## Platform support
All SDKs support multiple deployment options:
| Platform | Description |
|----------|-------------|
| Claude API | Connect directly to Claude API endpoints |
| Amazon Bedrock | Use Claude through AWS |
| Google Vertex AI | Use Claude through Google Cloud |
| Microsoft Foundry | Use Claude through Microsoft Azure |
## Requirements
| SDK | Minimum version |
|-----|-----------------|
| Python | 3.9+ |
| TypeScript | 4.9+ (Node.js 20+) |
| Java | 8+ |
| Go | 1.23+ |
| Ruby | 3.2.0+ |
| C# | .NET Standard 2.0 |
| PHP | 8.1.0+ |
`;
document.getElementById('content').innerHTML = marked.parse(markdownContent);
</script>
</body>
</html>
|