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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! # Rainy SDK
//!
//! The official Rust SDK for the Rainy API by Enosis Labs (v3 service).
//!
//! This SDK provides a clean, idiomatic Rust interface for interacting with
//! the Rainy API, which unifies multiple AI providers under a single API.
//!
//! ## Features
//!
//! - **Idiomatic Rust API**: Clean, type-safe interfaces
//! - **Automatic Authentication**: API key and admin key management
//! - **Rate Limiting**: Built-in rate limit handling
//! - **Error Handling**: Comprehensive error types and handling
//! - **Async Support**: Full async/await support with Tokio
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use rainy_sdk::RainyClient;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create client with API key - automatically connects to the Rainy API v3 service
//! let client = RainyClient::with_api_key("your-api-key")?;
//!
//! // Check API health
//! let health = client.health_check().await?;
//! println!("API Status: {:?}", health.status);
//!
//! Ok(())
//! }
//! ```
//!
//! ## Authentication
//!
//! The SDK uses API key authentication:
//!
//! ### API Key Authentication
//!
//! ```rust,no_run
//! # use rainy_sdk::RainyClient;
//! # #[tokio::main]
//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Simplest way to create a client
//! let client = RainyClient::with_api_key("ra-20250125143052Ab3Cd9Ef2Gh5Ik8Lm4Np7Qr")?;
//! # Ok(())
//! # }
//! ```
//!
/// Handles authentication and API key management.
/// The main client for interacting with the Rainy API.
/// Defines error types and result aliases for the SDK.
/// Contains the data models for API requests and responses.
/// Implements retry logic with exponential backoff.
/// Web search types and options for Tavily-powered search.
/// JWT/session client for Rainy API v3 dashboard endpoints.
pub use AuthConfig;
pub use RainyClient;
pub use ;
pub use *;
pub use ;
pub use ;
// Re-export Research types for convenience
pub use ;
// Re-export commonly used types
/// Re-export of the `reqwest` crate for convenience.
///
/// This allows users of the SDK to use `reqwest` types without adding it
/// as a direct dependency to their project.
pub use reqwest;
/// Re-export of the `serde_json` crate for convenience.
///
/// This allows users of the SDK to use `serde_json` types for serialization
/// and deserialization without adding it as a direct dependency.
pub use serde_json;
/// The current version of the Rainy SDK.
///
/// This value is read from the `CARGO_PKG_VERSION` environment variable at compile time.
pub const VERSION: &str = env!;
/// The default base URL for the Rainy API v3 service.
///
/// Note: the v3 service currently exposes its canonical HTTP API under `/api/v1/*`.
pub const DEFAULT_BASE_URL: &str = "https://rainy-api-v3-us-179843975974.us-east4.run.app";