> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dall-e integration

> Integrate with the Dall-e tool using LangChain JavaScript.

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
/* eslint-disable no-process-env */
import { DallEAPIWrapper } from "@langchain/openai";

const tool = new DallEAPIWrapper({
  n: 1, // Default
  model: "dall-e-3", // Default
  apiKey: process.env.OPENAI_API_KEY, // Default
});

const imageURL = await tool.invoke("a painting of a cat");

console.log(imageURL);
```

## Related

* Tool [conceptual guide](https://docs.langchain.com/oss/javascript/langchain/tools.md)
* Tool [how-to guides](https://docs.langchain.com/oss/javascript/langchain/tools.md)

***

[Connect these docs](https://docs.langchain.com/use-these-docs.md) to your agent of choice via MCP for real-time answers.

[Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/tools/dalle.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
