stabilityai 0.1.0

stability.ai library based on OpenAPI spec
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{error::StabilityAIError, types::Engine, Client};

/// Enumerate available engines
pub struct Engines<'c> {
    client: &'c Client,
}

impl<'c> Engines<'c> {
    pub fn new(client: &'c Client) -> Self {
        Self { client }
    }

    /// List all engines available to your organization/user
    pub async fn list(&self) -> Result<Vec<Engine>, StabilityAIError> {
        self.client.get("/engines/list").await
    }
}