larzai
A generic LLM client - and a real metered call, paid from a wallet.
No endpoint or key is ever hardcoded - point it at your own gateway or any OpenAI-compatible endpoint via env vars. The money-native part: ask_paid() pays from the caller's wallet BEFORE calling out, using the language's own pay/wallet keywords, so a declined payment means the call never happens - not an API wrapper bolted onto a separate billing system.
larzscript pkg install ai
What you get
- No hardcoded endpoint/key - point it at your own gateway
- OpenAI-compatible chat-completions shape
- ask_paid() - a real wallet pay() before the call happens
- A declined payment means the call never fires
Try it
import "ai" as ai
try {
ai.ask("hi")
} catch e {
print("error type:", e["type"])
}Output
error type: AiError
Why it's in the Larz Stack
larzai is a real Larzscript package (larzscript pkg install ai) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.