async-anthropic 0.6.0

Anthropic Rust Client.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// examples/models.rs

use async_anthropic::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::default();

    let response = client.models().list().await?;

    println!("{response:?}");

    let response = client.models().get("claude-3-7-sonnet-20250219").await?;

    println!("{response:?}");

    Ok(())
}