Python 88.3%
TypeScript 7.6%
Shell 4.1%
1[2 {3 "provider": "anthropic",4 "language": "python",5 "package": "anthropic",6 "version_seen": "1.7.0 (installed in .venv; docs: Python ≥3.10, v1 migration guide)",7 "install": "pip install anthropic # extras: anthropic[bedrock], anthropic[vertex], anthropic[aws], anthropic[aiohttp]",8 "client": "from anthropic import Anthropic, AsyncAnthropic; client = Anthropic() # reads ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN",9 "status": [10 "DOCUMENTED",11 "LIVE_VERIFIED"12 ],13 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/python",14 "messages": {15 "create": "client.messages.create(model, max_tokens, messages, …, stream=False) -> Message | Stream[RawMessageStreamEvent]",16 "stream": "with client.messages.stream(...) as stream: stream.text_stream / for event in stream / stream.get_final_message() / stream.get_final_text() / stream.until_done() / stream.current_message_snapshot / stream.request_id",17 "parse": "client.messages.parse(..., output_format=PydanticModel) — structured outputs helper (translates to output_config.format)",18 "count_tokens": "client.messages.count_tokens(model, messages, system?, tools?, thinking?, output_config?) -> MessageTokensCount",19 "batches": "client.messages.batches.*"20 },21 "beta": "client.beta.messages.create(betas=[...]) / .stream / .parse / .count_tokens / .tool_runner(tools=[@beta_tool functions]) ; client.beta.models",22 "models": "client.models.list() (auto-paginates: for m in client.models.list()) / client.models.retrieve(id) / .has_next_page() / .get_next_page()",23 "completions_legacy": "REMOVED in 1.x: `Anthropic().completions` raises AttributeError (verified on 1.7.0)",24 "removed_params_1_7_0": "LIVE_DISCOVERED: messages.create/stream/parse and beta.messages.create in anthropic 1.7.0 have NO `temperature`, `top_p`, `top_k` keyword arguments (TypeError 'unexpected keyword argument'); pass them via extra_body={'temperature': 0.2} for models that still accept them. New kwargs: user_profile_id, workspace_id. count_tokens/stream still accept legacy `output_format`.",25 "retries": "DEFAULT_MAX_RETRIES=2; retries connection errors, 408, 409, 429, >=500 (and APITimeoutError); backoff INITIAL_RETRY_DELAY 0.5s → MAX_RETRY_DELAY 8s with jitter; honors retry-after; client option max_retries / with_options(max_retries=…)",26 "timeouts": "DEFAULT_TIMEOUT = httpx2.Timeout(connect=5, read=600, write=600, pool=600) i.e. 10 min; raises APITimeoutError; non-streaming requests expected >10 min raise ValueError unless stream=True or timeout overridden; MODEL_NONSTREAMING_TOKENS caps (Opus 4/4.1 ids: 8192)",27 "raw_response": "client.messages.with_raw_response.create(...) -> APIResponse (.headers, .parse()); with_streaming_response for lazy bodies; message._request_id",28 "errors": "APIError > APIStatusError(BadRequestError 400, AuthenticationError 401, PermissionDeniedError 403, NotFoundError 404, ConflictError 409, UnprocessableEntityError 422, RateLimitError 429, RequestTooLargeError 413, InternalServerError ≥500, OverloadedError 529, ServiceUnavailableError, DeadlineExceededError), APIConnectionError, APITimeoutError, plus WIF errors (CredentialsError, WorkloadIdentityError, IdentityTokenFileError)",29 "types": "request params = TypedDicts (anthropic.types.MessageParam, …); responses = Pydantic models (.model_dump(), .to_json(), model_extra for undocumented fields)",30 "headers": "sends anthropic-version 2023-06-01; default_headers / extra_headers / extra_body / extra_query for undocumented fields; client.get/post for undocumented endpoints",31 "middleware": "client.with_middleware([...]) / middleware=[] option; built-in refusal-fallback middleware",32 "cloud_clients": "AnthropicBedrockMantle (new Bedrock), AnthropicBedrock (bedrock-runtime), AnthropicVertex / AnthropicGoogleCloud, AnthropicAWS (beta, workspace_id / ANTHROPIC_AWS_WORKSPACE_ID), AnthropicFoundry — all in the base package, async twins",33 "logging": "ANTHROPIC_LOG=debug|info",34 "verification": {35 "method": "live_api",36 "verified_at": "2026-09-18",37 "result": "success",38 "http_status": 200,39 "request_note": "examples/anthropic/messages/*.py and streaming/*.py executed with .venv/bin/python (anthropic 1.7.0)"40 }41 },42 {43 "provider": "anthropic",44 "language": "typescript",45 "package": "@anthropic-ai/sdk",46 "version_seen": "0.126.0 (installed in node_modules; docs: TS ≥5.0, Node 20+, Deno, Bun, Workers, Edge; browsers need dangerouslyAllowBrowser)",47 "install": "npm install @anthropic-ai/sdk",48 "client": "import Anthropic from '@anthropic-ai/sdk'; const client = new Anthropic({ apiKey?, authToken?, maxRetries?, timeout?, logLevel? })",49 "status": [50 "DOCUMENTED",51 "LIVE_VERIFIED"52 ],53 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript",54 "messages": {55 "create": "client.messages.create(params) -> Promise<Message> | (stream: true) -> Stream<RawMessageStreamEvent> (async iterable; stream.controller.abort())",56 "stream": "client.messages.stream(params) -> MessageStream: .on('text'|'message'|'contentBlock'|'streamEvent'|'error'|'finalMessage'), for await (const ev of stream), await stream.finalMessage(), stream.finalText(), stream.request_id",57 "countTokens": "client.messages.countTokens(params) -> MessageTokensCount",58 "batches": "client.messages.batches.*"59 },60 "beta": "client.beta.messages.create({betas: [...]}) / .stream / .countTokens / .toolRunner({tools: [betaTool|betaZodTool], …}) ; ToolError for tool failures; MCP helpers (convert MCP tools/prompts/resources)",61 "models": "client.models.list() (for await auto-pagination; .getNextPage()) / client.models.retrieve(id)",62 "completions_legacy": "client.completions.create({model, prompt, max_tokens_to_sample}) still typed in 0.126.0 (endpoint returns 400 deprecated live)",63 "retries": "maxRetries default 2; retries connection errors, 408, 409, 429, >=500; honors retry-after and x-should-retry",64 "timeouts": "DEFAULT_TIMEOUT 600000 ms (10 min); for non-streaming with large max_tokens the timeout scales: expected = 60min * max_tokens / 128000, and if expected > 10 min (or max_tokens > model non-streaming cap) it throws AnthropicError 'Streaming is required for operations that may take longer than 10 minutes'; APIConnectionTimeoutError on timeout",65 "raw_response": "await client.messages.create(...).asResponse() (headers only) / .withResponse() -> {data, response, request_id}; message._request_id",66 "errors": "APIError > BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError, InternalServerError; APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, RetryableError, AnthropicError",67 "types": "import type { MessageParam, Message, RawMessageStreamEvent } from '@anthropic-ai/sdk/resources/messages'",68 "headers": "sends anthropic-version 2023-06-01; per-request { headers, query, body } options; // @ts-expect-error for undocumented params",69 "cloud_clients": "@anthropic-ai/vertex-sdk (AnthropicVertex), @anthropic-ai/bedrock-sdk (AnthropicBedrockMantle, AnthropicBedrock), @anthropic-ai/aws-sdk (AnthropicAws, beta), @anthropic-ai/foundry-sdk (AnthropicFoundry)",70 "logging": "ANTHROPIC_LOG or logLevel option: debug|info|warn(default)|error|off; custom logger",71 "verification": {72 "method": "live_api",73 "verified_at": "2026-09-18",74 "result": "success",75 "http_status": 200,76 "request_note": "examples *.ts executed with node --env-file=.env --experimental-strip-types (@anthropic-ai/sdk 0.126.0)"77 }78 },79 {80 "provider": "anthropic",81 "language": "go",82 "package": "github.com/anthropics/anthropic-sdk-go",83 "version_seen": "docs: Go ≥1.24 (param.SetJSON needs ≥1.20.0)",84 "install": "go get github.com/anthropics/anthropic-sdk-go",85 "client": "client := anthropic.NewClient(option.WithAPIKey(...))",86 "status": [87 "DOCUMENTED"88 ],89 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/go",90 "messages": "client.Messages.New(ctx, anthropic.MessageNewParams{...}) ; client.Messages.NewStreaming(ctx, params) -> stream.Next()/Current(); message.Accumulate(event) ; client.Messages.CountTokens",91 "retries": "2 by default (connection errors, 408, 409, 429, >=500); option.WithMaxRetries",92 "timeouts": "non-streaming Messages: 10 min default; others none; context deadline or option.WithRequestTimeout (per retry)",93 "errors": "*anthropic.Error with StatusCode, Request, Response (errors.As); transport errors unwrapped (*url.Error)",94 "raw_response": "option.WithResponseInto(&httpResp) → Header.Get(\"request-id\")",95 "middleware": "option.WithMiddleware (client then method, concatenated)",96 "cloud_clients": "bedrock / vertex sub-packages"97 },98 {99 "provider": "anthropic",100 "language": "java",101 "package": "com.anthropic:anthropic-java",102 "version_seen": "2.63.0 (docs); Java ≥8",103 "install": "implementation(\"com.anthropic:anthropic-java:2.63.0\") // or Maven <dependency>",104 "client": "AnthropicClient client = AnthropicOkHttpClient.fromEnv(); AnthropicClientAsync async = AnthropicOkHttpClientAsync.fromEnv();",105 "status": [106 "DOCUMENTED"107 ],108 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/java",109 "messages": "client.messages().create(MessageCreateParams.builder()...build()) ; client.messages().createStreaming(params) -> StreamResponse<RawMessageStreamEvent> (try-with-resources, .stream()) ; MessageAccumulator.create().accumulate(event).message() ; client.async().messages().createStreaming(params).subscribe(...) ; countTokens ; batches",110 "retries": "maxRetries builder option (default 2)",111 "timeouts": "timeout builder option; 10 min default for non-streaming",112 "errors": "AnthropicException > AnthropicServiceException (HTTP: BadRequestException, AuthenticationException, PermissionDeniedException, NotFoundException, UnprocessableEntityException, RateLimitException, InternalServerException…), AnthropicIoException, AnthropicRetryableException, AnthropicInvalidDataException",113 "raw_response": "client.messages().withRawResponse().create(params) -> HttpResponseFor<Message> (.requestId(), .headers())",114 "pagination": "auto-paginating iterators for list endpoints"115 },116 {117 "provider": "anthropic",118 "language": "ruby",119 "package": "anthropic (gem)",120 "version_seen": "docs (Sorbet types)",121 "install": "bundle add anthropic",122 "client": "client = Anthropic::Client.new(api_key: ENV['ANTHROPIC_API_KEY'])",123 "status": [124 "DOCUMENTED"125 ],126 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/ruby",127 "messages": "client.messages.create(model:, max_tokens:, messages:) ; client.messages.stream(...) → stream.text / .accumulated_message ; client.messages.count_tokens",128 "retries": "max_retries (default 2) on client or request_options: {max_retries:}",129 "timeouts": "timeout: (default 10 min) client or request_options",130 "errors": "Anthropic::Errors::APIError > BadRequestError 400, AuthenticationError 401, PermissionDeniedError 403, NotFoundError 404, ConflictError 409, UnprocessableEntityError 422, RateLimitError 429, InternalServerError ≥500, APIStatusError (other), APITimeoutError, APIConnectionError",131 "raw_response": "per-request middleware (request_options: {middleware: [...]}) to read response.headers['request-id']"132 },133 {134 "provider": "anthropic",135 "language": "csharp",136 "package": "Anthropic (NuGet)",137 "version_seen": "≥10 is the official SDK (≤3.x was tryAGI); .NET Standard 2.0+",138 "install": "dotnet add package Anthropic",139 "client": "AnthropicClient client = new() { MaxRetries = 3, Timeout = TimeSpan.FromSeconds(42) };",140 "status": [141 "DOCUMENTED"142 ],143 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/csharp",144 "messages": "await client.Messages.Create(new MessageCreateParams {...}) ; await foreach (var ev in client.Messages.CreateStreaming(parameters)) ; .CreateStreaming(p).Aggregate() → Message ; MessageContentAggregator with .CollectAsync() ; client.WithRawResponse.Messages.Create(...) → response.RequestID ; IChatClient integration",145 "retries": "MaxRetries default 2 (client or `options with { MaxRetries = 3 }`)",146 "timeouts": "Timeout property",147 "errors": "AnthropicApiException (AnthropicBadRequestException 400, AnthropicUnauthorizedException 401, AnthropicForbiddenException 403, AnthropicNotFoundException 404, AnthropicUnprocessableEntityException 422, AnthropicRateLimitException 429, Anthropic5xxException; all 4xx inherit Anthropic4xxException), AnthropicSseException (mid-stream), AnthropicIOException"148 },149 {150 "provider": "anthropic",151 "language": "php",152 "package": "anthropic-ai/sdk",153 "version_seen": "beta (docs: APIs may change); PSR-18 client, Guzzle recommended",154 "install": "composer require \"anthropic-ai/sdk\" \"guzzlehttp/guzzle:^7\"",155 "client": "$client = new Anthropic\\Client(apiKey: ...);",156 "status": [157 "DOCUMENTED",158 "BETA"159 ],160 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/php",161 "messages": "$client->messages->create(model:, maxTokens:, messages:) ; $client->messages->createStream(...) foreach $event ; Anthropic\\Lib\\Streaming\\MessageAccumulator::forMessages()->accumulate($event)->message() ; $client->messages->raw->create(...) → getHeaderLine('request-id')",162 "retries": "RequestOptions::with(maxRetries: n) (default 2; connection errors, 408, 409, 429, >=500, timeouts)",163 "errors": "APIStatusException (other HTTP), APITimeoutException, APIConnectionException (+ per-status subclasses)",164 "streaming_note": "requires an incremental PSR-18 client; buffering clients yield all events at once"165 },166 {167 "provider": "anthropic",168 "language": "cli",169 "package": "ant (anthropic-cli)",170 "version_seen": "1.33.0 in docs (ant apply ≥1.30.0, sessions connect ≥1.32.0)",171 "install": "brew install anthropics/tap/ant | release tarball from github.com/anthropics/anthropic-cli/releases | go install github.com/anthropics/anthropic-cli/cmd/ant@latest",172 "client": "ant auth login (OAuth, workspace-scoped token) | ANTHROPIC_API_KEY | --api-key | ANTHROPIC_AUTH_TOKEN | WIF profiles (ant profile set …)",173 "status": [174 "DOCUMENTED"175 ],176 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart",177 "messages": "ant messages create --model claude-opus-5 --max-tokens 1024 --message '{role: user, content: \"Hello\"}' [--system @file.md] [--tool …] [--stream --format jsonl] [--beta a,b] [--workspace-id wrkspc_…]",178 "count_tokens": "ant messages count-tokens … (resource action pattern; beta: prefix for beta resources adds the header automatically)",179 "models": "ant models list | ant models retrieve <id>",180 "global_flags": "--profile, --format auto|json|jsonl|yaml|pretty|raw|explore, --transform <GJSON>, -r/--raw-output, --base-url, --workspace-id, --debug (prints request/response, keys redacted), --format-error, --transform-error",181 "input": "flags for scalars; stdin JSON/YAML document (heredoc) merged with flags (flags win); @path inlines file contents (binary auto base64; @file:// / @data:// force; \\@ escapes)",182 "auth_commands": "ant auth login [--scope org:admin] | ant auth status | ant auth logout [--all] | ant auth print-credentials --access-token (use as Authorization: Bearer for curl)",183 "other": "ant apply (agents/environments/skills/memory stores/deployments as files, claude-lock.json, --dry-run --yes --force --prune) ; ant beta:sessions connect --session-id … [--web] ; ant @completion zsh|bash|fish|powershell",184 "verification": {185 "method": "docs_only",186 "verified_at": "2026-09-18",187 "result": "skipped",188 "http_status": null,189 "request_note": "ant not installed locally; documented only"190 }191 },192 {193 "provider": "anthropic",194 "language": "libraries",195 "package": "openai-sdk compatibility / apple-foundation-models",196 "version_seen": "n/a",197 "install": "see pages",198 "client": "OpenAI SDK pointed at the Claude API compatibility layer; Swift package for Apple LanguageModelSession",199 "status": [200 "DOCUMENTED"201 ],202 "source": "https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk",203 "note": "Not general-purpose Messages clients; documented under cli-sdks-libraries/libraries."204 }205]206