Skip to main content

Crate claude_api

Crate claude_api 

Source
Expand description

Type-safe Rust client for the Anthropic API.

See the crate README for an overview.

Re-exports§

pub use beta::BetaHeader;
pub use client::Client;async
pub use client::ClientBuilder;async
pub use error::Error;
pub use error::Result;

Modules§

adminadmin
Anthropic Admin API.
auth
Authentication primitives and the RequestSigner hook.
batches
The Batches API: submit a batch of message requests, poll for completion, stream per-request results.
bedrockbedrock
AWS Bedrock support: a RequestSigner that signs HTTP requests with sigv4.
beta
Typed anthropic-beta header values.
blockingsync
Blocking (synchronous) variants of the HTTP surface.
clientasync
HTTP client and builder.
conversationconversation
Multi-turn conversation helper.
cost_previewasync and pricing
CostPreview – estimate the USD cost of a request before sending it.
derivederive
Procedural-macro re-exports for the derive feature.
dry_runasync
DryRun – preview the HTTP request that would be sent, without firing it.
error
Error type, result alias, and wire-format error payload.
files
The Files API (beta).
managed_agentsmanaged-agents-preview
Anthropic Managed Agents API (preview).
messages
The Messages API: create, create_stream, count_tokens.
models
The Models API: list, list_all, get.
pagination
Generic pagination wrapper used across paginated endpoints.
pricingpricing
Per-model pricing and cost calculation.
retryasync or sync
Retry policy honoring Retry-After.
skillsskills
The Skills API (beta).
ssestreaming
Low-level Server-Sent Events parsing.
tool_dispatchasync
Tool-dispatch foundation: the Tool trait, plus a registry and agent loop runner (the latter two land in v0.2 tasks #19 and #20).
types
Foundational shared types: ModelId, Role, Usage, StopReason.
user_profilesuser-profiles
The User Profiles API (beta).