Crate atrium_api

source ·
Expand description

ATrium API: Rust library for Bluesky’s atproto services


ATrium API is a Rust library that includes the definitions of XRPC requests and their associated input/output model types. These codes are generated from the Lexicon schema on


You can use any HTTP client that implements atrium_xrpc::HttpClient to make use of the XRPC requests. atrium_xrpc also includes a default implementation using reqwest.

use atrium_api::client::AtpServiceClient;
use atrium_api::com::atproto::server::create_session::Input;
use atrium_api::xrpc::client::reqwest::ReqwestClient;
use std::sync::Arc;

async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = AtpServiceClient::new(ReqwestClient::new("".into()));
    let result = client
        .create_session(Input {
            identifier: "".into(),
            password: "hunter2".into(),
    println!("{:?}", result);



  • Definitions for the app namespace.
  • Definitions for Blob types.
  • An ATP service client.
  • Structs for ATP client, implements all HTTP APIs of XRPC.
  • Definitions for the com namespace.
  • A collection of ATP repository record types.