When I started experimenting with AI integrations, I wanted to create a chat assistant on my website, something that could talk like GPT-4, reason like Claude, and even joke like Grok.
But OpenAI, Anthropic, Google, and xAI all require API keys. That means I needed to set up an account for each of the platforms and upgrade to one of their paid plans before I could start coding. Why? Because most of these LLM providers require a paid plan for API access. Not to mention, I would need to cover API usage billing for each LLM platform.
What if I could tell you there's an easier approach to start integrating AI within your websites and mobile applications, even without requiring API keys at all? Sounds exciting? Let me share how I did exactly that.
Integrate AI with Puter.js
Thanks to Puter.js, an open source JavaScript library that lets you use cloud features like AI models, storage, databases, user auth, all from the client side. No servers, no API keys, no backend setup needed here. What else can you ask for as a developer?
Puter.js is built around Puter’s decentralized cloud platform, which handles all the stuff like key management, routing, usage limits, and billing. Everything’s abstracted away so cleanly that, from your side, it feels like authentication, AI, and LLM just live in your browser.
Enough talking, let’s see how you can add GPT-5 integration within your web application in less than 10 lines.
Yes, that’s it. Unbelievable, right? Let's save the HTML code into an index.html file place this a new, empty directory. Open a terminal and switch to the directory where index.html file is located and serve it on localhost with the Python command:
python -m http.serverThen open http://localhost:8000 in your web browser. Click on Puter.js “Continue” button when presented.

🚧 It would take some time before you see a response from ChatGPT. Till then, you'll see a blank page.

You can explore a lot of examples and get an idea of what Puter.js does for you on its playground.
Let’s modify the code to make it more interesting this time. It would take a user query and return streaming responses from three different LLMs so that users can decide which among the three provides the best result.
AI Model Comparison
AI Model Comparison
Claude Opus 4
Claude Sonnet 4
Gemini 2.0 Pro
Save the above file in the index.html file as we did in the previos example and then run the server with Python. This is what it looks like now on localhost.

And here is a sample response from all three models on the query "What is It's FOSS".

Looks like It's FOSS is well trusted by humans as well as AI 😉
My Final Take on Puter.js and LLMs Integration
That’s not bad! Without requiring any API keys, you can do this crazy stuff.
Puter.js utilizes the “User pays model” which means it’s completely free for developers, and your application user will spend credits from their Puter’s account for the cloud features like the storage and LLMs they will be using. I reached out to them to understand their pricing structure, but at this moment, the team behind it is still working out to come up with a pricing plan.
This new Puter.js library is superbly underrated. I’m still amazed by how easy it has made LLM integration. Besides it, you can use Puter.js SDK for authentication, storage like Firebase.
Do check out this wonderful open source JavaScript library and explore what else you can build with it.

If this helped you, consider supporting It's FOSS
It's FOSS has been helping people use Linux for the past 14 years. Help us stay independent from big tech. Become a Plus member, enjoy ad-free reading and get 5 eBooks.
