phaseo 0.1.0

Official Rust SDK for Phaseo Gateway
Documentation
  • Coverage
  • 26.88%
    461 out of 1715 items documented0 out of 237 items with examples
  • Size
  • Source code size: 198.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 10.88 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • phaseoteam/Phaseo
    6 3 16
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • DanielButler1

Phaseo Rust SDK

The official Rust client for Phaseo Gateway.

Install

[dependencies]
phaseo = "0.1"
serde_json = "1"

Quick start

use phaseo::Phaseo;
use serde_json::json;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Phaseo::from_env()?;
    let response = client.responses(&json!({
        "model": "openai/gpt-5.4-nano",
        "input": "Reply with exactly: Rust SDK works"
    }))?;

    println!("{}", response.body);
    Ok(())
}

Set PHASEO_API_KEY before running the example. PHASEO_BASE_URL can override the default https://api.phaseo.app/v1 endpoint.

The generated low-level client remains available under phaseo::gen for endpoints not yet wrapped by the ergonomic client.

Development

rustfmt --check packages/sdk/sdk-rust/src/phaseo.rs packages/sdk/sdk-rust/tests/*.rs
cargo clippy --manifest-path packages/sdk/sdk-rust/Cargo.toml --all-targets -- -D warnings
cargo test --manifest-path packages/sdk/sdk-rust/Cargo.toml --all-targets
cargo package --manifest-path packages/sdk/sdk-rust/Cargo.toml

Live gateway smoke tests are opt-in with PHASEO_RUST_LIVE_SMOKE=true.