grok_api 0.1.3

Rust client library for the Grok AI API (xAI)
Documentation
[package]

name = "grok_api"

version = "0.1.3"

edition = "2021"

rust-version = "1.70"

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/microtech/grok-api"

repository = "https://github.com/microtech/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]

# HTTP client

reqwest = { version = "0.13.2", features = ["json"] }

tokio = { version = "1.50.0", features = ["full"] }



# Serialization

serde = { version = "1.0", features = ["derive"] }

serde_json = "1.0"



# Error handling

anyhow = "1.0"

thiserror = "2.0.18"



# Logging

tracing = "0.1"



# Utilities

rand = "0.10.0"

dirs = "6.0"



[dev-dependencies]

tokio-test = "0.4"

mockito = "1.7"

tracing-subscriber = "0.3"



[features]

default = ["retry"]

retry = []  # Enable automatic retry logic for network errors

starlink = []  # Optimize for Starlink satellite connections



[[example]]

name = "simple_chat"

path = "examples/simple_chat.rs"



[[example]]

name = "conversation"

path = "examples/conversation.rs"



[[example]]

name = "streaming"

path = "examples/streaming.rs"



[package.metadata.docs.rs]

all-features = true

rustdoc-args = ["--cfg", "docsrs"]