[package]
name = "grok_api"
version = "0.2.0"
edition = "2024"
rust-version = "1.85"
authors = ["john mcconnell <john.microtech@gmail.com>"]
license = "MIT OR Apache-2.0"
description = "Rust client library for the Grok AI API (xAI)"
homepage = "https://github.com/micro-tech/grok-api"
repository = "https://github.com/micro-tech/grok-api"
documentation = "https://docs.rs/grok_api"
readme = "README.md"
keywords = ["grok", "ai", "xai", "llm", "api"]
categories = ["api-bindings", "web-programming::http-client"]
[dependencies]
reqwest = { version = "0.13", features = ["json"] }
tokio = { version = "1.53.1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
anyhow = "1"
thiserror = "2"
tracing = "0.1"
rand = "0.10"
dirs = "6"
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-native-roots"] }
futures-util = "0.3"
[dev-dependencies]
tokio-test = "0.4"
mockito = "1.7"
tracing-subscriber = "0.3"
[features]
default = ["retry"]
retry = []
starlink = []
[[example]]
name = "simple_chat"
path = "examples/simple_chat.rs"
[[example]]
name = "conversation"
path = "examples/conversation.rs"
[[example]]
name = "reasoning"
path = "examples/reasoning.rs"
[[example]]
name = "voice_chat"
path = "examples/voice_chat.rs"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]