{"slug": "telegram-bot-with-local-ai-no-api-costs", "title": "Telegram Bot with Local AI: No API Costs", "summary": "A developer built a set of 45 open-source AI tools that run entirely on local models via Ollama, avoiding per-token API costs and keeping data off third-party servers. The stack uses a single HTTP call to Ollama's local generate endpoint with models such as llama3.2, codellama, mistral, phi3 and gemma2, requiring no API key. The author, identified as a VP at JPMorgan Chase, published the tools on GitHub.", "body_md": "Every token costs money. Every API call adds up. And your data goes to their servers.\n\n```\nbrew install ollama\nollama pull llama3.2\nollama serve\n```\n\nNow you have a GPT-4 level model running on your MacBook. Free. Private. Fast.\n\n``` python\nimport requests\n\ndef ask_local_ai(question):\n    r = requests.post(\n        \"http://localhost:11434/api/generate\",\n        json={\"model\": \"llama3.2\", \"prompt\": question, \"stream\": False}\n    )\n    return r.json()[\"response\"]\n\n# Works immediately, no API key needed\nanswer = ask_local_ai(\"Explain Docker in one paragraph\")\nprint(answer)\n```\n\n| Model | Size | Best For | \n|---|---|---|\n| llama3.2 | 2GB | General use | \n| codellama | 4GB | Code tasks | \n| mistral | 4.4GB | Fast reasoning | \n| phi3 | 2.2GB | Lightweight tasks | \n| gemma2 | 5.4GB | Complex reasoning | \n\nI built 45 tools using this stack. All free. All local. All open source.\n\n[github.com/amrendramishra/ai-tools](https://github.com/amrendramishra/ai-tools)\n\n*VP at JPMorgan Chase. Building AI tools at amrendranmishra.dev*", "url": "https://wpnews.pro/news/telegram-bot-with-local-ai-no-api-costs", "canonical_source": "https://dev.to/amrendra_n_mishra/telegram-bot-with-local-ai-no-api-costs-3a99", "published_at": "2026-10-21 05:40:14+00:00", "updated_at": "2026-10-21 05:47:35.443573+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "developer-tools", "ai-products"], "entities": ["Ollama", "llama3.2", "codellama", "mistral", "phi3", "gemma2", "JPMorgan Chase", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/telegram-bot-with-local-ai-no-api-costs", "markdown": "https://wpnews.pro/news/telegram-bot-with-local-ai-no-api-costs.md", "text": "https://wpnews.pro/news/telegram-bot-with-local-ai-no-api-costs.txt", "jsonld": "https://wpnews.pro/news/telegram-bot-with-local-ai-no-api-costs.jsonld"}}