Powered Projects

NPM-Social-Media-Automation

One click and upload posts on all Major Social Media Platforms in free of cost where you will just upload video nothing else of automatically npmai will generate meta data including Captions.

View Project
Github Repo

NPM-Rag-AI

NPM Rag A.I is a beautiful, easy-to-use web application that lets you instantly create and talk to your own private or public knowledge bases using RAG (Retrieval-Augmented Generation).

View Project
Github Repo

NPM-LEGAL-AI

Legal document Analyser and Chatbot automation powered by NPMAI.

View Project
Github Repo

NPM-AutoCode-AI

Autonomous PC Automator where npmai generates code -> clean code -> Security Check -> Self-Healing loop Autonomous Agent

View Project
Github Repo

NPM Journalist

Complain govt without any fear :- No identity required to complain to any govt official powered by npmai

View Project
Github Repo

NPMAI ChatBot

Voice-powered AI applications via NPMAI.

View Project
Github Repo

NPM News

AI-powered news insights.

With A.I
Visit App
Github Repo
Without A.I
Visit App
Github Repo

NPM-RAG-API-Framework

Develop RAG Agents with all media type including YT Videos in just 5 lines of code and without installing more than one library npmai and without using local resource in FREE and unlimited small scale production services.

Visit Docs
Github Repo

NPM Data AI

Financial analyst powered by NPMAI.

Visit App
Github Repo

NPM Debate A.I

Infinite Debate Arena with 4 LLM Debating on a topic with human in the loop.

Visit App
Github Repo

Chief Developer & Maintainer of npmai Ecosystem

NPMAI on PyPI

Python package for easy LLM integration. 6k+ installations.

Install via PyPI | Stats: Pepy.tech

Usage & Code Examples

### Python ###

# Install if not already pip install npmai # Basic usage from npmai import Ollama llm = Ollama( model="llama3.2", temperature=0.5 ) prompts = "Hello, tell me a short summary of NPMAI" result = llm.invoke(prompts) print(result)

### Java ###

import java.net.URI; import java.net.http.*; public class Main { public static void main(String[] args) throws Exception { var client = HttpClient.newHttpClient(); String json = "{\"prompt\": \"Hello world\", \"model\": \"llama3.2\", \"temperature\": 0.3}"; var request = HttpRequest.newBuilder() .uri(URI.create("https://npmai-api.onrender.com/llm")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); var response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } }

### C++ ###

#include #include #include int main() { CURL* curl = curl_easy_init(); if(curl) { struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); nlohmann::json j; j["prompt"] = "Hello world"; j["model"] = "llama3.2"; j["temperature"] = 0.3; std::string request_body = j.dump(); curl_easy_setopt(curl, CURLOPT_URL, "https://npmai-api.onrender.com/llm"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, request_body.c_str()); curl_easy_perform(curl); curl_easy_cleanup(curl); } return 0; }

### C ###

#include #include int main() { CURL *curl = curl_easy_init(); if(curl) { struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); const char *json = "{\"prompt\": \"Hello world\", \"model\": \"llama3.2\", \"temperature\": 0.3}"; curl_easy_setopt(curl, CURLOPT_URL, "https://npmai-api.onrender.com/llm"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, json); curl_easy_perform(curl); curl_easy_cleanup(curl); } return 0; }

########### Huggingface API Endpoint ###########

Llama3.2

https://sonuramashish22028704-npmai.hf.space/llm

Examples using different langauges:- Java
import java.net.URI;
import java.net.http.*;

public class HFClient {
public static void main(String[] args) throws Exception {
var client = HttpClient.newHttpClient();
String json = "{\"prompt\": \"Hello world\", \"temperature\": 0.3}";

var request = HttpRequest.newBuilder()
.uri(URI.create("https://sonuramashish22028704-npmai.hf.space/llm"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();

var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
} }

C++ #include #include int main() { CURL* curl = curl_easy_init(); if(curl) { struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); const char* data = "{\"prompt\": \"Hello world\", \"temperature\": 0.3}"; curl_easy_setopt(curl, CURLOPT_URL, "https://sonuramashish22028704-npmai.hf.space/llm"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); curl_easy_perform(curl); curl_easy_cleanup(curl); } return 0; }
C #include #include int main(void) { CURL *curl = curl_easy_init(); if(curl) { struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_URL, "https://sonuramashish22028704-npmai.hf.space/llm"); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"prompt\": \"Hello world\", \"temperature\": 0.3}"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_perform(curl); curl_easy_cleanup(curl); } return 0; }
Java-Script async function callHuggingFace() { const api_url = "https://sonuramashish22028704-npmai.hf.space/llm"; // Direct HF API link const payload = { prompt: "Hello world", temperature: 0.3 }; try { const response = await fetch(api_url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }); const data = await response.json(); console.log(data.response); } catch (err) { console.error("Failed:", err); } }

Workflow-Diagram:-


1. npmai



2. npmai Rag


NPMAI Updates changelog:-


Banner
Sonu Kumar

Hi, I'm Sonu Kumar! 🇮🇳🚀

14-year-old tech prodigy & changemaker from Nalanda, Bihar.

From rural school to TEDx, building open source platforms and fixing democracy—one line of code at a time.

🔥 Who Am I?

“Bihar Viral Boy” — Challenged Chief Minister & inspired millions at age 11.

TEDx Speaker (13) — Shared "Zid aur Junoon" journey on the global stage.

Open Source Innovator — Creating tools for education and democracy.

Self-taught Engineer — No formal CS background, just pure grit and internet.

✨ Tech Toolbox

Tech Icons

🌟 Major Projects & Repos

NPM-AutoCode-AI: A self healing PC Automation Agent
NPM-Debate-AI: 4 AI Models Infinite Debate Arena
npmai: Use Ollama without installation and setup,Develop RAG Agent without having load on PC and without writing bunhc of codes 400 lines of code in 5 lines.
NPM-Edu-AI Helper: Free large-file study tool for students.
NPM-Youtube-Automation: Fully automated video upload workflow.
NPM-Journalist: Help in achieving Ideal Democracy and solving people and your own problems with govt with ANNONYMITY
Blockchain Voting: Tamper-proof hardware-secure election system.
NPM Legal AI: Free legal intelligence toolkit.

💫 Achievements

427K+ Facebook Followers.

Allen Career Institute & DDPS School Kota 100% Scholarship.

Supported by Lok Sabha Speaker & MIT/Oxford circles. &By Senior Software,AI Engineer:-Lokesh Chaudhary sir (also a DDPS CS& Robotics Teacher,Mentor and Reasercher)

💬 Social Impact

Building a 100m+ youth movement. Blending rural activism with world-class tech to create ethical, free AI tools for "broke students."

🏗️ Mission & Goals

Democratize education, AI, & civic tech for everyone. Give rural students a global stage and affordable tools. Transform adversity into action.

Stats Streak

🧠 "Rural-Zero to Revolution"

“No matter where you start, you can be the change. I choose code, courage, and kindness. Let's build... together.”