SDK basics
Add the Nubo.js script to a web page and call sign-in, files, key-value storage, AI chat, workers and hosting. Full reference is on the developer portal.
Add one script tag and call the SDK. Your users sign in with their own Nubo account, so there are no keys to set up.
How do I add the SDK?
<script src="https://js.nubosuite.tech/v2/"></script>
<script>
puter.kv.set('hello', 'world');
puter.kv.get('hello').then(console.log);
</script>
The global is puter (also available as nubo).
What can I call?
| Area | Examples |
|---|---|
| Auth | puter.auth.signIn(), puter.auth.getUser() |
| Files | puter.fs.write(), read(), readdir(), and sharing calls such as share() and listShared() |
| Key-value | puter.kv.set(), get(), list(), incr() |
| AI | puter.ai.chat() (text) |
| Workers | puter.workers.create() runs serverless code on NAME.nubosuite.tech |
| Hosting | puter.hosting.create() publishes a static site |
What does AI support?
Chat only. puter.ai.capabilities() and GET /ai/capabilities tell an app what exists, so check them before offering image, speech or OCR features.
Where is the reference?
developer.nubosuite.tech lists the endpoints and the SDK script. The SDK is Apache-2.0 licensed code in the packages/nubo-js folder of the repository.