The easiest AI SDK for Node.js
Generate, modify, validate, analyze, extract, and execute with natural language prompts.
Full documentation is available at:
Includes guides for installation, providers, methods, type conversion, CLI, and use cases.
npm install billy-sdkimport billy from "billy-sdk";
const IA = billy();
await IA.create("genera 10 preguntas sobre la biblia");
console.log(IA.results);| 🤖 Multi-Provider | Groq (default, free), OpenAI, Anthropic — no vendor lock-in |
| 🔄 Type Conversion | Automatic parsing to number, array, object, boolean, JSON |
| 🧠 Built-in Memory | billy({ memory: 10 }) — automatic conversation history |
| ⛓️ Method Chaining | IA.asNumber().short().create("prompt") |
| 🔌 Variable Injection | create("prompt {{var}}", { var: value }) |
| 📡 Streaming | IA.stream() — consume responses in real time |
| 📁 File & Image Handling | Extract text from PDFs and images automatically |
| 🛠️ Tool Calling | Let the AI call your own functions |
| ⚡ CLI | npx billy-sdk config set <key> |
| 🛡️ Retry & Timeout | Built-in, configurable |
# 1. Install
npm install billy-sdk
# 2. Set API key (Groq is free → https://console.groq.com)
# Option A: Environment variable (recommended)
export GROQ_API_KEY=gsk_your_key
# Option B: CLI (saves to ~/.billy-sdk/config.json)
npx billy-sdk config set gsk_your_key
# 3. Use it
echo 'import billy from "billy-sdk"; const IA = billy(); console.log(await IA.create("hola"));' | nodeSee the examples/ directory for 18 runnable scripts: invoice extraction, ticket classification, NL-to-SQL, chatbot, sentiment analysis, email generator, summarizer, content moderation, test data generation, and basic RAG.
- Node.js >= 18
- Internet connection
- API key (Groq offers a free tier)
MIT