Free, Unlimited Nous Research Hermes API
This tutorial will show you how to use Puter.js to access Nous Research's powerful Hermes models including Hermes 4 70B, Hermes 4 405B, Hermes 3 Llama 3.1 70B, and Hermes 3 Llama 3.1 405B for free, without needing API keys or backend infrastructure. Puter.js is completely free for apps, allowing you to provide your users with powerful AI capabilities.
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
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 Nous Research's Hermes models.
Example 1Chat with Nous Hermes 4 70B
To generate text using Hermes 4 70B, use the puter.ai.chat() function:
puter.ai.chat("Explain the concept of neural networks and how they learn from data", { model: "nousresearch/hermes-4-70b" })
.then(response => {
puter.print(response);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Explain the concept of neural networks and how they learn from data", { model: "nousresearch/hermes-4-70b" })
.then(response => {
puter.print(response);
});
</script>
</body>
</html>
Example 2Answer complex questions with Nous Hermes 4 405B
For more complex reasoning tasks, use the larger Hermes 4 405B model:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat(
"Analyze the ethical implications of artificial general intelligence. Consider multiple philosophical perspectives including consequentialism, deontology, and virtue ethics. Provide a balanced analysis with potential benefits and risks.",
{ model: "nousresearch/hermes-4-405b" }
).then(response => {
puter.print(response);
});
</script>
</body>
</html>
This example demonstrates how Hermes 4 405B excels at complex reasoning tasks requiring nuanced understanding and multi-faceted analysis.
Example 3Streaming responses for real-time interaction
For longer responses, use streaming to provide a better user experience:
<html>
<body>
<div id="response"></div>
<script src="https://js.puter.com/v2/"></script>
<script>
async function streamResponse() {
const outputDiv = document.getElementById('response');
const response = await puter.ai.chat(
"Write a detailed guide on implementing microservices architecture, including best practices, common pitfalls, and real-world examples",
{model: 'nousresearch/hermes-4-70b', stream: true}
);
for await (const part of response) {
if (part?.text) {
outputDiv.innerHTML += part.text;
}
}
}
streamResponse();
</script>
</body>
</html>
This example shows how streaming provides immediate feedback to users as Hermes generates its comprehensive response.
List of Supported Models
The following Nous Research Hermes models are currently supported by Puter.js:
nousresearch/hermes-4-70b
nousresearch/hermes-4-405b
nousresearch/hermes-3-llama-3.1-70b
nousresearch/hermes-3-llama-3.1-405b:free
nousresearch/hermes-3-llama-3.1-405b
nousresearch/hermes-2-pro-llama-3-8b
nousresearch/deephermes-3-mistral-24b-preview
That's it! You now have free access to Nous Research's Hermes models including Hermes 4 70B, Hermes 4 405B, Hermes 3 Llama 3.1, and DeepHermes 3 Mistral using Puter.js. You can build powerful applications that handle complex tasks, without needing API keys or backend infrastructure. True serverless AI!
Related
Free, Serverless AI and Cloud
Start creating powerful web applications with Puter.js in seconds!
Get Started Now