HiDream

HiDream API

Access HiDream instantly with Puter.js, and add AI to any app in a few lines of code without backend or API keys.

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

puter.ai.txt2img("A beautiful sunset", {
    model: "hidream-ai/hidream-i1-dev"
}).then(imageElement => {
    document.body.appendChild(imageElement);
});
<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.txt2img("A beautiful sunset", {
            model: "hidream-ai/hidream-i1-dev"
        }).then(imageElement => {
            document.body.appendChild(imageElement);
        });
    </script>
</body>
</html>

Frequently Asked Questions

What is this HiDream API about?

The HiDream API gives you access to models for AI image generation. Through Puter.js, you can start using HiDream models instantly with zero setup or configuration.

Which HiDream models can I use?

Puter.js supports a variety of HiDream models, including HiDream-ai/HiDream-I1-Dev, HiDream-ai/HiDream-I1-Fast, and HiDream-ai/HiDream-I1-Full. Find all AI models supported by Puter.js in the AI model list.

How much does it cost?

With the User-Pays model, users cover their own AI costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.

What is Puter.js?

Puter.js is a JavaScript library that provides access to AI, storage, and other cloud services directly from a single API. It handles authentication, infrastructure, and scaling so you can focus on building your app.

Does this work with React / Vue / Vanilla JS / Node / etc.?

Yes — the HiDream API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building. See the documentation for more details.