Files
puter/src/puter-js
2025-09-19 16:52:18 -07:00
..
…
2025-09-19 16:52:18 -07:00
2025-07-11 17:03:33 -07:00
2025-09-19 16:52:18 -07:00
2025-09-19 16:52:18 -07:00
2025-09-19 13:58:25 -07:00
2025-09-19 13:58:25 -07:00

Puter.js

The official JavaScript SDK for Puter.com — Free, Serverless, Cloud and AI from the frontend code.


Installation (npm)

npm install @heyputer/puter.js

Importing

ES Modules

import '@heyputer/puter.js';

CommonJS

const puter = require('@heyputer/puter.js');

CDN

Include Puter.js directly in your HTML via CDN in the <head> section:

<script src="https://js.puter.com/v2/"></script>

Usage Example

After importing, you can use the global puter object:

// Print a message
puter.print('Hello from Puter.js!');

// Chat with GPT-5 nano
puter.ai.chat('What color was Napoleon\'s white horse?').then(response => {
  puter.print(response);
});

Documentation & Community