1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Rust library for stability.ai based on OpenAPI spec.
//!
//! ## Creating client
//!
//! ```
//! use stabilityai::Client;
//!
//! // Create a client with api key from env var STABILITY_API_KEY and default base url.
//! let client = Client::new();
//!
//! // OR use API key from different source and a non default organization
//! let api_key = "sk-..."; // This secret could be from a file, or environment variable.
//! let client = Client::new()
//! .with_api_key(api_key)
//! .with_organization("the-continental");
//!
//! // Use custom reqwest client
//! let http_client = reqwest::ClientBuilder::new()
//! .user_agent("Rust/stabilityai")
//! .build().unwrap();
//!
//! let client = Client::new()
//! .with_http_client(http_client);
//! ```
//!
//! ## Making requests
//!
//!```
//!# tokio_test::block_on(async {
//! use stabilityai::Client;
//!
//! // Create client
//! let client = Client::new();
//!
//! // Call API
//! let response = client
//! .user()
//! .account()
//! .await
//! .unwrap();
//!
//! println!("{:#?}", response);
//! # });
//!```
//!
//! ## Examples
//! For full working examples see [examples](https://github.com/64bit/stabilityai/tree/main/examples) directory in the repository.
//!
pub use Client;
pub use Engines;
pub use Generate;
pub use User;
pub use API_BASE;
pub use CLIENT_ID_HEADER;
pub use CLIENT_VERSION_HEADER;
pub use ORGANIZATION_HEADER;