openai/dall-e-2
Model Card
DALL·E 2 is OpenAI's earlier text-to-image model released in 2022 that generates images up to 1024x1024 pixels and supports inpainting, outpainting, and image variations. It offers more control in prompting and allows multiple images per request but produces lower quality results than newer models. DALL·E 2 is now deprecated and will be discontinued in May 2026.
Cost Per Image $0.02
per generation
Configuration N/A
resolution
Release Date Apr 6, 2022
API Usage Example
Add DALL·E 2 image generation to your app with just a few lines of code.
No API keys, no backend, no configuration required.
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.txt2img("A serene mountain landscape at sunset", {
model: "openai/dall-e-2"
}).then(image => {
document.body.appendChild(image);
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.txt2img("A serene mountain landscape at sunset", {
model: "openai/dall-e-2"
}).then(image => {
document.body.appendChild(image);
});
</script>
</body>
</html>
More Models from OpenAI
GPT-5.4
GPT-5.4 is OpenAI's latest frontier model released on March 5, 2026, designed for complex profession...
ChatGPT-5.4 Pro
GPT-5.4 Pro is a higher-compute version of GPT-5.4 that allocates more reasoning time to produce sma...
ChatGPT-5.3 Chat
GPT-5.3 Chat is OpenAI's latest conversational model update (also known as GPT-5.3 Instant), designe...
Frequently Asked Questions
The DALL·E 2 API gives you access to OpenAI's image generation model through Puter.js. With just a few lines of JavaScript, you can integrate DALL·E 2 into any web app or Node.js project — no API keys, no backend, and no configuration required.
DALL·E 2 was created by OpenAI and released on Apr 6, 2022.
| Price | |
|---|---|
| Per image | $0.02 |
You can access the DALL·E 2 API with just a few lines of JavaScript — no API keys, no backend, and no configuration required. Include the Puter.js library in your project and start making calls right away. For more details, check out our documentation.
Yes — the DALL·E 2 API works with any JavaScript framework, Node.js, or plain HTML through Puter.js. Just include the library and start building. See the documentation for more details.
Get started with Puter.js
Add DALL·E 2 image generation to your app without worrying about API keys or setup.
Read the Docs View Tutorials