Tutorials

Free, Unlimited Essential AI API

On this page

In this tutorial, you will learn how to add Essential AI Rnj-1 into your application for free using Puter.js. You can gain access to various AI models using Puter.js without having to set up the AI server yourself.

Puter.js uses the User-Pays model, where users of your application cover their own AI costs. This means you as a developer don't pay anything for your users' usage, making your app practically free to run. You can scale to unlimited users and pay nothing for the AI or server usage.

Getting Started

Add Puter.js to your project with a single line:

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

That's it, you're ready to start integrating Rnj-1 into your application.

Example 1: Basic chat

Rnj-1 is an 8B model trained from scratch by Essential AI. It has capabilities on par with state-of-the-art open weight models.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat("Explain the concept of quantum computing in simple terms",
            { model: "openrouter:essentialai/rnj-1-instruct" }
        )
        .then(response => {
            puter.print(response);
        });
    </script>
</body>
</html>

Example 2: Code generation

The Rnj-1 model excels at code generation, making it suitable for software engineering tasks.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat(
            "Write a Python function that implements binary search on a sorted array",
            { model: "openrouter:essentialai/rnj-1-instruct" }
        )
        .then(response => {
            puter.print(response, {code: true});
        });
    </script>
</body>
</html>

Example 3: Problem Solving

Rnj-1 has strong scientific reasoning and mathematical problem solving capabilities.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
      puter.ai
        .chat(
          "Debug this logic: If I have 3 apples and give away 5, how many do I have?",
          { model: "openrouter:essentialai/rnj-1-instruct", stream: true }
        )
        .then(async (resp) => {
          for await (const part of resp) {
            if (part?.reasoning) puter.print(part?.reasoning);
            else puter.print(part?.text);
          }
        });
    </script>
</body>
</html>

List of Essential AI models

You can use the following Essential AI models with Puter.js:

openrouter:essentialai/rnj-1-instruct

Conclusion

Using Puter.js, you can gain access to Essential AI models without having to set up the AI server yourself. And thanks to the User-Pays model, your users cover their own AI usage, not you as the developer. This means you can build powerful applications without worrying about AI usage costs.

You can find all AI features supported by Puter.js in the documentation.

Free, Serverless AI and Cloud

Start creating powerful web applications with Puter.js in seconds!

Get Started Now

Read the Docs Try the Playground