Free, Unlimited Mancer AI API
On this page
This tutorial will show you how to use Puter.js to access Mancer AI's Weaver model for roleplay, narrative text generation, and creative storytelling for free, without needing API keys or backend infrastructure. Puter.js is completely free for apps, allowing you to provide your users with powerful narrative AI capabilities without any server-side setup.
Puter is the pioneer of the "User-Pays" model, which allows developers to incorporate AI features into their applications with each user covering their own usage costs. This enables developers to offer advanced AI capabilities to users at no cost to themselves, without any API keys or server-side setup.
Getting Started
You can use Puter.js without any API keys or sign-ups. To start using Puter.js, include the following script tag in your HTML file, either in the <head> or <body> section:
<script src="https://js.puter.com/v2/"></script>
Nothing else is required to start using Puter.js for free access to Mancer AI's Weaver model.
Example 1: Generate a story opening with Weaver
Weaver is a LLaMA 2 13B fine-tune built specifically for roleplay and narrative text generation. It excels at verbose, descriptive prose, making it ideal for story openings and immersive scene-setting. Use the puter.ai.chat() function:
puter.ai.chat("Write the opening paragraph of a fantasy story about a thief who discovers a hidden library.", { model: "mancer/weaver" })
.then(response => {
puter.print(response);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Write the opening paragraph of a fantasy story about a thief who discovers a hidden library.", { model: "mancer/weaver" })
.then(response => {
puter.print(response);
});
</script>
</body>
</html>
Example 2: Character roleplay with Weaver
Weaver is purpose-built for character-driven dialogue and immersive roleplay. You can establish a character through a system prompt and have the model respond in-character:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
const messages = [
{
role: "system",
content: "You are Captain Elara Voss, a battle-hardened starship captain who has seen too many wars. You speak with weary authority, choose your words carefully, and never sugarcoat the truth. Stay in character."
},
{
role: "user",
content: "Captain, the crew is asking if we should accept the diplomatic mission to Andora Prime. What's your call?"
}
];
puter.ai.chat(messages, { model: "mancer/weaver" })
.then(response => {
puter.print(response);
});
</script>
</body>
</html>
This example demonstrates how Weaver maintains character voice and persona consistently, which is essential for chatbots, text adventures, and interactive fiction.
Example 3: Continue a narrative scene
Weaver shines when extending an existing narrative. Provide a scene and let the model continue it with rich descriptive detail:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat(
"Continue this scene with vivid sensory detail:\n\nThe lantern guttered as Mira stepped into the cellar. Dust motes spun in the thin shaft of light from above, and the air smelled of old wine and something else — something colder.",
{ model: "mancer/weaver" }
).then(response => {
puter.print(response);
});
</script>
</body>
</html>
Weaver is well-suited for collaborative fiction tools, story generators, and creative writing assistants where descriptive prose matters more than factual precision.
Example 4: Streaming responses for real-time storytelling
For longer narrative output, streaming provides a much better user experience by showing the story as it unfolds rather than waiting for the full response:
<html>
<body>
<div id="story"></div>
<script src="https://js.puter.com/v2/"></script>
<script>
async function streamStory() {
const outputDiv = document.getElementById('story');
const response = await puter.ai.chat(
"Tell me a slow-burning ghost story set in a lighthouse on the coast of Maine. Build atmosphere gradually and end on an unresolved note.",
{ model: 'mancer/weaver', stream: true }
);
for await (const part of response) {
if (part?.text) {
outputDiv.innerHTML += part.text;
}
}
}
streamStory();
</script>
</body>
</html>
This example demonstrates streaming with Weaver, which is especially valuable for narrative use cases where readers can follow along as the story is generated.
List of supported models
The following Mancer AI models are supported by Puter.js:
mancer/weaver
That's it! You now have free access to Mancer AI's Weaver model using Puter.js. This allows you to build narrative-focused applications — chatbots, text adventures, interactive fiction, and collaborative writing tools — without needing API keys or backend infrastructure. True serverless AI!
Related
- Free, Unlimited Aion Labs API
- Free, Unlimited Nous Research Hermes API
- Free, Unlimited Liquid AI API
- Free, Unlimited Essential AI API
- Free, Unlimited ArceeAI API
- Free, Unlimited AllenAI API
- Free, Unlimited Inception Mercury API
- Free, Unlimited Llama API
- Free, Unlimited OpenRouter API
- Free, Unlimited AI API
Free, Serverless AI and Cloud
Start creating powerful web applications with Puter.js in seconds!
Get Started Now