Tutorials

Free, Unlimited Writer Palmyra X5 API

On this page

In this tutorial, you will learn how to add Writer Palmyra X5 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 Palmyra X5 into your application.

Example 1: Basic Chat

Palmyra X5 is an enterprise-focused model with strong language understanding and generation capabilities across 30+ languages.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat(
            "What are the benefits of using cloud-based infrastructure for modern applications?",
            { model: "writer/palmyra-x5" }
        )
        .then(response => {
            puter.print(response);
        });
    </script>
</body>
</html>

Example 2: Business Analysis

Palmyra X5 has advanced reasoning capabilities that make it ideal for complex business analysis.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
      puter.ai
        .chat(
          "Our SaaS company is considering expanding from B2B to B2C markets. Analyze the key challenges, opportunities, and strategic considerations we should evaluate before making this decision.",
          { model: "writer/palmyra-x5", 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>

Example 3: Code Generation

Palmyra X5 has strong code generation capabilities across multiple programming languages.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat(
            "Create a TypeScript function that implements a retry mechanism with exponential backoff for API calls, including proper error handling and type definitions",
            { model: "writer/palmyra-x5" }
        )
        .then(response => {
            puter.print(response, {code: true});
        });
    </script>
</body>
</html>

List of Writer models

You can use the following Writer models with Puter.js:

writer/palmyra-x5

Conclusion

Using Puter.js, you can gain access to Writer Palmyra X5, an enterprise-grade model with a 1 million token context window and advanced reasoning capabilities. Thanks to the User-Pays model, your users cover their own AI usage, not you as the developer. This means you can build powerful enterprise applications with long-context capabilities 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