Rust SDK

Coming soon.

In the meantime, add the dependency and explore the API:

# Cargo.toml
[dependencies]
modelrelay = "0.93"
tokio = { version = "1", features = ["full"] }
use modelrelay::{Client, Config, ResponseBuilder, ApiKey};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new(Config {
        api_key: Some(ApiKey::parse(&std::env::var("MODELRELAY_API_KEY")?)?),
        ..Default::default()
    })?;

    let answer = ResponseBuilder::text_prompt(
        "You are a helpful assistant.",
        "Hello!",
    )
    .model("claude-sonnet-4-20250514")
    .send_text(&client.responses())
    .await?;

    println!("{}", answer);
    Ok(())
}