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