Free, Unlimited Upstage Solar API
On this page
In this tutorial, you will learn how to add Upstage Solar Pro 4 and Solar Pro 3 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
To use Puter.js, import our npm module in your project:
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
Or alternatively, add our script via CDN if you are working directly with HTML, simply add it to the <head> or <body> section of your code:
<script src="https://js.puter.com/v2/"></script>
That's it, you're ready to start integrating Solar into your application.
Example 1: Basic Chat
Solar Pro 4 is Upstage's agentic model, built for multi-step work across documents, terminals, and tool calls.
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat(
"Explain how a long context window changes the way you design a document processing pipeline",
{ model: "upstage/solar-pro-4" }
)
.then(response => {
puter.print(response);
});
</script>
</body>
</html>
Example 2: Streaming Chat
For longer responses, you can stream the output to display text as it's generated.
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai
.chat(
"Write a detailed guide on best practices for building scalable web applications",
{ model: "upstage/solar-pro-4", 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: Multilingual Support
Solar supports English, Korean, and Japanese. Solar Pro 4 scores 81.9 on Arena-Hard v2 for Japanese.
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat(
"한국어로 인공지능의 미래에 대해 설명해 주세요",
{ model: "upstage/solar-pro-4" }
)
.then(response => {
puter.print(response);
});
</script>
</body>
</html>
List of Upstage models
You can use the following Upstage models with Puter.js:
upstage/solar-pro-4
upstage/solar-pro-3
Conclusion
Using Puter.js, you can gain access to Upstage Solar Pro 4 for agentic and long-document work, along with Solar Pro 3. Thanks to the User-Pays model, your users cover their own AI usage, not you as the developer. This means you can build multilingual, document-heavy applications without worrying about AI usage costs.
You can find all AI features supported by Puter.js in the documentation.
Related
Ship a Full-Stack App with One Prompt
Build an AI chat app using Puter.js
Coding manually? see the guide