Expand description
⚠️ UNSTABLE — This crate is in active development. APIs may change without notice.
rs_ai - A fluent, ergonomic Rust SDK for AI with 15+ cloud and local providers.
§Quick Start
ⓘ
use rs_ai::gemini;
let response = gemini()
.api_key("your-api-key")
.model("gemini-2.5-flash")
.generate("What is 2+2?")
.await?;
println!("{}", response);§Supported Providers
- Claude -
rs_ai::claude() - ChatGPT -
rs_ai::chatgpt() - Gemini -
rs_ai::gemini() - xAI Grok -
rs_ai::xai() - OpenAI Compatible -
rs_ai::compatible(base_url)
Structs§
- Client
- A configured AI client ready for operations.
- Client
Builder - Fluent builder for creating and configuring AI clients.
Constants§
Functions§
- chatgpt
- Create a client builder for ChatGPT.
- claude
- Create a client builder for Claude.
- cloudflare
- Create a client builder for Cloudflare Workers AI.
- compatible
- Create a client builder for an OpenAI-compatible endpoint.
- gemini
- Create a client builder for Gemini.
- xai
- Create a client builder for xAI Grok.