NoSQL Database for AI-Generated Apps
Store and retrieve data in the cloud with Puter.js. Your AI coding agent can add a NoSQL key-value database to your app in a few lines, with no infrastructure setup.
Key-Value API
Simple operations for storing and retrieving data, with a small, consistent syntax that AI coding agents use correctly.
- Set, get, delete key-value pairs
- Increment and decrement numeric values
- List keys with pattern matching
No Infrastructure
No servers to configure, no databases to set up. Just write code and store data.
User-Pays Model
Build apps without worrying about storage costs. With the User-Pays model, users cover their own costs.
No Servers to Provision
Store data directly from the browser with client-side JavaScript. No server code for your AI to write, secure, or maintain.
Works Everywhere
Use from any frontend with a simple script tag, or install via npm for Node.js projects.
How It Works
1 Include Puter.js
Add Puter.js to your app:
<script src="https://js.puter.com/v2/"></script>
or with npm:
npm install @heyputer/puter.js
2 Store Data in the Cloud
Use the simple JavaScript API to store data:
puter.kv.set('name', 'Puter Smith');
View the NoSQL Database documentation for a full list of available features.
✓That's it!
No servers to configure, no databases to set up. Your data is stored in the cloud instantly.
The Database API
Set values, get values, increment counters, and more.
// Set a key-value pair
await puter.kv.set('username', 'alice');
// Get a value
const name = await puter.kv.get('username');
// Increment a counter
await puter.kv.incr('pageViews');
// List all keys
const keys = await puter.kv.list();
Frequently Asked Questions
A key-value database, also known as a key-value store, is a type of NoSQL database that stores data as pairs of keys and values, like a dictionary. With Puter.js, you can save, read, and manage data directly from your JavaScript code without setting up servers or managing infrastructure.
Puter.js is a JavaScript library that provides cloud storage, AI, and other cloud services through a simple API. It handles authentication, infrastructure, and scaling so you can focus on building your app.
With the User-Pays model, users cover their own storage costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.
Key-value storage is perfect for persisting application data, user preferences, session state, chat history in AI apps, caching, counters, leaderboards, configuration settings, and much more. It's ideal when you need fast, simple data storage without complex queries.
Unlike localStorage, Puter's key-value database stores data in the cloud, so it syncs across devices and isn't limited to a single browser. It also provides atomic operations like increment/decrement and supports much larger storage limits.
Add the Puter.js script to your app with <script src="https://js.puter.com/v2/"></script> or install via npm with npm install @heyputer/puter.js, then use puter.kv.set() to save data and puter.kv.get() to retrieve it. Check out the documentation for more examples, or point your AI coding agent at llms.txt.
Give Your AI a Backend
Copy one prompt into Claude Code, Codex, OpenCode, Cursor, or any coding agent,
and get a working app with auth, storage, database, and AI built in.
Create a to-do list app using Puter.js