Getting Started


Installation

To begin using Puter.js, simply add it to your HTML file using the following script tag:

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

That's it! You're now ready to start using Puter.js in your web application. No need to install any dependencies or set up a server. No API keys or configuration required.

Basic Usage

Once you've added the Puter.js script to your web application, a global puter object will be available for you to use. This object contains all of the functionality provided by Puter.js. For example, to use GPT-4o mini, you can call the puter.ai.chat function:

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat(`Why did the chicken cross the road?`).then(puter.print);
    </script>
</body>
</html>

This is all you need to use GPT-4o mini in your app. No backend code, no configuration, and no API keys. Just include the Puter.js script, and you're ready to start.