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
//! Anthropic API client for the AI Gateway.
//!
//! This crate provides a typed Rust client for the [Anthropic API](https://docs.anthropic.com/en/api/messages),
//! including non-streaming and SSE streaming support.
//!
//! # Features
//!
//! - **`claude-code`** — Enables non-standard endpoints used by Claude Code
//! (`/api/event_logging/batch`, `/v1/oauth/token`).
//!
//! # Quick Start
//!
//! ```no_run
//! use aigw_anthropic::{Client, Transport, TransportConfig, MessagesRequest, Message, MessageContent, Role};
//! use secrecy::SecretString;
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let transport = Transport::new(TransportConfig {
//! api_key: SecretString::from("sk-ant-..."),
//! ..Default::default()
//! })?;
//! let client = Client::new(transport)?;
//!
//! let req = MessagesRequest::builder()
//! .model("claude-sonnet-4-20250514")
//! .messages(vec![Message {
//! role: Role::User,
//! content: MessageContent::Text("Hello, Claude!".into()),
//! }])
//! .max_tokens(1024)
//! .build();
//!
//! let resp = client.messages(&req).await?;
//! println!("{}", resp.body.id);
//! # Ok(())
//! # }
//! ```
pub use Client;
pub use Error;
pub use ;
pub use ;
pub use *;